[Commits] c49639020e9: Test result updates (2)
revision-id: c49639020e93f8ee2eca0692342dc48eb08a6102 (mariadb-10.6.1-359-gc49639020e9) parent(s): 0a3a810adaec017a3f02080880b0deeb1dae83b2 author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2022-03-15 18:48:39 +0300 message: Test result updates (2) --- mysql-test/suite/archive/archive_gis.result | 30 +- .../suite/binlog/r/binlog_stm_blackhole.result | 4 +- mysql-test/suite/binlog/r/binlog_stm_ps.result | 8 +- .../suite/compat/oracle/r/anonymous_derived.result | 8 +- .../compat/oracle/r/empty_string_literal.result | 16 +- .../suite/compat/oracle/r/func_add_months.result | 4 +- .../suite/compat/oracle/r/func_concat.result | 64 +- .../suite/compat/oracle/r/func_decode.result | 20 +- .../suite/compat/oracle/r/func_length.result | 4 +- mysql-test/suite/compat/oracle/r/func_misc.result | 4 +- mysql-test/suite/compat/oracle/r/func_pad.result | 4 +- .../suite/compat/oracle/r/func_replace.result | 4 +- .../suite/compat/oracle/r/func_substr.result | 4 +- mysql-test/suite/compat/oracle/r/func_time.result | 8 +- .../suite/compat/oracle/r/func_to_char.result | 4 +- mysql-test/suite/compat/oracle/r/func_trim.result | 8 +- mysql-test/suite/compat/oracle/r/sequence.result | 8 +- .../suite/compat/oracle/r/sp-cursor-rowtype.result | 4 +- mysql-test/suite/compat/oracle/r/sp-cursor.result | 4 +- mysql-test/suite/compat/oracle/r/sp-row.result | 8 +- mysql-test/suite/compat/oracle/r/sp.result | 4 +- .../compat/oracle/r/table_value_constr.result | 632 ++++++++--------- mysql-test/suite/funcs_1/r/innodb_views.result | 4 +- mysql-test/suite/funcs_1/r/memory_views.result | 4 +- mysql-test/suite/gcol/inc/gcol_keys.inc | 2 +- mysql-test/suite/gcol/inc/gcol_view.inc | 14 +- mysql-test/suite/gcol/r/gcol_bugfixes.result | 34 +- mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result | 32 +- mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result | 32 +- mysql-test/suite/gcol/r/gcol_keys_innodb.result | 122 ++-- mysql-test/suite/gcol/r/gcol_keys_myisam.result | 122 ++-- mysql-test/suite/gcol/r/gcol_select_innodb.result | 204 +++--- mysql-test/suite/gcol/r/gcol_select_myisam.result | 266 +++---- mysql-test/suite/gcol/r/gcol_view_innodb.result | 38 +- mysql-test/suite/gcol/r/gcol_view_myisam.result | 38 +- mysql-test/suite/gcol/r/innodb_virtual_fk.result | 28 +- mysql-test/suite/heap/heap.result | 98 +-- mysql-test/suite/heap/heap.test | 16 +- mysql-test/suite/heap/heap_btree.result | 78 +-- mysql-test/suite/heap/heap_btree.test | 2 +- mysql-test/suite/heap/heap_hash.result | 168 ++--- mysql-test/suite/innodb/r/innodb-dict.result | 16 +- .../suite/innodb/r/innodb-index-online.result | 8 +- mysql-test/suite/innodb/r/innodb-index.result | 112 +-- mysql-test/suite/innodb/r/innodb-index_ucs2.result | 16 +- mysql-test/suite/innodb/r/innodb-isolation.result | 70 +- .../suite/innodb/r/innodb-table-online.result | 4 +- mysql-test/suite/innodb/r/innodb_bug30423.result | 16 +- .../r/innodb_bulk_create_index_replication.result | 8 +- .../innodb/r/innodb_bulk_create_index_small.result | 16 +- mysql-test/suite/innodb/r/innodb_gis.result | 50 +- .../innodb/r/innodb_lock_wait_timeout_1.result | 8 + .../suite/innodb/r/innodb_stats_persistent.result | 40 +- mysql-test/suite/innodb/r/partition_locking.result | 8 +- mysql-test/suite/innodb/r/temporary_table.result | 16 +- .../innodb/r/temporary_table_optimization.result | 12 +- mysql-test/suite/innodb/t/innodb-isolation.test | 22 +- mysql-test/suite/innodb/t/innodb_bug30423.test | 4 +- mysql-test/suite/innodb_fts/r/fulltext.result | 72 +- mysql-test/suite/innodb_fts/r/fulltext_misc.result | 66 +- .../suite/innodb_fts/r/fulltext_order_by.result | 4 +- mysql-test/suite/innodb_gis/r/0.result | 46 +- mysql-test/suite/innodb_gis/r/1.result | 62 +- mysql-test/suite/innodb_gis/r/bug17057168.result | 4 +- .../suite/innodb_gis/r/create_spatial_index.result | 780 ++++++++++----------- mysql-test/suite/innodb_gis/r/geometry.result | 94 +-- mysql-test/suite/innodb_gis/r/gis.result | 62 +- .../suite/innodb_gis/r/innodb_gis_rtree.result | 44 +- mysql-test/suite/innodb_gis/r/point_basic.result | 20 +- mysql-test/suite/innodb_gis/r/rt_precise.result | 4 +- mysql-test/suite/innodb_gis/r/rtree.result | 8 +- .../suite/innodb_gis/r/rtree_estimate.result | 64 +- .../suite/innodb_gis/r/rtree_multi_pk.result | 4 +- mysql-test/suite/innodb_gis/r/types.result | 4 +- mysql-test/suite/innodb_gis/t/1.test | 14 +- mysql-test/suite/innodb_gis/t/geometry.test | 58 +- mysql-test/suite/innodb_gis/t/gis.test | 14 +- mysql-test/suite/innodb_gis/t/point_basic.test | 10 +- mysql-test/suite/innodb_gis/t/rt_precise.test | 2 +- mysql-test/suite/innodb_gis/t/types.test | 2 +- .../suite/innodb_zip/r/index_large_prefix.result | 32 +- mysql-test/suite/json/r/json_no_table.result | 4 +- mysql-test/suite/json/r/json_table.result | 48 +- mysql-test/suite/json/r/json_table_mysql.result | 132 ++-- mysql-test/suite/maria/collations.result | 8 +- mysql-test/suite/maria/create.result | 6 +- mysql-test/suite/maria/icp.result | 84 +-- .../suite/maria/maria-gis-rtree-dynamic.result | 8 +- .../suite/maria/maria-gis-rtree-trans.result | 8 +- mysql-test/suite/maria/maria-gis-rtree.result | 8 +- mysql-test/suite/maria/maria.result | 174 ++--- mysql-test/suite/maria/mrr.result | 30 +- mysql-test/suite/maria/ps_maria.result | 5 +- mysql-test/suite/parts/r/optimizer.result | 8 +- .../suite/perfschema/r/batch_table_io_func.result | 16 +- mysql-test/suite/perfschema/r/digest_view.result | 80 +-- mysql-test/suite/perfschema/r/misc.result | 4 +- mysql-test/suite/plugins/r/audit_null.result | 4 +- mysql-test/suite/sql_sequence/next.result | 16 +- mysql-test/suite/sql_sequence/setval.result | 4 +- .../suite/sys_vars/r/max_seeks_for_key_func.result | 36 +- mysql-test/suite/vcol/r/vcol_keys_myisam.result | 4 +- mysql-test/suite/vcol/r/vcol_misc.result | 6 +- mysql-test/suite/vcol/r/vcol_select_innodb.result | 128 ++-- mysql-test/suite/vcol/r/vcol_select_myisam.result | 156 ++--- mysql-test/suite/vcol/r/vcol_view_innodb.result | 38 +- mysql-test/suite/vcol/r/vcol_view_myisam.result | 38 +- mysql-test/suite/versioning/r/cte.result | 48 +- mysql-test/suite/versioning/r/derived.result | 12 +- mysql-test/suite/versioning/r/trx_id.result | 12 +- 110 files changed, 2593 insertions(+), 2584 deletions(-) diff --git a/mysql-test/suite/archive/archive_gis.result b/mysql-test/suite/archive/archive_gis.result index e24cad80702..de26a4f9d53 100644 --- a/mysql-test/suite/archive/archive_gis.result +++ b/mysql-test/suite/archive/archive_gis.result @@ -233,8 +233,8 @@ fid AsText(Envelope(g)) 120 POLYGON((0 0,10 0,10 10,0 10,0 0)) 121 POLYGON((3 6,44 6,44 9,3 9,3 6)) explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelope(g)) from gis_geometry; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_geometry ALL NULL NULL NULL NULL 21 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_geometry NULL ALL NULL NULL NULL NULL 21 100.00 Warnings: Note 1003 select st_dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,st_geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,st_isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,st_astext(st_envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry` SELECT fid, X(g) FROM gis_point ORDER by fid; @@ -250,8 +250,8 @@ fid Y(g) 103 20 104 20 explain extended select X(g),Y(g) FROM gis_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_point NULL ALL NULL NULL NULL NULL 4 100.00 Warnings: Note 1003 select st_x(`test`.`gis_point`.`g`) AS `X(g)`,st_y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point` SELECT fid, AsText(StartPoint(g)) FROM gis_line ORDER by fid; @@ -285,8 +285,8 @@ fid IsClosed(g) 106 1 107 0 explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),NumPoints(g),AsText(PointN(g, 2)),IsClosed(g) FROM gis_line; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_line ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_line NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select st_astext(st_startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,st_astext(st_endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,st_length(`test`.`gis_line`.`g`) AS `GLength(g)`,st_numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,st_astext(st_pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,st_isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line` SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; @@ -315,8 +315,8 @@ fid AsText(InteriorRingN(g, 1)) 109 LINESTRING(10 10,20 10,20 20,10 20,10 10) 110 NULL explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumInteriorRings(g),AsText(InteriorRingN(g, 1)) FROM gis_polygon; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_polygon ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_polygon NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select st_astext(st_centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,st_area(`test`.`gis_polygon`.`g`) AS `Area(g)`,st_astext(st_exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,st_numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,st_astext(st_interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon` SELECT fid, IsClosed(g) FROM gis_multi_line ORDER by fid; @@ -354,8 +354,8 @@ fid NumGeometries(g) 120 2 121 2 explain extended SELECT fid, NumGeometries(g) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_multi_point NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,st_numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point` SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point ORDER by fid; @@ -382,8 +382,8 @@ fid AsText(GeometryN(g, 1)) 120 POINT(0 0) 121 POINT(44 6) explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_multi_point NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,st_astext(st_geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point` SELECT g1.fid as first, g2.fid as second, @@ -401,9 +401,9 @@ Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort -1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE g1 NULL ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort +1 SIMPLE g2 NULL ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join) Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,st_within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,st_contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,mbroverlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,st_equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,mbrdisjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,st_touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,mbrintersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,st_crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; diff --git a/mysql-test/suite/binlog/r/binlog_stm_blackhole.result b/mysql-test/suite/binlog/r/binlog_stm_blackhole.result index 965971bf85f..5fd918a1d87 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_blackhole.result +++ b/mysql-test/suite/binlog/r/binlog_stm_blackhole.result @@ -71,8 +71,8 @@ a b Only MyISAM tables support collections Full-text indexes are called collections explain extended select * from t1 where MATCH(a,b) AGAINST ("collections"); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 fulltext a a 0 1 100.00 Using where +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL fulltext a a 0 1 100.00 Using where Warnings: Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (match `test`.`t1`.`a`,`test`.`t1`.`b` against ('collections')) select * from t1 where MATCH(a,b) AGAINST ("indexes"); diff --git a/mysql-test/suite/binlog/r/binlog_stm_ps.result b/mysql-test/suite/binlog/r/binlog_stm_ps.result index 75f64500878..783c65cd56b 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_ps.result +++ b/mysql-test/suite/binlog/r/binlog_stm_ps.result @@ -138,8 +138,8 @@ EXECUTE IMMEDIATE 'INSERT INTO t1 VALUES (Default)'; # The output of this query in 'Note' is a syntactically incorrect query. # But as it's never logged, it's ok. It should be human readable only. EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT ?' USING Default; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select default AS `?` EXECUTE IMMEDIATE 'INSERT INTO t1 VALUES (?)' USING Default; @@ -152,8 +152,8 @@ EXECUTE IMMEDIATE 'INSERT INTO t1 VALUES (?)' USING Default; END; $$ CALL p1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used DROP PROCEDURE p1; DROP TABLE t1; include/show_binlog_events.inc diff --git a/mysql-test/suite/compat/oracle/r/anonymous_derived.result b/mysql-test/suite/compat/oracle/r/anonymous_derived.result index 85868794130..82d4571b220 100644 --- a/mysql-test/suite/compat/oracle/r/anonymous_derived.result +++ b/mysql-test/suite/compat/oracle/r/anonymous_derived.result @@ -35,10 +35,10 @@ a b 3 3 explain extended select t1.a, b from t1, (select max(a) as b from t2); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join) -2 DERIVED t2 ALL NULL NULL NULL NULL 2 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 2 100.00 +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join) +2 DERIVED t2 NULL ALL NULL NULL NULL NULL 2 100.00 Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","__2"."b" AS "b" from "test"."t1" join (/* select#2 */ select max("test"."t2"."a") AS "b" from "test"."t2") "__2" select * from (select tt.* from (select * from t1) as tt) where tt.a > 0; diff --git a/mysql-test/suite/compat/oracle/r/empty_string_literal.result b/mysql-test/suite/compat/oracle/r/empty_string_literal.result index 4af576e90c0..3a02ef89098 100644 --- a/mysql-test/suite/compat/oracle/r/empty_string_literal.result +++ b/mysql-test/suite/compat/oracle/r/empty_string_literal.result @@ -160,22 +160,22 @@ v1 CREATE VIEW "v1" AS select "t1"."c1" AS "c1","t1"."c2" AS "c2" from "t1" unio DROP VIEW v1; DROP TABLE t1; EXPLAIN EXTENDED SELECT ''; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select NULL AS "NULL" EXPLAIN EXTENDED SELECT _latin1''; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select NULL AS "NULL" EXPLAIN EXTENDED SELECT N''; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select NULL AS "NULL" EXPLAIN EXTENDED SELECT '' ''; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select NULL AS "NULL" diff --git a/mysql-test/suite/compat/oracle/r/func_add_months.result b/mysql-test/suite/compat/oracle/r/func_add_months.result index 0502c20f74e..ad054d420f6 100644 --- a/mysql-test/suite/compat/oracle/r/func_add_months.result +++ b/mysql-test/suite/compat/oracle/r/func_add_months.result @@ -67,8 +67,8 @@ c2 0000-11-02 00:00:00 9999-11-02 00:00:00 EXPLAIN EXTENDED SELECT c1, ADD_MONTHS(c2, -15) FROM t1 WHERE c1 = 1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 7 100.00 Using where +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 7 100.00 Using where Warnings: Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t1`.`c2` + interval -15 month AS `ADD_MONTHS(c2, -15)` from `test`.`t1` where `test`.`t1`.`c1` = 1 SELECT ADD_MONTHS("2000-10-10", 12); diff --git a/mysql-test/suite/compat/oracle/r/func_concat.result b/mysql-test/suite/compat/oracle/r/func_concat.result index 392d579707a..584c5efc171 100644 --- a/mysql-test/suite/compat/oracle/r/func_concat.result +++ b/mysql-test/suite/compat/oracle/r/func_concat.result @@ -1,12 +1,12 @@ SET sql_mode=ORACLE; EXPLAIN EXTENDED SELECT 'a'||'b'||'c'; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select concat_operator_oracle(concat_operator_oracle('a','b'),'c') AS "'a'||'b'||'c'" EXPLAIN EXTENDED SELECT CONCAT('a'||'b'||'c'); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select concat_operator_oracle(concat_operator_oracle(concat_operator_oracle('a','b'),'c')) AS "CONCAT('a'||'b'||'c')" SELECT '' || ''; @@ -265,13 +265,13 @@ SELECT -1||0<<1 AS a FROM DUAL; a 18446744073709551596 EXPLAIN EXTENDED SELECT -1<<1||1 AS a FROM DUAL; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select -1 << concat_operator_oracle(1,1) AS "a" EXPLAIN EXTENDED SELECT -1||0<<1 AS a FROM DUAL; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select concat_operator_oracle(-1,0) << 1 AS "a" SELECT -1+1||1 AS a FROM DUAL; @@ -281,13 +281,13 @@ SELECT -1||0+1 AS a FROM DUAL; a -9 EXPLAIN EXTENDED SELECT -1+1||1 AS a FROM DUAL; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select concat_operator_oracle(-1 + 1,1) AS "a" EXPLAIN EXTENDED SELECT -1||0+1 AS a FROM DUAL; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select concat_operator_oracle(-1,0) + 1 AS "a" SELECT 1*1||-1 AS a FROM DUAL; @@ -297,13 +297,13 @@ SELECT 1||1*-1 AS a FROM DUAL; a 1-1 EXPLAIN EXTENDED SELECT 1*1||-1 AS a FROM DUAL; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select concat_operator_oracle(1 * 1,-1) AS "a" EXPLAIN EXTENDED SELECT 1||1*-1 AS a FROM DUAL; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select concat_operator_oracle(1,1 * -1) AS "a" SELECT -1^1||1 AS a FROM DUAL; @@ -313,13 +313,13 @@ SELECT -1||0^1 AS a FROM DUAL; a -11 EXPLAIN EXTENDED SELECT -1^1||1 AS a FROM DUAL; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select concat_operator_oracle(-1 ^ 1,1) AS "a" EXPLAIN EXTENDED SELECT -1||0^1 AS a FROM DUAL; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select concat_operator_oracle(-1,0 ^ 1) AS "a" # @@ -329,8 +329,8 @@ SELECT 'abc' LIKE 'a'||'%'; 'abc' LIKE 'a'||'%' 1 EXPLAIN EXTENDED SELECT 'abc' LIKE 'a'||'%'; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select 'abc' like concat_operator_oracle('a','%') AS "'abc' LIKE 'a'||'%'" SELECT 'x' FROM DUAL WHERE 11 LIKE 1||1; @@ -350,32 +350,32 @@ SELECT c1 FROM t1 WHERE c1 LIKE '%'||'b' ORDER BY ord; c1 ab EXPLAIN EXTENDED SELECT c1 FROM t1 WHERE c1 LIKE '%'||'b' ORDER BY ord; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 100.00 Using where; Using filesort Warnings: Note 1003 select "test"."t1"."c1" AS "c1" from "test"."t1" where "test"."t1"."c1" like <cache>(concat_operator_oracle('%','b')) order by "test"."t1"."ord" SELECT c1 FROM t1 WHERE c1 LIKE c2||'%'||'c' ORDER BY ord; c1 abc EXPLAIN EXTENDED SELECT c1 FROM t1 WHERE c1 LIKE c2||'%'||'c' ORDER BY ord; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 100.00 Using where; Using filesort Warnings: Note 1003 select "test"."t1"."c1" AS "c1" from "test"."t1" where "test"."t1"."c1" like concat_operator_oracle(concat_operator_oracle("test"."t1"."c2",'%'),'c') order by "test"."t1"."ord" SELECT 'x' FROM t1 WHERE c1||c2 LIKE 'aa%'; x x EXPLAIN EXTENDED SELECT 'x' FROM t1 WHERE c1||c2 LIKE 'aa%'; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 100.00 Using where Warnings: Note 1003 select 'x' AS "x" from "test"."t1" where concat_operator_oracle("test"."t1"."c1","test"."t1"."c2") like 'aa%' SELECT 'x' FROM t1 WHERE c1||c2 LIKE c2||c1; x x EXPLAIN EXTENDED SELECT 'x' FROM t1 WHERE c1||c2 LIKE c2||c1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 100.00 Using where Warnings: Note 1003 select 'x' AS "x" from "test"."t1" where concat_operator_oracle("test"."t1"."c1","test"."t1"."c2") like concat_operator_oracle("test"."t1"."c2","test"."t1"."c1") CREATE VIEW v1 AS SELECT c1, c2, c1 LIKE c2||'_' FROM t1 ORDER BY ord; @@ -385,8 +385,8 @@ a ab 0 ab ab 0 abc ab 1 EXPLAIN EXTENDED SELECT * FROM v1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using filesort +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 100.00 Using filesort Warnings: Note 1003 select "test"."t1"."c1" AS "c1","test"."t1"."c2" AS "c2","test"."t1"."c1" like concat_operator_oracle("test"."t1"."c2",'_') AS "c1 LIKE c2||'_'" from "test"."t1" order by "test"."t1"."ord" DROP VIEW v1; diff --git a/mysql-test/suite/compat/oracle/r/func_decode.result b/mysql-test/suite/compat/oracle/r/func_decode.result index b49bad93627..b573a6b100b 100644 --- a/mysql-test/suite/compat/oracle/r/func_decode.result +++ b/mysql-test/suite/compat/oracle/r/func_decode.result @@ -25,8 +25,8 @@ SELECT DECODE(12,10,'x10',11,'x11','def'); DECODE(12,10,'x10',11,'x11','def') def EXPLAIN EXTENDED SELECT DECODE(12,10,'x10',11,'x11','def'); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select decode_oracle(12,10,'x10',11,'x11','def') AS "DECODE(12,10,'x10',11,'x11','def')" CREATE TABLE decode (decode int); @@ -43,23 +43,23 @@ ERROR 42000: Incorrect parameter count in the call to native function 'DECODE_OR SELECT DECODE_ORACLE(10,10); ERROR 42000: Incorrect parameter count in the call to native function 'DECODE_ORACLE' EXPLAIN EXTENDED SELECT DECODE(12,10,'x10',11,'x11'); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select decode_oracle(12,10,'x10',11,'x11') AS "DECODE(12,10,'x10',11,'x11')" EXPLAIN EXTENDED SELECT DECODE(12,10,'x10',11,'x11','def'); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select decode_oracle(12,10,'x10',11,'x11','def') AS "DECODE(12,10,'x10',11,'x11','def')" EXPLAIN EXTENDED SELECT DECODE_ORACLE(12,10,'x10',11,'x11'); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select decode_oracle(12,10,'x10',11,'x11') AS "DECODE_ORACLE(12,10,'x10',11,'x11')" EXPLAIN EXTENDED SELECT DECODE_ORACLE(12,10,'x10',11,'x11','def'); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select decode_oracle(12,10,'x10',11,'x11','def') AS "DECODE_ORACLE(12,10,'x10',11,'x11','def')" CREATE TABLE t1 (a INT); diff --git a/mysql-test/suite/compat/oracle/r/func_length.result b/mysql-test/suite/compat/oracle/r/func_length.result index e260f5ad6da..a44fb643758 100644 --- a/mysql-test/suite/compat/oracle/r/func_length.result +++ b/mysql-test/suite/compat/oracle/r/func_length.result @@ -15,7 +15,7 @@ SELECT LENGTHB(_utf8 0xC39F), LENGTHB(CHAR(14844588 USING utf8)); LENGTHB(_utf8 0xC39F) LENGTHB(CHAR(14844588 USING utf8)) 2 3 EXPLAIN EXTENDED SELECT LENGTH('a'), LENGTHB('a'); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select char_length('a') AS "LENGTH('a')",octet_length('a') AS "LENGTHB('a')" diff --git a/mysql-test/suite/compat/oracle/r/func_misc.result b/mysql-test/suite/compat/oracle/r/func_misc.result index cf0fbed0d5e..1c2772af0eb 100644 --- a/mysql-test/suite/compat/oracle/r/func_misc.result +++ b/mysql-test/suite/compat/oracle/r/func_misc.result @@ -112,8 +112,8 @@ EXPLAIN EXTENDED SELECT SQLCode, SQLErrm; END; $$ CALL p1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select SQLCODE AS "SQLCode",SQLERRM AS "SQLErrm" DROP PROCEDURE p1; diff --git a/mysql-test/suite/compat/oracle/r/func_pad.result b/mysql-test/suite/compat/oracle/r/func_pad.result index ca7d52cd542..291b1d019fc 100644 --- a/mysql-test/suite/compat/oracle/r/func_pad.result +++ b/mysql-test/suite/compat/oracle/r/func_pad.result @@ -41,8 +41,8 @@ NULL NULL a a a. a EXPLAIN EXTENDED SELECT RPAD('a',0,'.'), LPAD('a',0,'.'), LPAD(c1,c2,c3), LPAD(c1,c2), RPAD(c1,c2,c3), RPAD(c1,c2) FROM t1 ORDER BY ord; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 7 100.00 Using filesort +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 7 100.00 Using filesort Warnings: Note 1003 select rpad_oracle('a',0,'.') AS "RPAD('a',0,'.')",lpad_oracle('a',0,'.') AS "LPAD('a',0,'.')",lpad_oracle("test"."t1"."c1","test"."t1"."c2","test"."t1"."c3") AS "LPAD(c1,c2,c3)",lpad_oracle("test"."t1"."c1","test"."t1"."c2") AS "LPAD(c1,c2)",rpad_oracle("test"."t1"."c1","test"."t1"."c2","test"."t1"."c3") AS "RPAD(c1,c2,c3)",rpad_oracle("test"."t1"."c1","test"."t1"."c2") AS "RPAD(c1,c2)" from "test"."t1" order by "test"."t1"."ord" CREATE VIEW v1 AS SELECT RPAD('a',0,'.') AS "C1", LPAD('a',0,'.') AS "C2", LPAD(c1,c2,c3) AS "C3", LPAD(c1,c2) AS "C4", RPAD(c1,c2,c3) AS "C5", RPAD(c1,c2) AS "C6" FROM t1 ORDER BY ord; diff --git a/mysql-test/suite/compat/oracle/r/func_replace.result b/mysql-test/suite/compat/oracle/r/func_replace.result index 02516096286..66db3feaad6 100644 --- a/mysql-test/suite/compat/oracle/r/func_replace.result +++ b/mysql-test/suite/compat/oracle/r/func_replace.result @@ -18,8 +18,8 @@ SELECT REPLACE('aaa','a',null) ; REPLACE('aaa','a',null) NULL EXPLAIN EXTENDED SELECT REPLACE('ab','a',null) ; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select replace_oracle('ab','a',NULL) AS "REPLACE('ab','a',null)" CREATE VIEW v1 AS SELECT REPLACE('ab','a',null) ; diff --git a/mysql-test/suite/compat/oracle/r/func_substr.result b/mysql-test/suite/compat/oracle/r/func_substr.result index 5d9fdd5f2b9..17879f07a4b 100644 --- a/mysql-test/suite/compat/oracle/r/func_substr.result +++ b/mysql-test/suite/compat/oracle/r/func_substr.result @@ -73,8 +73,8 @@ t2 CREATE TABLE "t2" ( DROP TABLE t2; DROP TABLE t1; EXPLAIN EXTENDED SELECT SUBSTR('abc',2,1) ; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select substr_oracle('abc',2,1) AS "SUBSTR('abc',2,1)" CREATE VIEW v1 AS SELECT SUBSTR('abc',2,1) ; diff --git a/mysql-test/suite/compat/oracle/r/func_time.result b/mysql-test/suite/compat/oracle/r/func_time.result index 063163400ca..9b96035b0a3 100644 --- a/mysql-test/suite/compat/oracle/r/func_time.result +++ b/mysql-test/suite/compat/oracle/r/func_time.result @@ -17,15 +17,15 @@ c1 c2 c3 EXPLAIN EXTENDED SELECT TIMESTAMP'2001-01-01 10:20:30' - INTERVAL '10' YEAR AS c1, -INTERVAL '10' YEAR + TIMESTAMP'2001-01-01 10:20:30' AS c2; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select TIMESTAMP'2001-01-01 10:20:30' - interval '10' year AS "c1",TIMESTAMP'2001-01-01 10:20:30' - interval '10' year AS "c2" EXPLAIN EXTENDED SELECT TIMESTAMP'2001-01-01 10:20:30' + INTERVAL '10' YEAR AS c1, INTERVAL '10' YEAR + TIMESTAMP'2001-01-01 10:20:30' AS c2, +INTERVAL '10' YEAR + TIMESTAMP'2001-01-01 10:20:30' AS c3; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select TIMESTAMP'2001-01-01 10:20:30' + interval '10' year AS "c1",TIMESTAMP'2001-01-01 10:20:30' + interval '10' year AS "c2",TIMESTAMP'2001-01-01 10:20:30' + interval '10' year AS "c3" diff --git a/mysql-test/suite/compat/oracle/r/func_to_char.result b/mysql-test/suite/compat/oracle/r/func_to_char.result index a4978b07579..53cf82cfde7 100644 --- a/mysql-test/suite/compat/oracle/r/func_to_char.result +++ b/mysql-test/suite/compat/oracle/r/func_to_char.result @@ -386,8 +386,8 @@ TO_CHAR('2000-11-11', c4) 2000-11-11 DROP TABLE t_b; EXPLAIN EXTENDED SELECT TO_CHAR(c1, 'YYYY-MM-DD') FROM t_to_char1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t_to_char1 ALL NULL NULL NULL NULL 4 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t_to_char1 NULL ALL NULL NULL NULL NULL 4 100.00 Warnings: Note 1003 select to_char(`test`.`t_to_char1`.`c1`,'YYYY-MM-DD') AS `TO_CHAR(c1, 'YYYY-MM-DD')` from `test`.`t_to_char1` # diff --git a/mysql-test/suite/compat/oracle/r/func_trim.result b/mysql-test/suite/compat/oracle/r/func_trim.result index bed8dadf97f..e8762ca2714 100644 --- a/mysql-test/suite/compat/oracle/r/func_trim.result +++ b/mysql-test/suite/compat/oracle/r/func_trim.result @@ -113,14 +113,14 @@ EXPLAIN EXTENDED SELECT TRIM('abc'), TRIM(BOTH 'a' FROM 'abc'), TRIM(LEADING 'a' FROM 'abc'), TRIM(TRAILING 'a' FROM 'abc') ; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select trim_oracle('abc') AS "TRIM('abc')",trim_oracle(both 'a' from 'abc') AS "TRIM(BOTH 'a' FROM 'abc')",trim_oracle(leading 'a' from 'abc') AS "TRIM(LEADING 'a' FROM 'abc')",trim_oracle(trailing 'a' from 'abc') AS "TRIM(TRAILING 'a' FROM 'abc')" EXPLAIN EXTENDED SELECT RTRIM('abc'), LTRIM('abc'); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select rtrim_oracle('abc') AS "RTRIM('abc')",ltrim_oracle('abc') AS "LTRIM('abc')" CREATE VIEW v1 AS SELECT ord,TRIM('abc'),RTRIM('abc'),LTRIM('abc'), diff --git a/mysql-test/suite/compat/oracle/r/sequence.result b/mysql-test/suite/compat/oracle/r/sequence.result index dbbabc36683..5d473e948ba 100644 --- a/mysql-test/suite/compat/oracle/r/sequence.result +++ b/mysql-test/suite/compat/oracle/r/sequence.result @@ -16,16 +16,16 @@ SELECT s1.nextval; s1.nextval 3 EXPLAIN EXTENDED SELECT s1.nextval; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select nextval("test"."s1") AS "s1.nextval" SELECT nextval(s1); nextval(s1) 4 EXPLAIN EXTENDED SELECT s1.currval; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select lastval("test"."s1") AS "s1.currval" SELECT lastval(s1); diff --git a/mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result b/mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result index 31d794c9f61..aa91ffa9948 100644 --- a/mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result +++ b/mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result @@ -731,8 +731,8 @@ END; END; $$ CALL p1(); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select rec.a@0["a"] AS "rec.a",rec.b@0["b"] AS "rec.b" DROP PROCEDURE p1; diff --git a/mysql-test/suite/compat/oracle/r/sp-cursor.result b/mysql-test/suite/compat/oracle/r/sp-cursor.result index aa9c5de8bc9..273f2fc1ce7 100644 --- a/mysql-test/suite/compat/oracle/r/sp-cursor.result +++ b/mysql-test/suite/compat/oracle/r/sp-cursor.result @@ -134,8 +134,8 @@ EXPLAIN EXTENDED SELECT c%ISOPEN, c%ROWCOUNT, c%FOUND, c%NOTFOUND; END; $$ CALL p1(); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select "c"%ISOPEN AS "c%ISOPEN","c"%ROWCOUNT AS "c%ROWCOUNT","c"%FOUND AS "c%FOUND","c"%NOTFOUND AS "c%NOTFOUND" DROP PROCEDURE p1; diff --git a/mysql-test/suite/compat/oracle/r/sp-row.result b/mysql-test/suite/compat/oracle/r/sp-row.result index 7fd986a71c8..048cf77090e 100644 --- a/mysql-test/suite/compat/oracle/r/sp-row.result +++ b/mysql-test/suite/compat/oracle/r/sp-row.result @@ -2742,8 +2742,8 @@ EXPLAIN EXTENDED SELECT rec.a, rec.b; END; $$ CALL p1(); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select rec.a@0["a"] AS "rec.a",rec.b@0["b"] AS "rec.b" DROP PROCEDURE p1; @@ -3099,8 +3099,8 @@ BEGIN EXPLAIN SELECT 1 INTO a.a; END; $$ -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used # # MDEV-14139 Anchored data types for variables # diff --git a/mysql-test/suite/compat/oracle/r/sp.result b/mysql-test/suite/compat/oracle/r/sp.result index a9a97769333..5aa0ca78ff1 100644 --- a/mysql-test/suite/compat/oracle/r/sp.result +++ b/mysql-test/suite/compat/oracle/r/sp.result @@ -1050,8 +1050,8 @@ ERROR 42000: Undeclared variable: unknown_ident # MDEV-10583 sql_mode=ORACLE: SQL%ROWCOUNT # EXPLAIN EXTENDED SELECT sql%rowcount; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select SQL%ROWCOUNT AS "sql%rowcount" CREATE TABLE t1 AS SELECT SQL%ROWCOUNT; diff --git a/mysql-test/suite/compat/oracle/r/table_value_constr.result b/mysql-test/suite/compat/oracle/r/table_value_constr.result index 108163ed782..812e592ad84 100644 --- a/mysql-test/suite/compat/oracle/r/table_value_constr.result +++ b/mysql-test/suite/compat/oracle/r/table_value_constr.result @@ -740,20 +740,20 @@ a b 1 1 explain extended select * from t1 where a in (values (1)); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 -1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1 100.00 -3 MATERIALIZED <derived2> ALL NULL NULL NULL NULL 2 100.00 -2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 +1 PRIMARY <subquery3> NULL eq_ref distinct_key distinct_key 4 func 1 100.00 +3 MATERIALIZED <derived2> NULL ALL NULL NULL NULL NULL 2 100.00 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" semi join ((values (1)) "tvc_0") where 1 explain extended select * from t1 where a in (select * from (values (1)) as tvc_0); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 -1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 -2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00 -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 +1 PRIMARY <subquery2> NULL eq_ref distinct_key distinct_key 4 func 1 100.00 +2 MATERIALIZED <derived3> NULL ALL NULL NULL NULL NULL 2 100.00 +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" semi join ((values (1)) "tvc_0") where 1 # IN-subquery with VALUES structure(s) : UNION with VALUES on the first place @@ -772,23 +772,23 @@ a b 2 5 explain extended select * from t1 where a in (values (1) union select 2); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -4 DEPENDENT SUBQUERY <derived2> ref key0 key0 4 func 2 100.00 -2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union4,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +4 DEPENDENT SUBQUERY <derived2> NULL ref key0 key0 4 func 2 100.00 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union4,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where <expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#4 */ select "tvc_0"."1" from (values (1)) "tvc_0" where <cache>("test"."t1"."a") = "tvc_0"."1" union /* select#3 */ select 2 having <cache>("test"."t1"."a") = <ref_null_helper>(2)))) explain extended select * from t1 where a in (select * from (values (1)) as tvc_0 union select 2); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 DEPENDENT SUBQUERY <derived3> ref key0 key0 4 func 2 100.00 -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -4 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union2,4> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +2 DEPENDENT SUBQUERY <derived3> NULL ref key0 key0 4 func 2 100.00 +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +4 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,4> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where <expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#2 */ select "tvc_0"."1" from (values (1)) "tvc_0" where <cache>("test"."t1"."a") = "tvc_0"."1" union /* select#4 */ select 2 having <cache>("test"."t1"."a") = <ref_null_helper>(2)))) # IN-subquery with VALUES structure(s) : UNION with VALUES on the second place @@ -807,23 +807,23 @@ a b 2 5 explain extended select * from t1 where a in (select 2 union values (1)); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -4 DEPENDENT UNION <derived3> ref key0 key0 4 func 2 100.00 -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union2,4> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +4 DEPENDENT UNION <derived3> NULL ref key0 key0 4 func 2 100.00 +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,4> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where <expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#2 */ select 2 having <cache>("test"."t1"."a") = <ref_null_helper>(2) union /* select#4 */ select "tvc_0"."1" from (values (1)) "tvc_0" where <cache>("test"."t1"."a") = "tvc_0"."1"))) explain extended select * from t1 where a in (select 2 union select * from (values (1)) tvc_0); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -3 DEPENDENT UNION <derived4> ref key0 key0 4 func 2 100.00 -4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 DEPENDENT UNION <derived4> NULL ref key0 key0 4 func 2 100.00 +4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where <expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#2 */ select 2 having <cache>("test"."t1"."a") = <ref_null_helper>(2) union /* select#3 */ select "tvc_0"."1" from (values (1)) "tvc_0" where <cache>("test"."t1"."a") = "tvc_0"."1"))) # IN-subquery with VALUES structure(s) : UNION ALL @@ -844,21 +844,21 @@ a b 7 8 explain extended select * from t1 where a in (values (1) union all select b from t1); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -4 DEPENDENT SUBQUERY <derived2> ref key0 key0 4 func 2 100.00 -2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -3 DEPENDENT UNION t1 ALL NULL NULL NULL NULL 6 100.00 Using where +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +4 DEPENDENT SUBQUERY <derived2> NULL ref key0 key0 4 func 2 100.00 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 DEPENDENT UNION t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where <expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#4 */ select "tvc_0"."1" from (values (1)) "tvc_0" where <cache>("test"."t1"."a") = "tvc_0"."1" union all /* select#3 */ select "test"."t1"."b" from "test"."t1" where <cache>("test"."t1"."a") = "test"."t1"."b"))) explain extended select * from t1 where a in (select * from (values (1)) as tvc_0 union all select b from t1); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 DEPENDENT SUBQUERY <derived3> ref key0 key0 4 func 2 100.00 -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -4 DEPENDENT UNION t1 ALL NULL NULL NULL NULL 6 100.00 Using where +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +2 DEPENDENT SUBQUERY <derived3> NULL ref key0 key0 4 func 2 100.00 +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +4 DEPENDENT UNION t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where <expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#2 */ select "tvc_0"."1" from (values (1)) "tvc_0" where <cache>("test"."t1"."a") = "tvc_0"."1" union all /* select#4 */ select "test"."t1"."b" from "test"."t1" where <cache>("test"."t1"."a") = "test"."t1"."b"))) # NOT IN subquery with VALUES structure(s) : simple case @@ -876,18 +876,18 @@ a b 7 8 explain extended select * from t1 where a not in (values (1),(2)); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -3 MATERIALIZED <derived2> ALL NULL NULL NULL NULL 2 100.00 -2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +3 MATERIALIZED <derived2> NULL ALL NULL NULL NULL NULL 2 100.00 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where !<expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a","test"."t1"."a" in ( <materialize> (/* select#3 */ select "tvc_0"."1" from (values (1),(2)) "tvc_0" ), <primary_index_lookup>("test"."t1"."a" in <temporary table> on distinct_key where "test"."t1"."a" = "<subquery3>"."1")))) explain extended select * from t1 where a not in (select * from (values (1),(2)) as tvc_0); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00 -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +2 MATERIALIZED <derived3> NULL ALL NULL NULL NULL NULL 2 100.00 +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where !<expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a","test"."t1"."a" in ( <materialize> (/* select#2 */ select "tvc_0"."1" from (values (1),(2)) "tvc_0" ), <primary_index_lookup>("test"."t1"."a" in <temporary table> on distinct_key where "test"."t1"."a" = "<subquery2>"."1")))) # NOT IN subquery with VALUES structure(s) : UNION with VALUES on the first place @@ -906,23 +906,23 @@ a b 7 8 explain extended select * from t1 where a not in (values (1) union select 2); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -4 DEPENDENT SUBQUERY <derived2> ALL NULL NULL NULL NULL 2 100.00 Using where -2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union4,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +4 DEPENDENT SUBQUERY <derived2> NULL ALL NULL NULL NULL NULL 2 100.00 Using where +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union4,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where !<expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#4 */ select "tvc_0"."1" from (values (1)) "tvc_0" where trigcond(<cache>("test"."t1"."a") = "tvc_0"."1") union /* select#3 */ select 2 having trigcond(<cache>("test"."t1"."a") = <ref_null_helper>(2))))) explain extended select * from t1 where a not in (select * from (values (1)) as tvc_0 union select 2); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 DEPENDENT SUBQUERY <derived3> ALL NULL NULL NULL NULL 2 100.00 Using where -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -4 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union2,4> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +2 DEPENDENT SUBQUERY <derived3> NULL ALL NULL NULL NULL NULL 2 100.00 Using where +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +4 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,4> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where !<expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#2 */ select "tvc_0"."1" from (values (1)) "tvc_0" where trigcond(<cache>("test"."t1"."a") = "tvc_0"."1") union /* select#4 */ select 2 having trigcond(<cache>("test"."t1"."a") = <ref_null_helper>(2))))) # NOT IN subquery with VALUES structure(s) : UNION with VALUES on the second place @@ -941,23 +941,23 @@ a b 7 8 explain extended select * from t1 where a not in (select 2 union values (1)); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -4 DEPENDENT UNION <derived3> ALL NULL NULL NULL NULL 2 100.00 Using where -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union2,4> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +4 DEPENDENT UNION <derived3> NULL ALL NULL NULL NULL NULL 2 100.00 Using where +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,4> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where !<expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#2 */ select 2 having trigcond(<cache>("test"."t1"."a") = <ref_null_helper>(2)) union /* select#4 */ select "tvc_0"."1" from (values (1)) "tvc_0" where trigcond(<cache>("test"."t1"."a") = "tvc_0"."1")))) explain extended select * from t1 where a not in (select 2 union select * from (values (1)) as tvc_0); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -3 DEPENDENT UNION <derived4> ALL NULL NULL NULL NULL 2 100.00 Using where -4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 DEPENDENT UNION <derived4> NULL ALL NULL NULL NULL NULL 2 100.00 Using where +4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where !<expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#2 */ select 2 having trigcond(<cache>("test"."t1"."a") = <ref_null_helper>(2)) union /* select#3 */ select "tvc_0"."1" from (values (1)) "tvc_0" where trigcond(<cache>("test"."t1"."a") = "tvc_0"."1")))) # ANY-subquery with VALUES structure(s) : simple case @@ -975,20 +975,20 @@ a b 2 5 explain extended select * from t1 where a = any (values (1),(2)); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 -1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1 100.00 -3 MATERIALIZED <derived2> ALL NULL NULL NULL NULL 2 100.00 -2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 +1 PRIMARY <subquery3> NULL eq_ref distinct_key distinct_key 4 func 1 100.00 +3 MATERIALIZED <derived2> NULL ALL NULL NULL NULL NULL 2 100.00 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" semi join ((values (1),(2)) "tvc_0") where 1 explain extended select * from t1 where a = any (select * from (values (1),(2)) as tvc_0); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 -1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 -2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00 -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 +1 PRIMARY <subquery2> NULL eq_ref distinct_key distinct_key 4 func 1 100.00 +2 MATERIALIZED <derived3> NULL ALL NULL NULL NULL NULL 2 100.00 +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" semi join ((values (1),(2)) "tvc_0") where 1 # ANY-subquery with VALUES structure(s) : UNION with VALUES on the first place @@ -1007,23 +1007,23 @@ a b 2 5 explain extended select * from t1 where a = any (values (1) union select 2); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -4 DEPENDENT SUBQUERY <derived2> ref key0 key0 4 func 2 100.00 -2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union4,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +4 DEPENDENT SUBQUERY <derived2> NULL ref key0 key0 4 func 2 100.00 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union4,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where <expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#4 */ select "tvc_0"."1" from (values (1)) "tvc_0" where <cache>("test"."t1"."a") = "tvc_0"."1" union /* select#3 */ select 2 having <cache>("test"."t1"."a") = <ref_null_helper>(2)))) explain extended select * from t1 where a = any (select * from (values (1)) as tvc_0 union select 2); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 DEPENDENT SUBQUERY <derived3> ref key0 key0 4 func 2 100.00 -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -4 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union2,4> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +2 DEPENDENT SUBQUERY <derived3> NULL ref key0 key0 4 func 2 100.00 +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +4 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,4> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where <expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#2 */ select "tvc_0"."1" from (values (1)) "tvc_0" where <cache>("test"."t1"."a") = "tvc_0"."1" union /* select#4 */ select 2 having <cache>("test"."t1"."a") = <ref_null_helper>(2)))) # ANY-subquery with VALUES structure(s) : UNION with VALUES on the second place @@ -1042,23 +1042,23 @@ a b 2 5 explain extended select * from t1 where a = any (select 2 union values (1)); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -4 DEPENDENT UNION <derived3> ref key0 key0 4 func 2 100.00 -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union2,4> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +4 DEPENDENT UNION <derived3> NULL ref key0 key0 4 func 2 100.00 +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,4> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where <expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#2 */ select 2 having <cache>("test"."t1"."a") = <ref_null_helper>(2) union /* select#4 */ select "tvc_0"."1" from (values (1)) "tvc_0" where <cache>("test"."t1"."a") = "tvc_0"."1"))) explain extended select * from t1 where a = any (select 2 union select * from (values (1)) as tvc_0); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -3 DEPENDENT UNION <derived4> ref key0 key0 4 func 2 100.00 -4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 DEPENDENT UNION <derived4> NULL ref key0 key0 4 func 2 100.00 +4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where <expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#2 */ select 2 having <cache>("test"."t1"."a") = <ref_null_helper>(2) union /* select#3 */ select "tvc_0"."1" from (values (1)) "tvc_0" where <cache>("test"."t1"."a") = "tvc_0"."1"))) # ALL-subquery with VALUES structure(s) : simple case @@ -1074,18 +1074,18 @@ a b 1 1 explain extended select * from t1 where a = all (values (1)); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -3 DEPENDENT SUBQUERY <derived2> ALL NULL NULL NULL NULL 2 100.00 Using where -2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +3 DEPENDENT SUBQUERY <derived2> NULL ALL NULL NULL NULL NULL 2 100.00 Using where +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where <not>(<expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#3 */ select "tvc_0"."1" from (values (1)) "tvc_0" where trigcond(<cache>("test"."t1"."a") <> "tvc_0"."1"))))) explain extended select * from t1 where a = all (select * from (values (1)) as tvc_0); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 DEPENDENT SUBQUERY <derived3> ALL NULL NULL NULL NULL 2 100.00 Using where -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +2 DEPENDENT SUBQUERY <derived3> NULL ALL NULL NULL NULL NULL 2 100.00 Using where +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where <not>(<expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#2 */ select "tvc_0"."1" from (values (1)) "tvc_0" where trigcond(<cache>("test"."t1"."a") <> "tvc_0"."1"))))) # ALL-subquery with VALUES structure(s) : UNION with VALUES on the first place @@ -1102,23 +1102,23 @@ a b 1 1 explain extended select * from t1 where a = all (values (1) union select 1); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -4 DEPENDENT SUBQUERY <derived2> ALL NULL NULL NULL NULL 2 100.00 Using where -2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union4,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +4 DEPENDENT SUBQUERY <derived2> NULL ALL NULL NULL NULL NULL 2 100.00 Using where +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union4,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where <not>(<expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#4 */ select "tvc_0"."1" from (values (1)) "tvc_0" where trigcond(<cache>("test"."t1"."a") <> "tvc_0"."1") union /* select#3 */ select 1 having trigcond(<cache>("test"."t1"."a") <> <ref_null_helper>(1)))))) explain extended select * from t1 where a = all (select * from (values (1)) as tvc_0 union select 1); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 DEPENDENT SUBQUERY <derived3> ALL NULL NULL NULL NULL 2 100.00 Using where -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -4 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union2,4> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +2 DEPENDENT SUBQUERY <derived3> NULL ALL NULL NULL NULL NULL 2 100.00 Using where +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +4 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,4> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where <not>(<expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#2 */ select "tvc_0"."1" from (values (1)) "tvc_0" where trigcond(<cache>("test"."t1"."a") <> "tvc_0"."1") union /* select#4 */ select 1 having trigcond(<cache>("test"."t1"."a") <> <ref_null_helper>(1)))))) # ALL-subquery with VALUES structure(s) : UNION with VALUES on the second place @@ -1135,23 +1135,23 @@ a b 1 1 explain extended select * from t1 where a = any (select 1 union values (1)); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -4 DEPENDENT UNION <derived3> ref key0 key0 4 func 2 100.00 -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union2,4> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +4 DEPENDENT UNION <derived3> NULL ref key0 key0 4 func 2 100.00 +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,4> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where <expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#2 */ select 1 having <cache>("test"."t1"."a") = <ref_null_helper>(1) union /* select#4 */ select "tvc_0"."1" from (values (1)) "tvc_0" where <cache>("test"."t1"."a") = "tvc_0"."1"))) explain extended select * from t1 where a = any (select 1 union select * from (values (1)) as tvc_0); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -3 DEPENDENT UNION <derived4> ref key0 key0 4 func 2 100.00 -4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 100.00 Using where +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 DEPENDENT UNION <derived4> NULL ref key0 key0 4 func 2 100.00 +4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select "test"."t1"."a" AS "a","test"."t1"."b" AS "b" from "test"."t1" where <expr_cache><"test"."t1"."a">(<in_optimizer>("test"."t1"."a",<exists>(/* select#2 */ select 1 having <cache>("test"."t1"."a") = <ref_null_helper>(1) union /* select#3 */ select "tvc_0"."1" from (values (1)) "tvc_0" where <cache>("test"."t1"."a") = "tvc_0"."1"))) # prepare statement that uses VALUES structure(s): single VALUES structure @@ -1294,8 +1294,8 @@ deallocate prepare stmt1; # explain query that uses VALUES structure(s): single VALUES structure explain values (1,2); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used explain format=json values (1,2); EXPLAIN @@ -1322,26 +1322,26 @@ explain select 1,2 union values (1,2),(3,4); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL explain values (1,2),(3,4) union select 1,2; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL explain values (5,6) union values (1,2),(3,4); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL explain format=json select 1,2 union @@ -1444,11 +1444,11 @@ union values (3,4) union values (1,2); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL No tables used -3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2,3> ALL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2,3> NULL ALL NULL NULL NULL NULL NULL explain format=json select 1,2 union @@ -1497,24 +1497,24 @@ explain select 1,2 union values (1,2),(3,4); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL explain values (1,2),(3,4) union all select 1,2; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used explain values (1,2) union all values (1,2),(3,4); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used explain format=json values (1,2),(3,4) union all @@ -1617,10 +1617,10 @@ union all values (3,4) union all values (1,2); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL No tables used -3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used explain format=json select 1,2 union all @@ -1667,8 +1667,8 @@ EXPLAIN # analyze query that uses VALUES structure(s): single VALUES structure analyze values (1,2); -id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows r_rows filtered r_filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used analyze format=json values (1,2); ANALYZE @@ -1697,26 +1697,26 @@ analyze select 1,2 union values (1,2),(3,4); -id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL 2.00 NULL NULL +id select_type table partitions type possible_keys key key_len ref rows r_rows filtered r_filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL 2.00 NULL NULL analyze values (1,2),(3,4) union select 1,2; -id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL 2.00 NULL NULL +id select_type table partitions type possible_keys key key_len ref rows r_rows filtered r_filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL 2.00 NULL NULL analyze values (5,6) union values (1,2),(3,4); -id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL 3.00 NULL NULL +id select_type table partitions type possible_keys key key_len ref rows r_rows filtered r_filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL 3.00 NULL NULL analyze format=json select 1,2 union @@ -1825,11 +1825,11 @@ union values (3,4) union values (1,2); -id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used -3 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2,3> ALL NULL NULL NULL NULL NULL 2.00 NULL NULL +id select_type table partitions type possible_keys key key_len ref rows r_rows filtered r_filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2,3> NULL ALL NULL NULL NULL NULL NULL 2.00 NULL NULL analyze format=json select 1,2 union @@ -1880,24 +1880,24 @@ analyze select 1,2 union values (1,2),(3,4); -id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL 2.00 NULL NULL +id select_type table partitions type possible_keys key key_len ref rows r_rows filtered r_filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL 2.00 NULL NULL analyze values (1,2),(3,4) union all select 1,2; -id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows r_rows filtered r_filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used analyze values (1,2) union all values (1,2),(3,4); -id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows r_rows filtered r_filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used analyze format=json values (1,2),(3,4) union all @@ -2006,10 +2006,10 @@ union all values (3,4) union all values (1,2); -id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used -3 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows r_rows filtered r_filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used analyze format=json select 1,2 union all @@ -2114,9 +2114,9 @@ select * from (values (7), (5), (8), (1), (3), (8), (1)) t; 8 1 explain select * from (values (7), (5), (8), (1), (3), (8), (1)) t; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 7 -2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 7 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used select * from (values (1,11), (7,77), (3,31), (4,42)) t; 1 11 1 11 @@ -2124,9 +2124,9 @@ select * from (values (1,11), (7,77), (3,31), (4,42)) t; 3 31 4 42 explain select * from (values (1,11), (7,77), (3,31), (4,42)) t; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 4 -2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 4 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used select * from (values (7), (5), (8), (1) union values (3), (8), (1)) t; 7 7 @@ -2135,11 +2135,11 @@ select * from (values (7), (5), (8), (1) union values (3), (8), (1)) t; 1 3 explain select * from (values (7), (5), (8), (1) union values (3), (8), (1)) t; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 7 -2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used -3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 7 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,3> NULL ALL NULL NULL NULL NULL NULL select * from (values (7), (5), (8), (1) union select * from t1) t; 7 7 @@ -2150,11 +2150,11 @@ select * from (values (7), (5), (8), (1) union select * from t1) t; 3 2 explain select * from (values (7), (5), (8), (1) union select * from t1) t; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 7 -2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used -3 UNION t1 ALL NULL NULL NULL NULL 3 -NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 7 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION t1 NULL ALL NULL NULL NULL NULL 3 +NULL UNION RESULT <union2,3> NULL ALL NULL NULL NULL NULL NULL drop table t1; # # MDEV-16930: expression in the first row of TVC specifying derived table @@ -2191,8 +2191,8 @@ values (5), (7), (1), (3), (4) limit 2; 5 7 explain extended values (5), (7), (1), (3), (4) limit 2; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 values (5),(7),(1),(3),(4) limit 2 values (5), (7), (1), (3), (4) limit 2 offset 1; @@ -2200,8 +2200,8 @@ values (5), (7), (1), (3), (4) limit 2 offset 1; 7 1 explain extended values (5), (7), (1), (3), (4) limit 2 offset 1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 values (5),(7),(1),(3),(4) limit 1,2 values (5), (7), (1), (3), (4) order by 1 limit 2; @@ -2209,9 +2209,9 @@ values (5), (7), (1), (3), (4) order by 1 limit 2; 1 3 explain extended values (5), (7), (1), (3), (4) order by 1 limit 2; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNIT RESULT <unit1> ALL NULL NULL NULL NULL NULL NULL Using filesort +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNIT RESULT <unit1> NULL ALL NULL NULL NULL NULL NULL NULL Using filesort Warnings: Note 1003 values (5),(7),(1),(3),(4) order by 1 limit 2 values (5), (7), (1), (3), (4) order by 1 limit 2 offset 1; @@ -2219,9 +2219,9 @@ values (5), (7), (1), (3), (4) order by 1 limit 2 offset 1; 3 4 explain extended values (5), (7), (1), (3), (4) order by 1 limit 2 offset 1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNIT RESULT <unit1> ALL NULL NULL NULL NULL NULL NULL Using filesort +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNIT RESULT <unit1> NULL ALL NULL NULL NULL NULL NULL NULL Using filesort Warnings: Note 1003 values (5),(7),(1),(3),(4) order by 1 limit 1,2 values (5), (7), (1), (3), (4) order by 1; @@ -2232,9 +2232,9 @@ values (5), (7), (1), (3), (4) order by 1; 5 7 explain extended values (5), (7), (1), (3), (4) order by 1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNIT RESULT <unit1> ALL NULL NULL NULL NULL NULL NULL Using filesort +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNIT RESULT <unit1> NULL ALL NULL NULL NULL NULL NULL NULL Using filesort Warnings: Note 1003 values (5),(7),(1),(3),(4) order by 1 values (5,90), (7,20), (1,70), (3,50), (4,10) order by 2; @@ -2245,9 +2245,9 @@ values (5,90), (7,20), (1,70), (3,50), (4,10) order by 2; 1 70 5 90 explain extended values (5,90), (7,20), (1,70), (3,50), (4,10) order by 2; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNIT RESULT <unit1> ALL NULL NULL NULL NULL NULL NULL Using filesort +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNIT RESULT <unit1> NULL ALL NULL NULL NULL NULL NULL NULL Using filesort Warnings: Note 1003 values (5,90),(7,20),(1,70),(3,50),(4,10) order by 2 select 2 union (values (5), (7), (1), (3), (4) limit 2); @@ -2256,10 +2256,10 @@ select 2 union (values (5), (7), (1), (3), (4) limit 2); 5 7 explain extended select 2 union (values (5), (7), (1), (3), (4) limit 2); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select 2 AS "2" union (values (5),(7),(1),(3),(4) limit 2) select 2 union (values (5), (7), (1), (3), (4) limit 2 offset 1); @@ -2268,10 +2268,10 @@ select 2 union (values (5), (7), (1), (3), (4) limit 2 offset 1); 7 1 explain extended select 2 union (values (5), (7), (1), (3), (4) limit 2 offset 1); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select 2 AS "2" union (values (5),(7),(1),(3),(4) limit 1,2) select 2 union (values (5), (7), (1), (3), (4) order by 1 limit 2); @@ -2280,11 +2280,11 @@ select 2 union (values (5), (7), (1), (3), (4) order by 1 limit 2); 1 3 explain extended select 2 union (values (5), (7), (1), (3), (4) order by 1 limit 2); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -3 UNION <derived2> ALL NULL NULL NULL NULL 5 100.00 Using filesort -2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION <derived2> NULL ALL NULL NULL NULL NULL 5 100.00 Using filesort +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select 2 AS "2" union (/* select#3 */ select "tvc_0"."5" AS "5" from (values (5),(7),(1),(3),(4)) "tvc_0" order by 1 limit 2) select 2 union (values (5), (7), (1), (3), (4) order by 1 limit 2 offset 1); @@ -2293,11 +2293,11 @@ select 2 union (values (5), (7), (1), (3), (4) order by 1 limit 2 offset 1); 3 4 explain extended select 2 union (values (5), (7), (1), (3), (4) order by 1 limit 2 offset 1); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -3 UNION <derived2> ALL NULL NULL NULL NULL 5 100.00 Using filesort -2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION <derived2> NULL ALL NULL NULL NULL NULL 5 100.00 Using filesort +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select 2 AS "2" union (/* select#3 */ select "tvc_0"."5" AS "5" from (values (5),(7),(1),(3),(4)) "tvc_0" order by 1 limit 1,2) (values (5), (7), (1), (3), (4) limit 2) union select 2; @@ -2306,10 +2306,10 @@ Note 1003 /* select#1 */ select 2 AS "2" union (/* select#3 */ select "tvc_0"."5 7 2 explain extended (values (5), (7), (1), (3), (4) limit 2) union select 2; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 (values (5),(7),(1),(3),(4) limit 2) union /* select#2 */ select 2 AS "2" (values (5), (7), (1), (3), (4) limit 2 offset 1) union select 2; @@ -2318,10 +2318,10 @@ Note 1003 (values (5),(7),(1),(3),(4) limit 2) union /* select#2 */ select 2 AS 1 2 explain extended (values (5), (7), (1), (3), (4) limit 2 offset 1) union select 2; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 (values (5),(7),(1),(3),(4) limit 1,2) union /* select#2 */ select 2 AS "2" (values (5), (7), (1), (3), (4) order by 1 limit 2) union select 2; @@ -2330,11 +2330,11 @@ Note 1003 (values (5),(7),(1),(3),(4) limit 1,2) union /* select#2 */ select 2 A 3 2 explain extended (values (5), (7), (1), (3), (4) order by 1 limit 2) union select 2; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived3> NULL ALL NULL NULL NULL NULL 5 100.00 Using filesort +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 (/* select#1 */ select "tvc_0"."5" AS "5" from (values (5),(7),(1),(3),(4)) "tvc_0" order by 1 limit 2) union /* select#2 */ select 2 AS "2" (values (5), (7), (1), (3), (4) order by 1 limit 2 offset 1) union select 2; @@ -2343,11 +2343,11 @@ Note 1003 (/* select#1 */ select "tvc_0"."5" AS "5" from (values (5),(7),(1),(3) 4 2 explain extended (values (5), (7), (1), (3), (4) order by 1 limit 2 offset 1) union select 2; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived3> NULL ALL NULL NULL NULL NULL 5 100.00 Using filesort +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 (/* select#1 */ select "tvc_0"."5" AS "5" from (values (5),(7),(1),(3),(4)) "tvc_0" order by 1 limit 1,2) union /* select#2 */ select 2 AS "2" select 3 union all (values (5), (7), (1), (3), (4) limit 2 offset 3); @@ -2356,9 +2356,9 @@ select 3 union all (values (5), (7), (1), (3), (4) limit 2 offset 3); 3 4 explain extended select 3 union all (values (5), (7), (1), (3), (4) limit 2 offset 3); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 /* select#1 */ select 3 AS "3" union all (values (5),(7),(1),(3),(4) limit 3,2) (values (5), (7), (1), (3), (4) limit 2 offset 3) union all select 3; @@ -2367,9 +2367,9 @@ Note 1003 /* select#1 */ select 3 AS "3" union all (values (5),(7),(1),(3),(4) l 4 3 explain extended (values (5), (7), (1), (3), (4) limit 2 offset 3) union all select 3; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 (values (5),(7),(1),(3),(4) limit 3,2) union all /* select#2 */ select 3 AS "3" select 3 union all (values (5), (7), (1), (3), (4) order by 1 limit 2); @@ -2378,11 +2378,11 @@ select 3 union all (values (5), (7), (1), (3), (4) order by 1 limit 2); 1 3 explain extended select 3 union all (values (5), (7), (1), (3), (4) order by 1 limit 2); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -3 UNION <derived2> ALL NULL NULL NULL NULL 5 100.00 Using filesort -2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION <derived2> NULL ALL NULL NULL NULL NULL 5 100.00 Using filesort +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 /* select#1 */ select 3 AS "3" union all (/* select#3 */ select "tvc_0"."5" AS "5" from (values (5),(7),(1),(3),(4)) "tvc_0" order by 1 limit 2) (values (5), (7), (1), (3), (4) order by 1 limit 2) union all select 3; @@ -2391,11 +2391,11 @@ Note 1003 /* select#1 */ select 3 AS "3" union all (/* select#3 */ select "tvc_0 3 3 explain extended (values (5), (7), (1), (3), (4) order by 1 limit 2) union all select 3; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived3> NULL ALL NULL NULL NULL NULL 5 100.00 Using filesort +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 (/* select#1 */ select "tvc_0"."5" AS "5" from (values (5),(7),(1),(3),(4)) "tvc_0" order by 1 limit 2) union all /* select#2 */ select 3 AS "3" ( values (5), (7), (1), (3), (4) limit 2 offset 1 ) @@ -2408,11 +2408,11 @@ union explain extended ( values (5), (7), (1), (3), (4) limit 2 offset 1 ) union ( values (5), (7), (1), (3), (4) order by 1 limit 2 ); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -3 UNION <derived2> ALL NULL NULL NULL NULL 5 100.00 Using filesort -2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION <derived2> NULL ALL NULL NULL NULL NULL 5 100.00 Using filesort +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 (values (5),(7),(1),(3),(4) limit 1,2) union (/* select#3 */ select "tvc_0"."5" AS "5" from (values (5),(7),(1),(3),(4)) "tvc_0" order by 1 limit 2) ( values (5), (7), (1), (3), (4) limit 2 offset 1 ) @@ -2426,11 +2426,11 @@ union all explain extended ( values (5), (7), (1), (3), (4) limit 2 offset 1 ) union all ( values (5), (7), (1), (3), (4) order by 1 limit 2 ); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -3 UNION <derived2> ALL NULL NULL NULL NULL 5 100.00 Using filesort -2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION <derived2> NULL ALL NULL NULL NULL NULL 5 100.00 Using filesort +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 (values (5),(7),(1),(3),(4) limit 1,2) union all (/* select#3 */ select "tvc_0"."5" AS "5" from (values (5),(7),(1),(3),(4)) "tvc_0" order by 1 limit 2) (values (5), (7), (1), (3), (4) limit 2 offset 3) union all select 3 order by 1; @@ -2439,10 +2439,10 @@ Note 1003 (values (5),(7),(1),(3),(4) limit 1,2) union all (/* select#3 */ selec 3 4 explain extended (values (5), (7), (1), (3), (4) limit 2 offset 3) union all select 3 order by 1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL NULL Using filesort Warnings: Note 1003 (values (5),(7),(1),(3),(4) limit 3,2) union all /* select#2 */ select 3 AS "3" order by 1 (values (5), (7), (1), (3), (4) order by 1 limit 3 offset 1) union all select 3 order by 1; @@ -2452,11 +2452,11 @@ Note 1003 (values (5),(7),(1),(3),(4) limit 3,2) union all /* select#2 */ select 4 5 explain extended (values (5), (7), (1), (3), (4) order by 1 limit 3 offset 1) union all select 3 order by 1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived3> NULL ALL NULL NULL NULL NULL 5 100.00 Using filesort +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL NULL Using filesort Warnings: Note 1003 (/* select#1 */ select "tvc_0"."5" AS "5" from (values (5),(7),(1),(3),(4)) "tvc_0" order by 1 limit 1,3) union all /* select#2 */ select 3 AS "3" order by 1 (values (5), (7), (1), (3), (4) order by 1 limit 3 offset 1) union all select 3 @@ -2466,11 +2466,11 @@ order by 1 limit 2 offset 1; 4 explain extended (values (5), (7), (1), (3), (4) order by 1 limit 3 offset 1) union all select 3 order by 1 limit 2 offset 1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using filesort -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used -2 UNION NULL NULL NULL NULL NULL NULL NULL NULL No tables used -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived3> NULL ALL NULL NULL NULL NULL 5 100.00 Using filesort +3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 UNION NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL NULL Using filesort Warnings: Note 1003 (/* select#1 */ select "tvc_0"."5" AS "5" from (values (5),(7),(1),(3),(4)) "tvc_0" order by 1 limit 1,3) union all /* select#2 */ select 3 AS "3" order by 1 limit 1,2 values (5,90), (7,20), (1,70), (3,50), (4,10) order by 3; diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result index 90d72b451b9..e9de8e66c7a 100644 --- a/mysql-test/suite/funcs_1/r/innodb_views.result +++ b/mysql-test/suite/funcs_1/r/innodb_views.result @@ -21428,8 +21428,8 @@ SELECT * FROM test3.v32; f1 1.000 EXPLAIN SELECT * FROM test3.v32; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 1 DROP VIEW test3.v0; SHOW CREATE VIEW test3.v32; View Create View character_set_client collation_connection diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result index 417c0e85188..dbc48e95177 100644 --- a/mysql-test/suite/funcs_1/r/memory_views.result +++ b/mysql-test/suite/funcs_1/r/memory_views.result @@ -21430,8 +21430,8 @@ SELECT * FROM test3.v32; f1 1.000 EXPLAIN SELECT * FROM test3.v32; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL system NULL NULL NULL NULL 1 DROP VIEW test3.v0; SHOW CREATE VIEW test3.v32; View Create View character_set_client collation_connection diff --git a/mysql-test/suite/gcol/inc/gcol_keys.inc b/mysql-test/suite/gcol/inc/gcol_keys.inc index e5ac0afd92a..cf0612b0d0c 100644 --- a/mysql-test/suite/gcol/inc/gcol_keys.inc +++ b/mysql-test/suite/gcol/inc/gcol_keys.inc @@ -203,7 +203,7 @@ INSERT INTO c ( col_time_nokey,col_datetime_nokey,col_varchar_nokey) values ('16:21:18.052408','2001-11-08 21:02:12.009395', 'x'), ('18:56:33.027423','2003-04-01 00:00:00', 'i'); ---replace_column 9 x 10 x +--replace_column 10 x 11 x EXPLAIN SELECT outr.col_time_key AS x FROM c as outr diff --git a/mysql-test/suite/gcol/inc/gcol_view.inc b/mysql-test/suite/gcol/inc/gcol_view.inc index 85caa58c400..6f9ce673199 100644 --- a/mysql-test/suite/gcol/inc/gcol_view.inc +++ b/mysql-test/suite/gcol/inc/gcol_view.inc @@ -29,20 +29,20 @@ select d,e from v1; select is_updatable from information_schema.views where table_name='v1'; # view with different algorithms (explain output differs) ---replace_column 9 X +--replace_column 10 X explain select d,e from v1; create algorithm=temptable view v2 (d,e) as select abs(b), abs(c) from t1; show create view v2; --sorted_result select d,e from v2; ---replace_column 9 X +--replace_column 10 X explain select d,e from v2; # VIEW on VIEW test create view v3 (d,e) as select d*2, e*2 from v1; --sorted_result select * from v3; ---replace_column 9 X +--replace_column 10 X explain select * from v3; drop view v1,v2,v3; @@ -58,7 +58,7 @@ insert into t1 (a) values (1), (2), (3), (1), (2), (3); create view v1 as select distinct b from t1; --sorted_result select * from v1; ---replace_column 9 X +--replace_column 10 X explain select * from v1; --sorted_result select * from t1; @@ -66,7 +66,7 @@ drop view v1; create view v1 as select distinct c from t1; --sorted_result select * from v1; ---replace_column 9 X +--replace_column 10 X explain select * from v1; --sorted_result select * from t1; @@ -82,13 +82,13 @@ create table t1 (a int not null, insert into t1 (a) values (1), (2), (3), (4); create view v1 as select b+1 from t1 order by 1 desc limit 2; select * from v1; ---replace_column 9 X +--replace_column 10 X explain select * from v1; drop view v1; create view v1 as select c+1 from t1 order by 1 desc limit 2; --sorted_result select * from v1; ---replace_column 9 X +--replace_column 10 X explain select * from v1; drop view v1; drop table t1; diff --git a/mysql-test/suite/gcol/r/gcol_bugfixes.result b/mysql-test/suite/gcol/r/gcol_bugfixes.result index 6d93c63fc2f..823dab125ae 100644 --- a/mysql-test/suite/gcol/r/gcol_bugfixes.result +++ b/mysql-test/suite/gcol/r/gcol_bugfixes.result @@ -169,8 +169,8 @@ ON ( p1 . gcol_int_key = p2 . pk ) ) AND gp1 . col_varchar_nokey = 'b' HAVING g1 > 6; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables SELECT gp1 . gcol_datetime_key AS g1 FROM cc AS gp1 LEFT JOIN c AS gp2 ON ( gp2 . gcol_datetime_key <> gp1 . @@ -240,8 +240,8 @@ col_int_nokey <> 9 AND pk >= 8 HAVING x > '2000-02-06' ORDER BY col_time_nokey, pk; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE c index_merge PRIMARY,col_varchar_key,col_varchar_key_2 col_varchar_key,PRIMARY 5,4 NULL 2 Using union(col_varchar_key,PRIMARY); Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE c NULL index_merge PRIMARY,col_varchar_key,col_varchar_key_2 col_varchar_key,PRIMARY 5,4 NULL 2 Using union(col_varchar_key,PRIMARY); Using where SELECT COUNT(DISTINCT col_varchar_key) AS x FROM c WHERE col_varchar_key IN ('rr', 'rr') OR @@ -333,8 +333,8 @@ test.t1 analyze status OK # Make sure the index is correct. That's kinda important. EXPLAIN SELECT c FROM t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 5 NULL 5 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c 5 NULL 5 Using index SELECT c FROM t1; c 1 @@ -371,16 +371,16 @@ b CHAR(2) GENERATED ALWAYS AS (a IN (1)) VIRTUAL, KEY(c,b(1))); INSERT INTO v (a,c) VALUES (1,1); EXPLAIN SELECT 1 FROM t WHERE ( SELECT 1 FROM t ) >=ANY( SELECT c FROM v ); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE -3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away -2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT 1 FROM t WHERE ( SELECT 1 FROM t ) >=ANY( SELECT c FROM v ); 1 EXPLAIN SELECT (SELECT MAX(c) FROM v); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL No tables used +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away SELECT (SELECT MAX(c) FROM v); (SELECT MAX(c) FROM v) 1 @@ -637,11 +637,11 @@ ucrgafld VARCHAR(30) COLLATE UTF8_BIN NOT NULL DEFAULT SUBSTRING_INDEX(USER(),'@',1) ); EXPLAIN UPDATE gafld SET nuigafld = 0 WHERE nuigafld = 10; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE gafld ALL NULL NULL NULL NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE gafld NULL ALL NULL NULL NULL NULL 1 Using where EXPLAIN UPDATE gafld SET nuigafld = 0 WHERE nuigafld = 10; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE gafld ALL NULL NULL NULL NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE gafld NULL ALL NULL NULL NULL NULL 1 Using where DROP TABLE gafld; # (duplicate) MDEV-17653 replace into generated columns is unstable # Some columns are snipped from the MDEV test diff --git a/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result b/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result index 193ef064da8..d5cc886c952 100644 --- a/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result @@ -494,10 +494,10 @@ INNR1.col_varchar_key AS y FROM bb AS INNR1 WHERE OUTR1.pk = 1 ); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY OUTR1 const PRIMARY PRIMARY 4 const 1 -1 PRIMARY INNR1 ALL NULL NULL NULL NULL 2 Using where; FirstMatch(OUTR1) -1 PRIMARY OUTR2 index NULL PRIMARY 4 NULL 2 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY OUTR1 NULL const PRIMARY PRIMARY 4 const 1 +1 PRIMARY INNR1 NULL ALL NULL NULL NULL NULL 2 Using where; FirstMatch(OUTR1) +1 PRIMARY OUTR2 NULL index NULL PRIMARY 4 NULL 2 Using index DROP TABLE IF EXISTS b,bb,d; # # Bug#21216067 ASSERTION FAILED ROW_UPD_SEC_INDEX_ENTRY (INNOBASE/ROW/ROW0UPD.CC:2103) @@ -536,9 +536,9 @@ INSERT INTO C (col_varchar_nokey) VALUES ('c'); EXPLAIN UPDATE C AS OUTR1, C AS OUTR2 SET OUTR1.`col_varchar_nokey` = 'f', OUTR2.`col_varchar_nokey` = "a"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE OUTR1 ALL NULL NULL NULL NULL 1 -1 SIMPLE OUTR2 ALL NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE OUTR1 NULL ALL NULL NULL NULL NULL 1 +1 SIMPLE OUTR2 NULL ALL NULL NULL NULL NULL 1 UPDATE C AS OUTR1, C AS OUTR2 SET OUTR1.`col_varchar_nokey` = 'f', OUTR2.`col_varchar_nokey` = "a"; @@ -557,9 +557,9 @@ INSERT INTO C (col_varchar_nokey) VALUES ('c'); EXPLAIN UPDATE C AS OUTR1, C AS OUTR2 SET OUTR1.`col_varchar_nokey` = 'f', OUTR2.`col_varchar_nokey` = "a"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE OUTR1 ALL NULL NULL NULL NULL 1 -1 SIMPLE OUTR2 ALL NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE OUTR1 NULL ALL NULL NULL NULL NULL 1 +1 SIMPLE OUTR2 NULL ALL NULL NULL NULL NULL 1 UPDATE C AS OUTR1, C AS OUTR2 SET OUTR1.`col_varchar_nokey` = 'f', OUTR2.`col_varchar_nokey` = "a"; @@ -577,9 +577,9 @@ INSERT INTO C (col_varchar_nokey) VALUES ('c'); EXPLAIN UPDATE C AS OUTR1, C AS OUTR2 SET OUTR1.`col_varchar_nokey` = 'f', OUTR2.`col_varchar_nokey` = "a"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE OUTR1 ALL NULL NULL NULL NULL 1 -1 SIMPLE OUTR2 ALL NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE OUTR1 NULL ALL NULL NULL NULL NULL 1 +1 SIMPLE OUTR2 NULL ALL NULL NULL NULL NULL 1 UPDATE C AS OUTR1, C AS OUTR2 SET OUTR1.`col_varchar_nokey` = 'f', OUTR2.`col_varchar_nokey` = "a"; @@ -598,9 +598,9 @@ INSERT INTO C (col_varchar_nokey) VALUES ('c'); EXPLAIN UPDATE C AS OUTR1, C AS OUTR2 SET OUTR1.`col_varchar_nokey` = 'f', OUTR2.`col_varchar_nokey` = "a"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE OUTR1 ALL NULL NULL NULL NULL 1 -1 SIMPLE OUTR2 ALL NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE OUTR1 NULL ALL NULL NULL NULL NULL 1 +1 SIMPLE OUTR2 NULL ALL NULL NULL NULL NULL 1 UPDATE C AS OUTR1, C AS OUTR2 SET OUTR1.`col_varchar_nokey` = 'f', OUTR2.`col_varchar_nokey` = "a"; diff --git a/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result b/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result index 98db88abf4b..75aba0fc35a 100644 --- a/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result @@ -416,10 +416,10 @@ INNR1.col_varchar_key AS y FROM bb AS INNR1 WHERE OUTR1.pk = 1 ); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY OUTR1 const PRIMARY PRIMARY 4 const 1 -1 PRIMARY INNR1 ALL NULL NULL NULL NULL 2 Using where; FirstMatch(OUTR1) -1 PRIMARY OUTR2 index NULL PRIMARY 4 NULL 2 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY OUTR1 NULL const PRIMARY PRIMARY 4 const 1 +1 PRIMARY INNR1 NULL ALL NULL NULL NULL NULL 2 Using where; FirstMatch(OUTR1) +1 PRIMARY OUTR2 NULL index NULL PRIMARY 4 NULL 2 Using index DROP TABLE IF EXISTS b,bb,d; # # Bug#21216067 ASSERTION FAILED ROW_UPD_SEC_INDEX_ENTRY (INNOBASE/ROW/ROW0UPD.CC:2103) @@ -458,9 +458,9 @@ INSERT INTO C (col_varchar_nokey) VALUES ('c'); EXPLAIN UPDATE C AS OUTR1, C AS OUTR2 SET OUTR1.`col_varchar_nokey` = 'f', OUTR2.`col_varchar_nokey` = "a"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE OUTR1 system NULL NULL NULL NULL 1 -1 SIMPLE OUTR2 system NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE OUTR1 NULL system NULL NULL NULL NULL 1 +1 SIMPLE OUTR2 NULL system NULL NULL NULL NULL 1 UPDATE C AS OUTR1, C AS OUTR2 SET OUTR1.`col_varchar_nokey` = 'f', OUTR2.`col_varchar_nokey` = "a"; @@ -479,9 +479,9 @@ INSERT INTO C (col_varchar_nokey) VALUES ('c'); EXPLAIN UPDATE C AS OUTR1, C AS OUTR2 SET OUTR1.`col_varchar_nokey` = 'f', OUTR2.`col_varchar_nokey` = "a"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE OUTR1 system NULL NULL NULL NULL 1 -1 SIMPLE OUTR2 system NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE OUTR1 NULL system NULL NULL NULL NULL 1 +1 SIMPLE OUTR2 NULL system NULL NULL NULL NULL 1 UPDATE C AS OUTR1, C AS OUTR2 SET OUTR1.`col_varchar_nokey` = 'f', OUTR2.`col_varchar_nokey` = "a"; @@ -499,9 +499,9 @@ INSERT INTO C (col_varchar_nokey) VALUES ('c'); EXPLAIN UPDATE C AS OUTR1, C AS OUTR2 SET OUTR1.`col_varchar_nokey` = 'f', OUTR2.`col_varchar_nokey` = "a"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE OUTR1 system NULL NULL NULL NULL 1 -1 SIMPLE OUTR2 system NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE OUTR1 NULL system NULL NULL NULL NULL 1 +1 SIMPLE OUTR2 NULL system NULL NULL NULL NULL 1 UPDATE C AS OUTR1, C AS OUTR2 SET OUTR1.`col_varchar_nokey` = 'f', OUTR2.`col_varchar_nokey` = "a"; @@ -520,9 +520,9 @@ INSERT INTO C (col_varchar_nokey) VALUES ('c'); EXPLAIN UPDATE C AS OUTR1, C AS OUTR2 SET OUTR1.`col_varchar_nokey` = 'f', OUTR2.`col_varchar_nokey` = "a"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE OUTR1 system NULL NULL NULL NULL 1 -1 SIMPLE OUTR2 system NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE OUTR1 NULL system NULL NULL NULL NULL 1 +1 SIMPLE OUTR2 NULL system NULL NULL NULL NULL 1 UPDATE C AS OUTR1, C AS OUTR2 SET OUTR1.`col_varchar_nokey` = 'f', OUTR2.`col_varchar_nokey` = "a"; diff --git a/mysql-test/suite/gcol/r/gcol_keys_innodb.result b/mysql-test/suite/gcol/r/gcol_keys_innodb.result index c2027d21442..ac808f66c21 100644 --- a/mysql-test/suite/gcol/r/gcol_keys_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_keys_innodb.result @@ -204,8 +204,8 @@ WHERE outr.col_varchar_nokey in ('c', 'x', 'i') AND (outr.col_time_key IS NULL OR outr.col_datetime_key = '2009-09-27'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE outr index_merge col_time_key,col_datetime_key col_time_key,col_datetime_key 4,6 NULL x x +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE outr NULL index_merge col_time_key,col_datetime_key col_time_key,col_datetime_key 4,6 NULL x x SELECT outr.col_time_key AS x FROM c AS outr @@ -312,8 +312,8 @@ UNIQUE KEY (b) ); INSERT INTO t1 (id) VALUES (2),(3),(4),(5),(6),(7),(8),(9),(10); EXPLAIN SELECT b FROM t1 FORCE INDEX(b); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b 5 NULL 9 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL b 5 NULL 9 Using index SELECT b FROM t1 FORCE INDEX(b); b 3 @@ -326,8 +326,8 @@ b 10 11 EXPLAIN SELECT b FROM t1 FORCE INDEX(b) WHERE b BETWEEN 1 AND 5; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range b b 5 NULL 3 Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range b b 5 NULL 3 Using where; Using index SELECT b FROM t1 FORCE INDEX(b) WHERE b BETWEEN 1 AND 5; b 3 @@ -357,29 +357,29 @@ f1 gc 8 9 9 10 EXPLAIN SELECT * FROM t1 WHERE f1 + 1 > 7; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using where SELECT * FROM t1 WHERE f1 + 1 = 7; f1 gc 6 7 EXPLAIN SELECT * FROM t1 WHERE f1 + 1 = 7; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using where SELECT * FROM t1 WHERE f1 + 1 IN (7,5); f1 gc 4 5 6 7 EXPLAIN SELECT * FROM t1 WHERE f1 + 1 IN(7,5); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using where SELECT * FROM t1 WHERE f1 + 1 BETWEEN 5 AND 7; f1 gc 4 5 5 6 6 7 EXPLAIN SELECT * FROM t1 WHERE f1 + 1 BETWEEN 5 AND 7; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using where # Check that expression isn't transformed for a disabled key SELECT * FROM t1 IGNORE KEY (gc) WHERE f1 + 1 BETWEEN 5 AND 7; f1 gc @@ -387,8 +387,8 @@ f1 gc 5 6 6 7 EXPLAIN SELECT * FROM t1 IGNORE KEY (gc) WHERE f1 + 1 BETWEEN 5 AND 7; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using where # Check that ORDER BY could be optimized SELECT * FROM t1 ORDER BY f1 + 1; f1 gc @@ -403,11 +403,11 @@ f1 gc 8 9 9 10 EXPLAIN SELECT * FROM t1 ORDER BY f1 + 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using filesort EXPLAIN SELECT * FROM t1 IGNORE KEY (gc) ORDER BY f1 + 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using filesort # Check that GROUP BY could be optimized SELECT f1 + 1, MAX(GC) FROM t1 GROUP BY f1 + 1; f1 + 1 MAX(GC) @@ -422,12 +422,12 @@ f1 + 1 MAX(GC) 9 9 10 10 EXPLAIN SELECT f1 + 1, MAX(GC) FROM t1 GROUP BY f1 + 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using temporary; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using temporary; Using filesort EXPLAIN SELECT f1 + 1, MAX(GC) FROM t1 IGNORE KEY (gc) GROUP BY f1 + 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using temporary; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using temporary; Using filesort # Shouldn't use index SELECT * FROM t1 WHERE f1 + 1 > 7.0; f1 gc @@ -435,8 +435,8 @@ f1 gc 8 9 9 10 EXPLAIN SELECT * FROM t1 WHERE f1 + 1 > 7.0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using where DROP TABLE t1; # Pick index with proper type CREATE TABLE t1 (f1 int, @@ -466,8 +466,8 @@ f1 gc_int gc_date 90909 90910 2009-09-10 # INT column & index should be picked EXPLAIN SELECT * FROM t1 WHERE f1 + 1 > 070707; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 18 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 18 Using where SELECT * FROM t1 WHERE f1 + 1 > CAST(070707 AS DATE); f1 gc_int gc_date 101010 101011 2010-10-11 @@ -476,8 +476,8 @@ f1 gc_int gc_date 90909 90910 2009-09-10 # DATE column & index should be picked EXPLAIN SELECT * FROM t1 WHERE f1 + 1 > CAST(070707 AS DATE); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 18 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 18 Using where DROP TABLE t1; # # BUG#21229846: WL8170: SIGNAL 11 IN JOIN::MAKE_SUM_FUNC_LIST @@ -501,9 +501,9 @@ field1 field2 EXPLAIN SELECT table1.col_int_key + 1 AS field1, table2.col_int_key AS field2 FROM (t1 AS table1 JOIN t1 AS table2 ON (table2.pk = table1.pk)) ORDER BY field1, field2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE table1 ALL PRIMARY NULL NULL NULL 1 Using temporary; Using filesort -1 SIMPLE table2 eq_ref PRIMARY PRIMARY 4 test.table1.pk 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE table1 NULL ALL PRIMARY NULL NULL NULL 1 Using temporary; Using filesort +1 SIMPLE table2 NULL eq_ref PRIMARY PRIMARY 4 test.table1.pk 1 SELECT table1.col_int_key + 1 AS field1, table2.col_int_key AS field2 FROM (t1 AS table1 JOIN t1 AS table2 ON (table2.pk = table1.pk)) GROUP BY field1, field2; @@ -512,9 +512,9 @@ field1 field2 EXPLAIN SELECT table1.col_int_key + 1 AS field1, table2.col_int_key AS field2 FROM (t1 AS table1 JOIN t1 AS table2 ON (table2.pk = table1.pk)) GROUP BY field1, field2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE table1 ALL PRIMARY NULL NULL NULL 1 Using temporary; Using filesort -1 SIMPLE table2 eq_ref PRIMARY PRIMARY 4 test.table1.pk 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE table1 NULL ALL PRIMARY NULL NULL NULL 1 Using temporary; Using filesort +1 SIMPLE table2 NULL eq_ref PRIMARY PRIMARY 4 test.table1.pk 1 DROP TABLE t1; # # Bug#21391781 ASSERT WHEN RUNNING ALTER TABLE ON A TABLE WITH INDEX @@ -733,69 +733,69 @@ Table Op Msg_type Msg_text test.t analyze status Engine-independent statistics collected test.t analyze status OK EXPLAIN SELECT a, b FROM t WHERE (a AND b) = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a, b FROM t WHERE (a AND b) = 1; a b 1 1 EXPLAIN SELECT a, b FROM t WHERE 1 = (a AND b); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a, b FROM t WHERE 1 = (a AND b); a b 1 1 EXPLAIN SELECT a, b FROM t WHERE (a AND b) IN (1, 2, 3); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a, b FROM t WHERE (a AND b) IN (1, 2, 3); a b 1 1 EXPLAIN SELECT a, b FROM t WHERE (a OR b) = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a, b FROM t WHERE (a OR b) = 1; a b 0 1 1 0 1 1 EXPLAIN SELECT a, b FROM t WHERE (a OR b) BETWEEN 1 AND 10; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a, b FROM t WHERE (a OR b) BETWEEN 1 AND 10; a b 0 1 1 0 1 1 EXPLAIN SELECT a, b FROM t WHERE (a XOR b) = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a, b FROM t WHERE (a XOR b) = 1; a b 0 1 1 0 EXPLAIN SELECT a FROM t WHERE (NOT a) = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a FROM t WHERE (NOT a) = 1; a 0 0 EXPLAIN SELECT a FROM t WHERE (CASE WHEN (a AND b) THEN a ELSE b END) = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a FROM t WHERE (CASE WHEN (a AND b) THEN a ELSE b END) = 1; a 0 1 EXPLAIN SELECT a, b FROM t WHERE 1 = (b AND a); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a, b FROM t WHERE 1 = (b AND a); a b 1 1 EXPLAIN SELECT a, b FROM t WHERE 1 = (b OR a); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a, b FROM t WHERE 1 = (b OR a); a b 0 1 @@ -819,15 +819,15 @@ test.t2 analyze status Engine-independent statistics collected test.t2 analyze status OK # Used to choose the index on a1 and get wrong results. EXPLAIN SELECT * FROM t1 WHERE (a2 AND a2) = 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 1 Using where SELECT * FROM t1 WHERE (a2 AND a2) = 0; a1 a2 # Used to get assertion or wrong results. EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t2 ON b WHERE (b AND b) = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 1 -1 SIMPLE t2 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 1 +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 1 Using where; Using join buffer (flat, BNL join) SELECT * FROM t1 STRAIGHT_JOIN t2 ON b WHERE (b AND b) = 1; a1 a2 b 0 NULL 1 diff --git a/mysql-test/suite/gcol/r/gcol_keys_myisam.result b/mysql-test/suite/gcol/r/gcol_keys_myisam.result index 364d53afe1d..75d8afbd15c 100644 --- a/mysql-test/suite/gcol/r/gcol_keys_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_keys_myisam.result @@ -204,8 +204,8 @@ WHERE outr.col_varchar_nokey in ('c', 'x', 'i') AND (outr.col_time_key IS NULL OR outr.col_datetime_key = '2009-09-27'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE outr index_merge col_time_key,col_datetime_key col_time_key,col_datetime_key 4,6 NULL x x +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE outr NULL index_merge col_time_key,col_datetime_key col_time_key,col_datetime_key 4,6 NULL x x SELECT outr.col_time_key AS x FROM c AS outr @@ -312,8 +312,8 @@ UNIQUE KEY (b) ); INSERT INTO t1 (id) VALUES (2),(3),(4),(5),(6),(7),(8),(9),(10); EXPLAIN SELECT b FROM t1 FORCE INDEX(b); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b 5 NULL 9 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL b 5 NULL 9 Using index SELECT b FROM t1 FORCE INDEX(b); b 3 @@ -326,8 +326,8 @@ b 10 11 EXPLAIN SELECT b FROM t1 FORCE INDEX(b) WHERE b BETWEEN 1 AND 5; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range b b 5 NULL 3 Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range b b 5 NULL 3 Using where; Using index SELECT b FROM t1 FORCE INDEX(b) WHERE b BETWEEN 1 AND 5; b 3 @@ -357,29 +357,29 @@ f1 gc 8 9 9 10 EXPLAIN SELECT * FROM t1 WHERE f1 + 1 > 7; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using where SELECT * FROM t1 WHERE f1 + 1 = 7; f1 gc 6 7 EXPLAIN SELECT * FROM t1 WHERE f1 + 1 = 7; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using where SELECT * FROM t1 WHERE f1 + 1 IN (7,5); f1 gc 4 5 6 7 EXPLAIN SELECT * FROM t1 WHERE f1 + 1 IN(7,5); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using where SELECT * FROM t1 WHERE f1 + 1 BETWEEN 5 AND 7; f1 gc 4 5 5 6 6 7 EXPLAIN SELECT * FROM t1 WHERE f1 + 1 BETWEEN 5 AND 7; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using where # Check that expression isn't transformed for a disabled key SELECT * FROM t1 IGNORE KEY (gc) WHERE f1 + 1 BETWEEN 5 AND 7; f1 gc @@ -387,8 +387,8 @@ f1 gc 5 6 6 7 EXPLAIN SELECT * FROM t1 IGNORE KEY (gc) WHERE f1 + 1 BETWEEN 5 AND 7; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using where # Check that ORDER BY could be optimized SELECT * FROM t1 ORDER BY f1 + 1; f1 gc @@ -403,11 +403,11 @@ f1 gc 8 9 9 10 EXPLAIN SELECT * FROM t1 ORDER BY f1 + 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using filesort EXPLAIN SELECT * FROM t1 IGNORE KEY (gc) ORDER BY f1 + 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using filesort # Check that GROUP BY could be optimized SELECT f1 + 1, MAX(GC) FROM t1 GROUP BY f1 + 1; f1 + 1 MAX(GC) @@ -422,12 +422,12 @@ f1 + 1 MAX(GC) 9 9 10 10 EXPLAIN SELECT f1 + 1, MAX(GC) FROM t1 GROUP BY f1 + 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using temporary; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using temporary; Using filesort EXPLAIN SELECT f1 + 1, MAX(GC) FROM t1 IGNORE KEY (gc) GROUP BY f1 + 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using temporary; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using temporary; Using filesort # Shouldn't use index SELECT * FROM t1 WHERE f1 + 1 > 7.0; f1 gc @@ -435,8 +435,8 @@ f1 gc 8 9 9 10 EXPLAIN SELECT * FROM t1 WHERE f1 + 1 > 7.0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using where DROP TABLE t1; # Pick index with proper type CREATE TABLE t1 (f1 int, @@ -466,8 +466,8 @@ f1 gc_int gc_date 90909 90910 2009-09-10 # INT column & index should be picked EXPLAIN SELECT * FROM t1 WHERE f1 + 1 > 070707; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 18 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 18 Using where SELECT * FROM t1 WHERE f1 + 1 > CAST(070707 AS DATE); f1 gc_int gc_date 101010 101011 2010-10-11 @@ -476,8 +476,8 @@ f1 gc_int gc_date 90909 90910 2009-09-10 # DATE column & index should be picked EXPLAIN SELECT * FROM t1 WHERE f1 + 1 > CAST(070707 AS DATE); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 18 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 18 Using where DROP TABLE t1; # # BUG#21229846: WL8170: SIGNAL 11 IN JOIN::MAKE_SUM_FUNC_LIST @@ -501,9 +501,9 @@ field1 field2 EXPLAIN SELECT table1.col_int_key + 1 AS field1, table2.col_int_key AS field2 FROM (t1 AS table1 JOIN t1 AS table2 ON (table2.pk = table1.pk)) ORDER BY field1, field2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE table1 system PRIMARY NULL NULL NULL 1 -1 SIMPLE table2 system PRIMARY NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE table1 NULL system PRIMARY NULL NULL NULL 1 +1 SIMPLE table2 NULL system PRIMARY NULL NULL NULL 1 SELECT table1.col_int_key + 1 AS field1, table2.col_int_key AS field2 FROM (t1 AS table1 JOIN t1 AS table2 ON (table2.pk = table1.pk)) GROUP BY field1, field2; @@ -512,9 +512,9 @@ field1 field2 EXPLAIN SELECT table1.col_int_key + 1 AS field1, table2.col_int_key AS field2 FROM (t1 AS table1 JOIN t1 AS table2 ON (table2.pk = table1.pk)) GROUP BY field1, field2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE table1 system PRIMARY NULL NULL NULL 1 -1 SIMPLE table2 system PRIMARY NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE table1 NULL system PRIMARY NULL NULL NULL 1 +1 SIMPLE table2 NULL system PRIMARY NULL NULL NULL 1 DROP TABLE t1; # # Bug#21391781 ASSERT WHEN RUNNING ALTER TABLE ON A TABLE WITH INDEX @@ -733,69 +733,69 @@ Table Op Msg_type Msg_text test.t analyze status Engine-independent statistics collected test.t analyze status OK EXPLAIN SELECT a, b FROM t WHERE (a AND b) = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a, b FROM t WHERE (a AND b) = 1; a b 1 1 EXPLAIN SELECT a, b FROM t WHERE 1 = (a AND b); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a, b FROM t WHERE 1 = (a AND b); a b 1 1 EXPLAIN SELECT a, b FROM t WHERE (a AND b) IN (1, 2, 3); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a, b FROM t WHERE (a AND b) IN (1, 2, 3); a b 1 1 EXPLAIN SELECT a, b FROM t WHERE (a OR b) = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a, b FROM t WHERE (a OR b) = 1; a b 0 1 1 0 1 1 EXPLAIN SELECT a, b FROM t WHERE (a OR b) BETWEEN 1 AND 10; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a, b FROM t WHERE (a OR b) BETWEEN 1 AND 10; a b 0 1 1 0 1 1 EXPLAIN SELECT a, b FROM t WHERE (a XOR b) = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a, b FROM t WHERE (a XOR b) = 1; a b 0 1 1 0 EXPLAIN SELECT a FROM t WHERE (NOT a) = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a FROM t WHERE (NOT a) = 1; a 0 0 EXPLAIN SELECT a FROM t WHERE (CASE WHEN (a AND b) THEN a ELSE b END) = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a FROM t WHERE (CASE WHEN (a AND b) THEN a ELSE b END) = 1; a 0 1 EXPLAIN SELECT a, b FROM t WHERE 1 = (b AND a); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a, b FROM t WHERE 1 = (b AND a); a b 1 1 EXPLAIN SELECT a, b FROM t WHERE 1 = (b OR a); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t NULL ALL NULL NULL NULL NULL 4 Using where SELECT a, b FROM t WHERE 1 = (b OR a); a b 0 1 @@ -819,15 +819,15 @@ test.t2 analyze status Engine-independent statistics collected test.t2 analyze status OK # Used to choose the index on a1 and get wrong results. EXPLAIN SELECT * FROM t1 WHERE (a2 AND a2) = 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables SELECT * FROM t1 WHERE (a2 AND a2) = 0; a1 a2 # Used to get assertion or wrong results. EXPLAIN SELECT * FROM t1 STRAIGHT_JOIN t2 ON b WHERE (b AND b) = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 1 -1 SIMPLE t2 system NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL system NULL NULL NULL NULL 1 +1 SIMPLE t2 NULL system NULL NULL NULL NULL 1 SELECT * FROM t1 STRAIGHT_JOIN t2 ON b WHERE (b AND b) = 1; a1 a2 b 0 NULL 1 diff --git a/mysql-test/suite/gcol/r/gcol_select_innodb.result b/mysql-test/suite/gcol/r/gcol_select_innodb.result index 17acbcf2bb2..3cc460f64cf 100644 --- a/mysql-test/suite/gcol/r/gcol_select_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_select_innodb.result @@ -31,45 +31,45 @@ select * from t2; a b c 1 -1 -1 explain select * from t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 1 select * from t2 where c=-1; a b c 1 -1 -1 explain select * from t2 where c=-1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref c c 5 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ref c c 5 const 1 # select_type=SIMPLE, type=ALL select * from t1 where b=-1; a b c 1 -1 -1 1 -1 -1 explain select * from t1 where b=-1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using where # select_type=SIMPLE, type=const select * from t3 where a=1; a b c 1 -1 -1 explain select * from t3 where a=1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 const PRIMARY PRIMARY 4 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL const PRIMARY PRIMARY 4 const 1 # select_type=SIMPLE, type=range select * from t3 where c>=-1; a b c 1 -1 -1 explain select * from t3 where c>=-1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 1 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 1 Using index condition # select_type=SIMPLE, type=ref select * from t1,t3 where t1.c=t3.c and t3.c=-1; a b c a b c 1 -1 -1 1 -1 -1 1 -1 -1 1 -1 -1 explain select * from t1,t3 where t1.c=t3.c and t3.c=-1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 const c c 5 const 1 -1 SIMPLE t1 ref c c 5 const 2 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL const c c 5 const 1 +1 SIMPLE t1 NULL ref c c 5 const 2 # select_type=PRIMARY, type=index,ALL select * from t1 where b in (select c from t3); a b c @@ -78,9 +78,9 @@ a b c 2 -2 -2 3 -3 -3 explain select * from t1 where b in (select c from t3); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where -1 PRIMARY t3 eq_ref c c 5 test.t1.b 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 Using where +1 PRIMARY t3 NULL eq_ref c c 5 test.t1.b 1 Using index # select_type=PRIMARY, type=range,ref select * from t1 where c in (select c from t3 where c between -2 and -1); a b c @@ -88,9 +88,9 @@ a b c 1 -1 -1 2 -2 -2 explain select * from t1 where c in (select c from t3 where c between -2 and -1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t3 range c c 5 NULL 2 Using where; Using index -1 PRIMARY t1 ref c c 5 test.t3.c 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t3 NULL range c c 5 NULL 2 Using where; Using index +1 PRIMARY t1 NULL ref c c 5 test.t3.c 1 # select_type=UNION, type=system # select_type=UNION RESULT, type=<union1,2> select * from t1 union select * from t2; @@ -100,10 +100,10 @@ a b c 3 -3 -3 NULL NULL NULL explain select * from t1 union select * from t2; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 -2 UNION t2 ALL NULL NULL NULL NULL 1 -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 +2 UNION t2 NULL ALL NULL NULL NULL NULL 1 +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL # select_type=DERIVED, type=system select * from (select a,b,c from t1) as t11; a b c @@ -113,9 +113,9 @@ a b c 3 -3 -3 NULL NULL NULL explain select * from (select a,b,c from t1) as t11; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5 -2 DERIVED t1 ALL NULL NULL NULL NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 5 +2 DERIVED t1 NULL ALL NULL NULL NULL NULL 5 ### ### Using aggregate functions with/without DISTINCT ### @@ -124,29 +124,29 @@ select count(*) from t1; count(*) 5 explain select count(*) from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 5 NULL 5 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c 5 NULL 5 Using index # SELECT COUNT(DISTINCT <non-gcol>) FROM tbl_name select count(distinct a) from t1; count(distinct a) 3 explain select count(distinct a) from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 # SELECT COUNT(DISTINCT <non-stored gcol>) FROM tbl_name select count(distinct b) from t1; count(distinct b) 3 explain select count(distinct b) from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 # SELECT COUNT(DISTINCT <stored gcol>) FROM tbl_name select count(distinct c) from t1; count(distinct c) 3 explain select count(distinct c) from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range NULL c 5 NULL 6 Using index for group-by ### ### filesort & range-based utils ### @@ -156,40 +156,40 @@ a b c 1 -1 -1 2 -2 -2 explain select * from t3 where c >= -2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition # SELECT * FROM tbl_name WHERE <non-gcol expr> select * from t3 where a between 1 and 2; a b c 1 -1 -1 2 -2 -2 explain select * from t3 where a between 1 and 2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range PRIMARY PRIMARY 4 NULL 2 Using where # SELECT * FROM tbl_name WHERE <non-indexed gcol expr> select * from t3 where b between -2 and -1; a b c 1 -1 -1 2 -2 -2 explain select * from t3 where b between -2 and -1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL ALL NULL NULL NULL NULL 6 Using where # SELECT * FROM tbl_name WHERE <indexed gcol expr> select * from t3 where c between -2 and -1; a b c 1 -1 -1 2 -2 -2 explain select * from t3 where c between -2 and -1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition # SELECT * FROM tbl_name WHERE <non-gcol expr> ORDER BY <non-indexed gcol> select * from t3 where a between 1 and 2 order by b; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where a between 1 and 2 order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range PRIMARY PRIMARY 4 NULL 2 Using where; Using filesort # bug#20022189: WL411:DEBUG ASSERT AT FIELD_LONG::VAL_INT IN SQL/FIELD.CC # SELECT * FROM tbl_name WHERE <non-gcol expr> ORDER BY <non-indexed stored gcol> select * from t3 where a between 1 and 2 order by c; @@ -197,8 +197,8 @@ a b c 2 -2 -2 1 -1 -1 explain select * from t3 where a between 1 and 2 order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range PRIMARY PRIMARY 4 NULL 2 Using where; Using filesort # bug#20022189: WL411:DEBUG ASSERT AT FIELD_LONG::VAL_INT IN SQL/FIELD.CC CREATE TABLE t4 ( `pk` int(11) NOT NULL , @@ -227,48 +227,48 @@ a b c 2 -2 -2 1 -1 -1 explain select * from t3 where a between 1 and 2 order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range PRIMARY PRIMARY 4 NULL 2 Using where; Using filesort # SELECT * FROM tbl_name WHERE <non-indexed gcol expr> ORDER BY <non-gcol> select * from t3 where b between -2 and -1 order by a; a b c 1 -1 -1 2 -2 -2 explain select * from t3 where b between -2 and -1 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 index NULL PRIMARY 4 NULL 6 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL index NULL PRIMARY 4 NULL 6 Using where # SELECT * FROM tbl_name WHERE <non-indexed gcol expr> ORDER BY <non-indexed gcol> select * from t3 where b between -2 and -1 order by b; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where b between -2 and -1 order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL ALL NULL NULL NULL NULL 6 Using where; Using filesort # SELECT * FROM tbl_name WHERE <indexed gcol expr> ORDER BY <non-indexed gcol> select * from t3 where c between -2 and -1 order by b; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where c between -2 and -1 order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition; Using filesort # SELECT * FROM tbl_name WHERE <non-indexed gcol expr> ORDER BY <indexed gcol> select * from t3 where b between -2 and -1 order by c; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where b between -2 and -1 order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL ALL NULL NULL NULL NULL 6 Using where; Using filesort # SELECT * FROM tbl_name WHERE <indexed gcol expr> ORDER BY <indexed gcol> select * from t3 where c between -2 and -1 order by c; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where c between -2 and -1 order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition # SELECT sum(<non-indexed gcol>) FROM tbl_name GROUP BY <non-indexed gcol> select sum(b) from t1 group by b; sum(b) @@ -277,8 +277,8 @@ NULL -2 -2 explain select sum(b) from t1 group by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using temporary; Using filesort # SELECT sum(<indexed gcol>) FROM tbl_name GROUP BY <indexed gcol> select sum(c) from t1 group by c; sum(c) @@ -287,8 +287,8 @@ NULL -2 -2 explain select sum(c) from t1 group by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 5 NULL 5 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c 5 NULL 5 Using index # SELECT sum(<non-indexed gcol>) FROM tbl_name GROUP BY <indexed gcol> select sum(b) from t1 group by c; sum(b) @@ -297,8 +297,8 @@ NULL -2 -2 explain select sum(b) from t1 group by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 5 NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c 5 NULL 5 # SELECT sum(<indexed gcol>) FROM tbl_name GROUP BY <non-indexed gcol> select sum(c) from t1 group by b; sum(c) @@ -307,8 +307,8 @@ NULL -2 -2 explain select sum(c) from t1 group by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using temporary; Using filesort drop table t1; # # Bug#20241655: WL411:FAILING ASSERTION ASSERTION @@ -556,9 +556,9 @@ UNIQUE KEY i0008 (a) INSERT INTO t(a,b) VALUES(1,'cccc'); EXPLAIN SELECT /*+ bka() */ 1 AS c FROM t AS b RIGHT JOIN t AS c ON b.a > c.c WHERE b.b>c.a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE b ALL i0008 NULL NULL NULL 1 -1 SIMPLE c ALL i0008 NULL NULL NULL 1 Range checked for each record (index map: 0x1) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE b NULL ALL i0008 NULL NULL NULL 1 +1 SIMPLE c NULL ALL i0008 NULL NULL NULL 1 Range checked for each record (index map: 0x1) SELECT /*+ bka() */ 1 AS c FROM t AS b RIGHT JOIN t AS c ON b.a > c.c WHERE b.b>c.a; c @@ -589,8 +589,8 @@ a0.i1 + a1.i1*10 FROM t0 AS a0, t0 AS a1, t0 AS a2; EXPLAIN SELECT * FROM t1 WHERE i1 > 41 AND i1 <= 43; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range idx idx 4 NULL 20 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range idx idx 4 NULL 20 Using index condition SELECT * FROM t1 WHERE i1 > 41 AND i1 <= 43; pk i1 i2 v1 v2 @@ -616,8 +616,8 @@ pk i1 i2 v1 v2 943 43 43 44 1 EXPLAIN SELECT * FROM t1 WHERE v1 > 41 AND v1 <= 43; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL # 1000 Using where SELECT * FROM t1 WHERE v1 > 41 AND v1 <= 43; pk i1 i2 v1 v2 @@ -698,12 +698,12 @@ WHERE t4.c1 < 'o' ) ) AND t1.i1 <= t3.i2_key; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 -1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t4.i1 1 Using where -1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) -2 MATERIALIZED t4 ALL NULL NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 4 +1 PRIMARY <subquery2> NULL ALL distinct_key NULL NULL NULL 2 +1 PRIMARY t3 NULL eq_ref PRIMARY PRIMARY 4 test.t4.i1 1 Using where +1 PRIMARY t2 NULL ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) +2 MATERIALIZED t4 NULL ALL NULL NULL NULL NULL 3 Using where SELECT /*+ NO_SEMIJOIN(@subq1) */ t1.c1, t2.i1 FROM t1 STRAIGHT_JOIN t3 STRAIGHT_JOIN t2 WHERE ( t3.pk IN @@ -753,12 +753,12 @@ WHERE t4.c1 < 'o' ) ) AND t1.i1 <= t3.i2_key; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 -1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t4.i1 1 Using where -1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) -2 MATERIALIZED t4 ALL NULL NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 4 +1 PRIMARY <subquery2> NULL ALL distinct_key NULL NULL NULL 2 +1 PRIMARY t3 NULL eq_ref PRIMARY PRIMARY 4 test.t4.i1 1 Using where +1 PRIMARY t2 NULL ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) +2 MATERIALIZED t4 NULL ALL NULL NULL NULL NULL 3 Using where SELECT /*+ NO_SEMIJOIN(@subq1) */ t1.c1, t2.i1 FROM t1 STRAIGHT_JOIN t3 STRAIGHT_JOIN t2 WHERE ( t3.pk IN @@ -809,12 +809,12 @@ WHERE t4.c1 < 'o' ) ) AND t1.i1 <= t3.i2_key; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 -1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t4.i1 1 Using where -1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) -2 MATERIALIZED t4 ALL NULL NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 4 +1 PRIMARY <subquery2> NULL ALL distinct_key NULL NULL NULL 2 +1 PRIMARY t3 NULL eq_ref PRIMARY PRIMARY 4 test.t4.i1 1 Using where +1 PRIMARY t2 NULL ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) +2 MATERIALIZED t4 NULL ALL NULL NULL NULL NULL 3 Using where SELECT /*+ NO_SEMIJOIN(@subq1) */ t1.c1, t2.i1 FROM t1 STRAIGHT_JOIN t3 STRAIGHT_JOIN t2 WHERE ( t3.pk IN @@ -873,12 +873,12 @@ WHERE t4.c1 < 'o' ) ) AND t1.i1 <= t3.i2_key; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 -1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t4.i1 1 Using where -1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) -2 MATERIALIZED t4 ALL NULL NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 4 +1 PRIMARY <subquery2> NULL ALL distinct_key NULL NULL NULL 2 +1 PRIMARY t3 NULL eq_ref PRIMARY PRIMARY 4 test.t4.i1 1 Using where +1 PRIMARY t2 NULL ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) +2 MATERIALIZED t4 NULL ALL NULL NULL NULL NULL 3 Using where SELECT /*+ NO_SEMIJOIN(@subq1) */ t1.c1, t2.i1, t3.i1 FROM t1 STRAIGHT_JOIN t3 STRAIGHT_JOIN t2 WHERE ( t3.pk IN @@ -929,11 +929,11 @@ WHERE t4.c1 < 'o' and t4.i1 < (t2.i1 + 1) ) ) AND t1.i1 <= t3.i2_key; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t4 ALL NULL NULL NULL NULL 3 Using where; Start temporary -1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join) -1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t4.i1 1 Using where -1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where; End temporary; Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t4 NULL ALL NULL NULL NULL NULL 3 Using where; Start temporary +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join) +1 PRIMARY t3 NULL eq_ref PRIMARY PRIMARY 4 test.t4.i1 1 Using where +1 PRIMARY t2 NULL ALL NULL NULL NULL NULL 5 Using where; End temporary; Using join buffer (flat, BNL join) SELECT /*+ NO_SEMIJOIN(@subq1) */ t1.c1, t2.i1 FROM t1 STRAIGHT_JOIN t3 STRAIGHT_JOIN t2 WHERE ( t3.pk IN diff --git a/mysql-test/suite/gcol/r/gcol_select_myisam.result b/mysql-test/suite/gcol/r/gcol_select_myisam.result index 67c495f6a6e..e5b4deeed82 100644 --- a/mysql-test/suite/gcol/r/gcol_select_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_select_myisam.result @@ -31,45 +31,45 @@ select * from t2; a b c 1 -1 -1 explain select * from t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 system NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL system NULL NULL NULL NULL 1 select * from t2 where c=-1; a b c 1 -1 -1 explain select * from t2 where c=-1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 system c NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL system c NULL NULL NULL 1 # select_type=SIMPLE, type=ALL select * from t1 where b=-1; a b c 1 -1 -1 1 -1 -1 explain select * from t1 where b=-1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using where # select_type=SIMPLE, type=const select * from t3 where a=1; a b c 1 -1 -1 explain select * from t3 where a=1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 const PRIMARY PRIMARY 4 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL const PRIMARY PRIMARY 4 const 1 # select_type=SIMPLE, type=range select * from t3 where c>=-1; a b c 1 -1 -1 explain select * from t3 where c>=-1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 1 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 1 Using index condition # select_type=SIMPLE, type=ref select * from t1,t3 where t1.c=t3.c and t3.c=-1; a b c a b c 1 -1 -1 1 -1 -1 1 -1 -1 1 -1 -1 explain select * from t1,t3 where t1.c=t3.c and t3.c=-1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 const c c 5 const 1 -1 SIMPLE t1 ref c c 5 const 2 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL const c c 5 const 1 +1 SIMPLE t1 NULL ref c c 5 const 2 # select_type=PRIMARY, type=index,ALL select * from t1 where b in (select c from t3); a b c @@ -78,9 +78,9 @@ a b c 2 -2 -2 3 -3 -3 explain select * from t1 where b in (select c from t3); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where -1 PRIMARY t3 eq_ref c c 5 test.t1.b 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 Using where +1 PRIMARY t3 NULL eq_ref c c 5 test.t1.b 1 Using index # select_type=PRIMARY, type=range,ref select * from t1 where c in (select c from t3 where c between -2 and -1); a b c @@ -88,9 +88,9 @@ a b c 1 -1 -1 2 -2 -2 explain select * from t1 where c in (select c from t3 where c between -2 and -1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t3 range c c 5 NULL 2 Using where; Using index -1 PRIMARY t1 ref c c 5 test.t3.c 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t3 NULL range c c 5 NULL 2 Using where; Using index +1 PRIMARY t1 NULL ref c c 5 test.t3.c 1 # select_type=UNION, type=system # select_type=UNION RESULT, type=<union1,2> select * from t1 union select * from t2; @@ -100,10 +100,10 @@ a b c 3 -3 -3 NULL NULL NULL explain select * from t1 union select * from t2; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 -2 UNION t2 system NULL NULL NULL NULL 1 -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 +2 UNION t2 NULL system NULL NULL NULL NULL 1 +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL # select_type=DERIVED, type=system select * from (select a,b,c from t1) as t11; a b c @@ -113,9 +113,9 @@ a b c 3 -3 -3 NULL NULL NULL explain select * from (select a,b,c from t1) as t11; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5 -2 DERIVED t1 ALL NULL NULL NULL NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 5 +2 DERIVED t1 NULL ALL NULL NULL NULL NULL 5 ### ### Using aggregate functions with/without DISTINCT ### @@ -124,29 +124,29 @@ select count(*) from t1; count(*) 5 explain select count(*) from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away # SELECT COUNT(DISTINCT <non-gcol>) FROM tbl_name select count(distinct a) from t1; count(distinct a) 3 explain select count(distinct a) from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 # SELECT COUNT(DISTINCT <non-stored gcol>) FROM tbl_name select count(distinct b) from t1; count(distinct b) 3 explain select count(distinct b) from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 # SELECT COUNT(DISTINCT <stored gcol>) FROM tbl_name select count(distinct c) from t1; count(distinct c) 3 explain select count(distinct c) from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range NULL c 5 NULL 6 Using index for group-by ### ### filesort & range-based utils ### @@ -156,32 +156,32 @@ a b c 1 -1 -1 2 -2 -2 explain select * from t3 where c >= -2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition # SELECT * FROM tbl_name WHERE <non-gcol expr> select * from t3 where a between 1 and 2; a b c 1 -1 -1 2 -2 -2 explain select * from t3 where a between 1 and 2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range PRIMARY PRIMARY 4 NULL 2 Using index condition # SELECT * FROM tbl_name WHERE <non-indexed gcol expr> select * from t3 where b between -2 and -1; a b c 1 -1 -1 2 -2 -2 explain select * from t3 where b between -2 and -1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL ALL NULL NULL NULL NULL 6 Using where # SELECT * FROM tbl_name WHERE <indexed gcol expr> select * from t3 where c between -2 and -1; a b c 1 -1 -1 2 -2 -2 explain select * from t3 where c between -2 and -1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition # bug#20022189: WL411:DEBUG ASSERT AT FIELD_LONG::VAL_INT IN SQL/FIELD.CC CREATE TABLE t4 ( `pk` int(11) NOT NULL , @@ -210,56 +210,56 @@ a b c 2 -2 -2 1 -1 -1 explain select * from t3 where a between 1 and 2 order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using filesort # SELECT * FROM tbl_name WHERE <non-indexed gcol expr> ORDER BY <non-gcol> select * from t3 where b between -2 and -1 order by a; a b c 1 -1 -1 2 -2 -2 explain select * from t3 where b between -2 and -1 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL ALL NULL NULL NULL NULL 6 Using where; Using filesort # SELECT * FROM tbl_name WHERE <indexed gcol expr> ORDER BY <non-gcol> select * from t3 where c between -2 and -1 order by a; a b c 1 -1 -1 2 -2 -2 explain select * from t3 where c between -2 and -1 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition; Using filesort # SELECT * FROM tbl_name WHERE <non-indexed gcol expr> ORDER BY <non-indexed gcol> select * from t3 where b between -2 and -1 order by b; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where b between -2 and -1 order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL ALL NULL NULL NULL NULL 6 Using where; Using filesort # SELECT * FROM tbl_name WHERE <indexed gcol expr> ORDER BY <non-indexed gcol> select * from t3 where c between -2 and -1 order by b; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where c between -2 and -1 order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition; Using filesort # SELECT * FROM tbl_name WHERE <non-indexed gcol expr> ORDER BY <indexed gcol> select * from t3 where b between -2 and -1 order by c; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where b between -2 and -1 order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL ALL NULL NULL NULL NULL 6 Using where; Using filesort # SELECT * FROM tbl_name WHERE <indexed gcol expr> ORDER BY <indexed gcol> select * from t3 where c between -2 and -1 order by c; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where c between -2 and -1 order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition # SELECT sum(<non-indexed gcol>) FROM tbl_name GROUP BY <non-indexed gcol> select sum(b) from t1 group by b; sum(b) @@ -268,8 +268,8 @@ NULL -2 -2 explain select sum(b) from t1 group by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using temporary; Using filesort # SELECT sum(<indexed gcol>) FROM tbl_name GROUP BY <indexed gcol> select sum(c) from t1 group by c; sum(c) @@ -278,8 +278,8 @@ NULL -2 -2 explain select sum(c) from t1 group by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 5 NULL 5 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c 5 NULL 5 Using index # SELECT sum(<non-indexed gcol>) FROM tbl_name GROUP BY <indexed gcol> select sum(b) from t1 group by c; sum(b) @@ -288,8 +288,8 @@ NULL -2 -2 explain select sum(b) from t1 group by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using temporary; Using filesort # SELECT sum(<indexed gcol>) FROM tbl_name GROUP BY <non-indexed gcol> select sum(c) from t1 group by b; sum(c) @@ -298,8 +298,8 @@ NULL -2 -2 explain select sum(c) from t1 group by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using temporary; Using filesort drop table t1; # # Bug#20241655: WL411:FAILING ASSERTION ASSERTION @@ -590,10 +590,10 @@ FROM (c AS subquery2_t1 RIGHT JOIN (subquery2_t3.col_int_nokey = subquery2_t2.col_int_key )) ON (subquery2_t3.col_varchar_key = subquery2_t2.col_varchar_key)) ORDER BY subquery2_field1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE subquery2_t2 index NULL col_int_key_2 10 NULL # # -1 SIMPLE subquery2_t3 ALL NULL NULL NULL NULL # # -1 SIMPLE subquery2_t1 index NULL PRIMARY 4 NULL # # +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE subquery2_t2 NULL index NULL col_int_key_2 10 # # Using index; Using temporary; Using filesort +1 SIMPLE subquery2_t3 NULL ALL NULL NULL NULL # # Using where; Using join buffer (flat, BNL join) +1 SIMPLE subquery2_t1 NULL index NULL PRIMARY 4 # # Using where; Using index; Using join buffer (incremental, BNL join) SELECT subquery2_t2.col_int_key AS subquery2_field1 FROM (c AS subquery2_t1 RIGHT JOIN (c AS subquery2_t2 LEFT JOIN cc AS subquery2_t3 ON @@ -793,16 +793,16 @@ KEY (col_int_key) ); INSERT INTO cc (col_int_nokey) VALUES (0),(1),(7),(0),(4),(5); EXPLAIN SELECT pk FROM cc WHERE col_int_key > 3; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE cc range col_int_key col_int_key 5 NULL # # +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE cc NULL range col_int_key col_int_key 5 # # Using index condition SELECT pk FROM cc WHERE col_int_key > 3; pk 5 6 3 EXPLAIN SELECT pk FROM cc WHERE col_int_key > 3 ORDER BY 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE cc range col_int_key col_int_key 5 NULL # # +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE cc NULL range col_int_key col_int_key 5 # # Using index condition; Using filesort SELECT pk FROM cc WHERE col_int_key > 3 ORDER BY 1; pk 3 @@ -875,13 +875,13 @@ WHERE SUBQUERY1_t2.pk >= 9 ) AS table3 ON (table3.col_int_key = table2.col_int_key ) ) ) ON (table3.col_int_nokey = table2.pk ) ) GROUP BY field1, field2; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY table1 system NULL NULL NULL NULL # -1 PRIMARY table2 ALL PRIMARY,col_int_key,col_int_key_2 NULL NULL NULL # Using where -1 PRIMARY <derived2> ref key0 key0 9 test.table2.pk,test.table2.col_int_key # -2 DERIVED SUBQUERY1_t2 ALL PRIMARY,col_int_key,col_varchar_key,col_int_key_2 NULL NULL NULL # Using where -2 DERIVED SUBQUERY1_t3 ref PRIMARY,col_varchar_key col_varchar_key 5 test.SUBQUERY1_t2.col_varchar_key # -2 DERIVED SUBQUERY1_t1 ALL col_int_key,col_int_key_2 NULL NULL NULL # Using where; Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY table1 NULL system NULL NULL NULL # 1 +1 PRIMARY table2 NULL ALL PRIMARY,col_int_key,col_int_key_2 NULL NULL # 19 Using where +1 PRIMARY <derived2> NULL ref key0 key0 9 # 10 +2 DERIVED SUBQUERY1_t2 NULL ALL PRIMARY,col_int_key,col_varchar_key,col_int_key_2 NULL NULL # 19 Using where +2 DERIVED SUBQUERY1_t3 NULL ref PRIMARY,col_varchar_key col_varchar_key 5 # 1 +2 DERIVED SUBQUERY1_t1 NULL ALL col_int_key,col_int_key_2 NULL NULL # 19 Using where; Using join buffer (flat, BNL join) SELECT table1.pk AS field1 , table1.col_datetime_key AS field2 @@ -954,11 +954,11 @@ FROM ( cc AS SQ1_alias1 , c AS SQ1_alias2 ) GROUP BY SQ1_field1 , SQ1_field2 ) GROUP BY field1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY alias1 index NULL col_int_key_3 10 NULL # Using index; Using temporary; Using filesort -1 PRIMARY alias2 index NULL col_int_key_2 10 NULL # Using where; Using index; Using join buffer (flat, BNL join) -2 MATERIALIZED SQ1_alias1 index col_int_key,col_int_key_2,col_int_key_3 col_int_key 5 NULL # Using index -2 MATERIALIZED SQ1_alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY alias1 NULL index NULL col_int_key_3 10 # 20 Using index; Using temporary; Using filesort +1 PRIMARY alias2 NULL index NULL col_int_key_2 10 # 20 Using where; Using index; Using join buffer (flat, BNL join) +2 MATERIALIZED SQ1_alias1 NULL index col_int_key,col_int_key_2,col_int_key_3 col_int_key 5 # 20 Using index +2 MATERIALIZED SQ1_alias2 NULL ALL NULL NULL NULL # 20 Using join buffer (flat, BNL join) SELECT alias2 . col_varchar_key AS field1 FROM ( cc AS alias1 , cc AS alias2 ) @@ -1017,8 +1017,8 @@ KEY cover_key1 (col_int, col_varchar_255_utf8_key)); INSERT INTO j(col_int, pk, col_varchar_10_utf8) VALUES(9, 1, '951910400'), (-1934295040, 2, '1235025920'),(-584581120, 3, '-1176633344'),(3, 4, '1074462720'); EXPLAIN SELECT col_varchar_255_utf8_key FROM j ORDER BY 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE j index NULL cover_key1 773 NULL # Using index; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE j NULL index NULL cover_key1 773 # 4 Using index; Using filesort SELECT col_varchar_255_utf8_key FROM j ORDER BY col_varchar_255_utf8_key; col_varchar_255_utf8_key -117663334 @@ -1105,23 +1105,23 @@ INSERT INTO t1 (id) VALUES(NULL); ERROR 23000: Column 'id' cannot be null INSERT INTO t1 (id) VALUES(2),(3); EXPLAIN SELECT * FROM t1 FORCE INDEX(b) WHERE b=3; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 const b b 5 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL const b b 5 const 1 EXPLAIN SELECT * FROM t1 AS t2 STRAIGHT_JOIN t1 FORCE INDEX(b) WHERE t1.b=t2.b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL b NULL NULL NULL 2 Using where -1 SIMPLE t1 eq_ref b b 5 test.t2.b 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ALL b NULL NULL NULL 2 Using where +1 SIMPLE t1 NULL eq_ref b b 5 test.t2.b 1 EXPLAIN SELECT b FROM t1 FORCE INDEX(b); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b 5 NULL 2 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL b 5 NULL 2 Using index INSERT INTO t1 (id) VALUES(4),(5),(6),(7),(8),(9),(10); EXPLAIN SELECT b FROM t1 FORCE INDEX(b) WHERE b BETWEEN 1 AND 5; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range b b 5 NULL 3 Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range b b 5 NULL 3 Using where; Using index EXPLAIN SELECT * FROM t2 AS t1 WHERE b NOT IN (SELECT b FROM t1 FORCE INDEX(b)); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 1 -2 SUBQUERY t1 index_subquery b b 5 func 3 Using index; Full scan on NULL key +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL system NULL NULL NULL NULL 1 +2 SUBQUERY t1 NULL index_subquery b b 5 func 3 Using index; Full scan on NULL key DROP TABLE t1; DROP TABLE t2, t3; # @@ -1175,8 +1175,8 @@ UNIQUE KEY i0008 (a) INSERT INTO t(a,b) VALUES(1,'cccc'); EXPLAIN SELECT /*+ bka() */ 1 AS c FROM t AS b RIGHT JOIN t AS c ON b.a > c.c WHERE b.b>c.a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables Warnings: Warning 1292 Truncated incorrect DOUBLE value: 'cccc' Warning 1292 Truncated incorrect DOUBLE value: 'cccc' @@ -1211,8 +1211,8 @@ a0.i1 + a1.i1*10 FROM t0 AS a0, t0 AS a1, t0 AS a2; EXPLAIN SELECT * FROM t1 WHERE i1 > 41 AND i1 <= 43; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range idx idx 4 NULL 20 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range idx idx 4 NULL 20 Using index condition SELECT * FROM t1 WHERE i1 > 41 AND i1 <= 43; pk i1 i2 v1 v2 @@ -1239,8 +1239,8 @@ pk i1 i2 v1 v2 ALTER TABLE t1 ADD INDEX idx2(v1); EXPLAIN SELECT * FROM t1 WHERE v1 > 41 AND v1 <= 43; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range idx2 idx2 5 NULL # Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range idx2 idx2 5 # 20 Using index condition SELECT * FROM t1 WHERE v1 > 41 AND v1 <= 43; pk i1 i2 v1 v2 @@ -1324,12 +1324,12 @@ WHERE t4.c1 < 'o' ) ) AND t1.i1 <= t3.i2_key; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 -1 PRIMARY t3 eq_ref PRIMARY,v_idx PRIMARY 4 test.t4.i1 1 Using where -1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) -2 MATERIALIZED t4 ALL NULL NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 4 +1 PRIMARY <subquery2> NULL ALL distinct_key NULL NULL NULL 2 +1 PRIMARY t3 NULL eq_ref PRIMARY,v_idx PRIMARY 4 test.t4.i1 1 Using where +1 PRIMARY t2 NULL ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) +2 MATERIALIZED t4 NULL ALL NULL NULL NULL NULL 3 Using where SELECT /*+ NO_SEMIJOIN(@subq1) */ t1.c1, t2.i1 FROM t1 STRAIGHT_JOIN t3 STRAIGHT_JOIN t2 WHERE ( t3.pk IN @@ -1380,12 +1380,12 @@ WHERE t4.c1 < 'o' ) ) AND t1.i1 <= t3.i2_key; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 -1 PRIMARY t3 eq_ref PRIMARY,v_idx,v_idx2 PRIMARY 4 test.t4.i1 1 Using where -1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) -2 MATERIALIZED t4 ALL NULL NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 4 +1 PRIMARY <subquery2> NULL ALL distinct_key NULL NULL NULL 2 +1 PRIMARY t3 NULL eq_ref PRIMARY,v_idx,v_idx2 PRIMARY 4 test.t4.i1 1 Using where +1 PRIMARY t2 NULL ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) +2 MATERIALIZED t4 NULL ALL NULL NULL NULL NULL 3 Using where SELECT /*+ NO_SEMIJOIN(@subq1) */ t1.c1, t2.i1 FROM t1 STRAIGHT_JOIN t3 STRAIGHT_JOIN t2 WHERE ( t3.pk IN @@ -1438,12 +1438,12 @@ WHERE t4.c1 < 'o' ) ) AND t1.i1 <= t3.i2_key; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 -1 PRIMARY t3 eq_ref PRIMARY,v_idx2 PRIMARY 4 test.t4.i1 1 Using where -1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) -2 MATERIALIZED t4 ALL NULL NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 4 +1 PRIMARY <subquery2> NULL ALL distinct_key NULL NULL NULL 2 +1 PRIMARY t3 NULL eq_ref PRIMARY,v_idx2 PRIMARY 4 test.t4.i1 1 Using where +1 PRIMARY t2 NULL ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) +2 MATERIALIZED t4 NULL ALL NULL NULL NULL NULL 3 Using where SELECT /*+ NO_SEMIJOIN(@subq1) */ t1.c1, t2.i1 FROM t1 STRAIGHT_JOIN t3 STRAIGHT_JOIN t2 WHERE ( t3.pk IN @@ -1505,12 +1505,12 @@ WHERE t4.c1 < 'o' ) ) AND t1.i1 <= t3.i2_key; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 -1 PRIMARY t3 eq_ref PRIMARY,v_idx PRIMARY 4 test.t4.i1 1 Using where -1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) -2 MATERIALIZED t4 ALL NULL NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 4 +1 PRIMARY <subquery2> NULL ALL distinct_key NULL NULL NULL 2 +1 PRIMARY t3 NULL eq_ref PRIMARY,v_idx PRIMARY 4 test.t4.i1 1 Using where +1 PRIMARY t2 NULL ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) +2 MATERIALIZED t4 NULL ALL NULL NULL NULL NULL 3 Using where SELECT /*+ NO_SEMIJOIN(@subq1) */ t1.c1, t2.i1, t3.i1 FROM t1 STRAIGHT_JOIN t3 STRAIGHT_JOIN t2 WHERE ( t3.pk IN @@ -1561,11 +1561,11 @@ WHERE t4.c1 < 'o' and t4.i1 < (t2.i1 + 1) ) ) AND t1.i1 <= t3.i2_key; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t4 ALL NULL NULL NULL NULL 3 Using where; Start temporary -1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join) -1 PRIMARY t3 eq_ref PRIMARY,v_idx PRIMARY 4 test.t4.i1 1 Using where -1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where; End temporary; Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t4 NULL ALL NULL NULL NULL NULL 3 Using where; Start temporary +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join) +1 PRIMARY t3 NULL eq_ref PRIMARY,v_idx PRIMARY 4 test.t4.i1 1 Using where +1 PRIMARY t2 NULL ALL NULL NULL NULL NULL 5 Using where; End temporary; Using join buffer (flat, BNL join) SELECT /*+ NO_SEMIJOIN(@subq1) */ t1.c1, t2.i1 FROM t1 STRAIGHT_JOIN t3 STRAIGHT_JOIN t2 WHERE ( t3.pk IN diff --git a/mysql-test/suite/gcol/r/gcol_view_innodb.result b/mysql-test/suite/gcol/r/gcol_view_innodb.result index 15e1cfeb983..153e8acd387 100644 --- a/mysql-test/suite/gcol/r/gcol_view_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_view_innodb.result @@ -19,8 +19,8 @@ select is_updatable from information_schema.views where table_name='v1'; is_updatable NO explain select d,e from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL X +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL X create algorithm=temptable view v2 (d,e) as select abs(b), abs(c) from t1; show create view v2; View Create View character_set_client collation_connection @@ -33,9 +33,9 @@ d e 2 2 3 3 explain select d,e from v2; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL X -2 DERIVED t1 ALL NULL NULL NULL NULL X +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL X +2 DERIVED t1 NULL ALL NULL NULL NULL NULL X create view v3 (d,e) as select d*2, e*2 from v1; select * from v3; d e @@ -45,8 +45,8 @@ d e 4 4 6 6 explain select * from v3; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL X +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL X drop view v1,v2,v3; drop table t1; create table t1 (a int not null, @@ -60,9 +60,9 @@ b -2 -3 explain select * from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL X -2 DERIVED t1 ALL NULL NULL NULL NULL X Using temporary +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL X +2 DERIVED t1 NULL ALL NULL NULL NULL NULL X Using temporary select * from t1; a b c 1 -1 -1 @@ -79,9 +79,9 @@ c -2 -3 explain select * from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL X -2 DERIVED t1 ALL NULL NULL NULL NULL X Using temporary +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL X +2 DERIVED t1 NULL ALL NULL NULL NULL NULL X Using temporary select * from t1; a b c 1 -1 -1 @@ -102,9 +102,9 @@ b+1 0 -1 explain select * from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL X -2 DERIVED t1 ALL NULL NULL NULL NULL X Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL X +2 DERIVED t1 NULL ALL NULL NULL NULL NULL X Using filesort drop view v1; create view v1 as select c+1 from t1 order by 1 desc limit 2; select * from v1; @@ -112,9 +112,9 @@ c+1 -1 0 explain select * from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL X -2 DERIVED t1 ALL NULL NULL NULL NULL X Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL X +2 DERIVED t1 NULL ALL NULL NULL NULL NULL X Using filesort drop view v1; drop table t1; create table t1 (a int, diff --git a/mysql-test/suite/gcol/r/gcol_view_myisam.result b/mysql-test/suite/gcol/r/gcol_view_myisam.result index d266405dc66..1a255649894 100644 --- a/mysql-test/suite/gcol/r/gcol_view_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_view_myisam.result @@ -19,8 +19,8 @@ select is_updatable from information_schema.views where table_name='v1'; is_updatable NO explain select d,e from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL X +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL X create algorithm=temptable view v2 (d,e) as select abs(b), abs(c) from t1; show create view v2; View Create View character_set_client collation_connection @@ -33,9 +33,9 @@ d e 2 2 3 3 explain select d,e from v2; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL X -2 DERIVED t1 ALL NULL NULL NULL NULL X +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL X +2 DERIVED t1 NULL ALL NULL NULL NULL NULL X create view v3 (d,e) as select d*2, e*2 from v1; select * from v3; d e @@ -45,8 +45,8 @@ d e 4 4 6 6 explain select * from v3; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL X +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL X drop view v1,v2,v3; drop table t1; create table t1 (a int not null, @@ -60,9 +60,9 @@ b -2 -3 explain select * from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL X -2 DERIVED t1 ALL NULL NULL NULL NULL X Using temporary +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL X +2 DERIVED t1 NULL ALL NULL NULL NULL NULL X Using temporary select * from t1; a b c 1 -1 -1 @@ -79,9 +79,9 @@ c -2 -3 explain select * from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL X -2 DERIVED t1 ALL NULL NULL NULL NULL X Using temporary +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL X +2 DERIVED t1 NULL ALL NULL NULL NULL NULL X Using temporary select * from t1; a b c 1 -1 -1 @@ -102,9 +102,9 @@ b+1 0 -1 explain select * from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL X -2 DERIVED t1 ALL NULL NULL NULL NULL X Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL X +2 DERIVED t1 NULL ALL NULL NULL NULL NULL X Using filesort drop view v1; create view v1 as select c+1 from t1 order by 1 desc limit 2; select * from v1; @@ -112,9 +112,9 @@ c+1 -1 0 explain select * from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL X -2 DERIVED t1 ALL NULL NULL NULL NULL X Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL X +2 DERIVED t1 NULL ALL NULL NULL NULL NULL X Using filesort drop view v1; drop table t1; create table t1 (a int, diff --git a/mysql-test/suite/gcol/r/innodb_virtual_fk.result b/mysql-test/suite/gcol/r/innodb_virtual_fk.result index de61c16f739..ab87ee99b1e 100644 --- a/mysql-test/suite/gcol/r/innodb_virtual_fk.result +++ b/mysql-test/suite/gcol/r/innodb_virtual_fk.result @@ -596,8 +596,8 @@ KEY (f1, f2), FOREIGN KEY(f1) REFERENCES t1(f1))ENGINE=INNODB; INSERT INTO t1 VALUES(1); INSERT INTO t2(f1) VALUES(1); EXPLAIN SELECT f1, f2 FROM t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL f1 9 NULL 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL index NULL f1 9 NULL 1 Using index SELECT f1, f2 FROM t2; f1 f2 1 1 @@ -611,15 +611,15 @@ ON UPDATE CASCADE)ENGINE=INNODB; INSERT INTO t1 VALUES(1); INSERT INTO t2(f1) VALUES(1); EXPLAIN SELECT f1, f2 FROM t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL f1 9 NULL 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL index NULL f1 9 NULL 1 Using index SELECT f1, f2 FROM t2; f1 f2 1 1 UPDATE t1 SET f1 = 2 WHERE f1 = 1; EXPLAIN SELECT f1, f2 FROM t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL f1 9 NULL 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL index NULL f1 9 NULL 1 Using index SELECT f1, f2 FROM t2; f1 f2 2 2 @@ -635,8 +635,8 @@ ON UPDATE CASCADE, ALGORITHM=INPLACE; SET FOREIGN_KEY_CHECKS = 1; UPDATE t1 SET f1 = 3; EXPLAIN SELECT f1, f2 FROM t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL f1 9 NULL 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL index NULL f1 9 NULL 1 Using index SELECT f1, f2 FROM t2; f1 f2 3 3 @@ -650,8 +650,8 @@ ALTER TABLE t2 ADD FOREIGN KEY (f1) REFERENCES t1(f1) ON UPDATE CASCADE, ALGORITHM=COPY; UPDATE t1 SET f1 = 3; EXPLAIN SELECT f1, f2 FROM t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL f1 9 NULL 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL index NULL f1 9 NULL 1 Using index SELECT f1, f2 FROM t2; f1 f2 3 3 @@ -666,8 +666,8 @@ INSERT INTO t2(f1) VALUES(1); ALTER TABLE t2 DROP COLUMN f2, ALGORITHM=INPLACE; UPDATE t1 SET f1 = 3; EXPLAIN SELECT f1, f3 FROM t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL idx1 9 NULL 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL index NULL idx1 9 NULL 1 Using index SELECT f1, f3 FROM t2; f1 f3 3 2 @@ -682,8 +682,8 @@ INSERT INTO t2(f1) VALUES(1); ALTER TABLE t2 DROP COLUMN f2, ALGORITHM=COPY; UPDATE t1 SET f1 = 3; EXPLAIN SELECT f1, f3 FROM t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL idx1 9 NULL 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL index NULL idx1 9 NULL 1 Using index SELECT f1, f3 FROM t2; f1 f3 3 2 diff --git a/mysql-test/suite/heap/heap.result b/mysql-test/suite/heap/heap.result index 15bb9ea0b50..9ae656ea8c8 100644 --- a/mysql-test/suite/heap/heap.result +++ b/mysql-test/suite/heap/heap.result @@ -65,8 +65,8 @@ a 869751 alter table t1 engine=myisam; explain select * from t1 where a in (869751,736494,226312,802616); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range uniq_id uniq_id 4 NULL 4 Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range uniq_id uniq_id 4 NULL 4 Using where; Using index drop table t1; create table t1 (x int not null, y int not null, key x (x), unique y (y)) engine=heap; @@ -84,9 +84,9 @@ x y x y 2 5 2 2 2 6 2 2 explain select * from t1,t1 as t2 where t1.x=t2.y; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL x NULL NULL NULL 6 -1 SIMPLE t2 eq_ref y y 4 test.t1.x 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL x NULL NULL NULL 6 +1 SIMPLE t2 NULL eq_ref y y 4 test.t1.x 1 drop table t1; create table t1 (a int) engine=heap; insert into t1 values(1); @@ -158,18 +158,18 @@ drop table t1; create table t1 (btn char(10) not null, key(btn)) engine=heap; insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("a"),("b"),("c"),("d"),("e"),("f"),("g"),("h"),("i"); explain select * from t1 where btn like "q%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL btn NULL NULL NULL 14 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL btn NULL NULL NULL 14 Using where select * from t1 where btn like "q%"; btn alter table t1 add column new_col char(1) not null, add key (btn,new_col), drop key btn; update t1 set new_col=left(btn,1); explain select * from t1 where btn="a"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL btn NULL NULL NULL 14 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL btn NULL NULL NULL 14 Using where explain select * from t1 where btn="a" and new_col="a"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref btn btn 11 const,const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref btn btn 11 const,const 2 Using where drop table t1; CREATE TABLE t1 ( a int default NULL, @@ -181,16 +181,16 @@ INSERT INTO t1 VALUES (NULL,99),(99,NULL),(1,1),(2,2),(1,3); SELECT * FROM t1 WHERE a=NULL; a b explain SELECT * FROM t1 WHERE a IS NULL; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 5 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 5 const 2 Using where SELECT * FROM t1 WHERE a<=>NULL; a b NULL 99 SELECT * FROM t1 WHERE b=NULL; a b explain SELECT * FROM t1 WHERE b IS NULL; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref b b 5 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref b b 5 const 1 Using where SELECT * FROM t1 WHERE b<=>NULL; a b 99 NULL @@ -203,8 +203,8 @@ key a (a) ) ENGINE=HEAP; INSERT INTO t1 VALUES (10), (10), (10); EXPLAIN SELECT * FROM t1 WHERE a=10; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 5 const 3 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 5 const 3 SELECT * FROM t1 WHERE a=10; a 10 @@ -367,23 +367,23 @@ select count(*) from t1 where v like 'a %'; count(*) 9 explain select count(*) from t1 where v='a '; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 13 const 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 13 const 10 Using where explain select count(*) from t1 where c='a '; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref c c 11 const 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref c c 11 const 10 Using where explain select count(*) from t1 where t='a '; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref t t 13 const 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref t t 13 const 10 Using where explain select count(*) from t1 where v like 'a%'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL v NULL NULL NULL 271 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL v NULL NULL NULL 271 Using where explain select count(*) from t1 where v between 'a' and 'a '; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 13 const 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 13 const 10 Using where explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 13 const 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 13 const 10 Using where alter table t1 add unique(v); ERROR 23000: Duplicate entry '{ ' for key 'v_2' select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a' order by length(concat('*',v,'*',c,'*',t,'*')); @@ -399,8 +399,8 @@ qq *a *a*a * *a *a*a * explain select * from t1 where v='a'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 13 const 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 13 const 10 Using where select v,count(*) from t1 group by v limit 10; v count(*) a 1 @@ -590,23 +590,23 @@ select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\ count(*) 7 explain select count(*) from t1 where v='a '; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 13 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 13 const # Using where explain select count(*) from t1 where c='a '; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref c c 11 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref c c 11 const # Using where explain select count(*) from t1 where t='a '; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref t t 13 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref t t 13 const # Using where explain select count(*) from t1 where v like 'a%'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 13 NULL # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range v v 13 NULL # Using where explain select count(*) from t1 where v between 'a' and 'a '; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 13 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 13 const # Using where explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 13 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 13 const # Using where alter table t1 add unique(v); ERROR 23000: Duplicate entry '{ ' for key 'v_2' select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a' order by length(concat('*',v,'*',c,'*',t,'*')); @@ -619,8 +619,8 @@ qq *a *a*a * *a *a*a * explain select * from t1 where v='a'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 13 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 13 const # Using where drop table t1; create table t1 (a char(10), unique using btree (a)) engine=heap; insert into t1 values ('a'); @@ -792,10 +792,10 @@ col_int_nokey # shouldn't crash EXPLAIN SELECT col_int_nokey FROM t2 WHERE ('h', 0) NOT IN ( SELECT * FROM v1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL 2 -2 SUBQUERY <derived3> ALL NULL NULL NULL NULL 2 Using where -3 DERIVED t1 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t2 NULL ALL NULL NULL NULL NULL 2 +2 SUBQUERY <derived3> NULL ALL NULL NULL NULL NULL 2 Using where +3 DERIVED t1 NULL range PRIMARY PRIMARY 4 NULL 1 Using index condition; Using where DROP TABLE t1,t2,h1; DROP VIEW v1; CREATE TABLE t1 (a int, index(a)) engine=heap min_rows=10 max_rows=100; diff --git a/mysql-test/suite/heap/heap.test b/mysql-test/suite/heap/heap.test index ef950da5484..e5d0408de68 100644 --- a/mysql-test/suite/heap/heap.test +++ b/mysql-test/suite/heap/heap.test @@ -349,26 +349,26 @@ select count(*) from t1 where v='a '; select count(*) from t1 where c='a '; select count(*) from t1 where t='a '; select count(*) from t1 where v between 'a' and 'a '; ---replace_column 9 # +--replace_column 10 # select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; ---replace_column 9 # +--replace_column 10 # explain select count(*) from t1 where v='a '; ---replace_column 9 # +--replace_column 10 # explain select count(*) from t1 where c='a '; ---replace_column 9 # +--replace_column 10 # explain select count(*) from t1 where t='a '; ---replace_column 9 # +--replace_column 10 # explain select count(*) from t1 where v like 'a%'; ---replace_column 9 # +--replace_column 10 # explain select count(*) from t1 where v between 'a' and 'a '; ---replace_column 9 # +--replace_column 10 # explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; --error ER_DUP_ENTRY alter table t1 add unique(v); select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a' order by length(concat('*',v,'*',c,'*',t,'*')); # Number of rows is not constant for b-trees keys ---replace_column 9 # +--replace_column 10 # explain select * from t1 where v='a'; drop table t1; diff --git a/mysql-test/suite/heap/heap_btree.result b/mysql-test/suite/heap/heap_btree.result index 526c76a52e8..318c6e326f5 100644 --- a/mysql-test/suite/heap/heap_btree.result +++ b/mysql-test/suite/heap/heap_btree.result @@ -64,19 +64,19 @@ a 802616 869751 explain select * from t1 where a in (869751,736494,226312,802616); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range uniq_id uniq_id 4 NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range uniq_id uniq_id 4 NULL 4 Using where alter table t1 engine=myisam; explain select * from t1 where a in (869751,736494,226312,802616); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range uniq_id uniq_id 4 NULL 4 Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range uniq_id uniq_id 4 NULL 4 Using where; Using index drop table t1; create table t1 (x int not null, y int not null, key x using BTREE (x,y), unique y using BTREE (y)) engine=heap; insert into t1 values (1,1),(2,2),(1,3),(2,4),(2,5),(2,6); explain select * from t1 where x=1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref x x 4 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref x x 4 const 1 select * from t1 where x=1; x y 1 1 @@ -90,9 +90,9 @@ x y x y 2 5 2 2 2 6 2 2 explain select * from t1,t1 as t2 where t1.x=t2.y; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL x NULL NULL NULL 6 -1 SIMPLE t2 eq_ref y y 4 test.t1.x 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL x NULL NULL NULL 6 +1 SIMPLE t2 NULL eq_ref y y 4 test.t1.x 1 drop table t1; create table t1 (a int) engine=heap; insert into t1 values(1); @@ -126,18 +126,18 @@ a b 1 6 1 6 explain select * from tx where a=x order by a,b; -id select_type table type possible_keys key key_len ref rows Extra -x SIMPLE tx ref a a x const x Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +x SIMPLE tx NULL ref a a x const x Using where explain select * from tx where a=x order by b; -id select_type table type possible_keys key key_len ref rows Extra -x SIMPLE tx ref a a x const x Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +x SIMPLE tx NULL ref a a x const x Using where select * from t1 where b=1; a b 1 1 1 1 explain select * from tx where b=x; -id select_type table type possible_keys key key_len ref rows Extra -x SIMPLE tx ref b b x const x +id select_type table partitions type possible_keys key key_len ref rows Extra +x SIMPLE tx NULL ref b b x const x drop table t1; create table t1 (id int unsigned not null, primary key using BTREE (id)) engine=HEAP; insert into t1 values(1); @@ -177,17 +177,17 @@ drop table t1; create table t1 (btn char(10) not null, key using BTREE (btn)) engine=heap; insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("hello"),("hello"), ("a"),("b"),("c"),("d"),("e"),("f"),("g"),("h"),("i"); explain select * from t1 where btn like "i%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range btn btn 10 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range btn btn 10 NULL 1 Using where explain select * from t1 where btn like "h%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range btn btn 10 NULL # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range btn btn 10 NULL # Using where explain select * from t1 where btn like "a%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range btn btn 10 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range btn btn 10 NULL 1 Using where explain select * from t1 where btn like "b%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range btn btn 10 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range btn btn 10 NULL 1 Using where select * from t1 where btn like "ff%"; btn select * from t1 where btn like " %"; @@ -197,11 +197,11 @@ btn alter table t1 add column new_col char(1) not null, add key using BTREE (btn,new_col), drop key btn; update t1 set new_col=left(btn,1); explain select * from t1 where btn="a"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref btn btn 10 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref btn btn 10 const 1 Using where explain select * from t1 where btn="a" and new_col="a"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref btn btn 11 const,const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref btn btn 11 const,const 1 Using where drop table t1; CREATE TABLE t1 ( a int default NULL, @@ -213,16 +213,16 @@ INSERT INTO t1 VALUES (NULL,99),(99,NULL),(1,1),(2,2),(1,3); SELECT * FROM t1 WHERE a=NULL; a b explain SELECT * FROM t1 WHERE a IS NULL; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 5 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 5 const 1 Using where SELECT * FROM t1 WHERE a<=>NULL; a b NULL 99 SELECT * FROM t1 WHERE b=NULL; a b explain SELECT * FROM t1 WHERE b IS NULL; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref b b 5 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref b b 5 const 1 Using where SELECT * FROM t1 WHERE b<=>NULL; a b 99 NULL @@ -356,21 +356,21 @@ select 0+a from t1 where a > 736494; 802616 869751 explain select 0+a from t1 where a > 736494; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range uniq_id uniq_id 8 NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range uniq_id uniq_id 8 NULL 3 Using where select 0+a from t1 where a = 736494; 0+a 736494 explain select 0+a from t1 where a = 736494; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 const uniq_id uniq_id 8 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL const uniq_id uniq_id 8 const 1 select 0+a from t1 where a=869751 or a=736494; 0+a 736494 869751 explain select 0+a from t1 where a=869751 or a=736494; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range uniq_id uniq_id 8 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range uniq_id uniq_id 8 NULL 2 Using where insert into t1 (a) select * from seq_1_to_100; select 0+a from t1 where a in (869751,736494,226312,802616); 0+a @@ -379,8 +379,8 @@ select 0+a from t1 where a in (869751,736494,226312,802616); 802616 869751 explain select 0+a from t1 where a in (869751,736494,226312,802616); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range uniq_id uniq_id 8 NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range uniq_id uniq_id 8 NULL 4 Using where drop table t1; End of 5.3 tests create table t1 (id int, a varchar(300) not null, key using btree(a)) engine=heap; diff --git a/mysql-test/suite/heap/heap_btree.test b/mysql-test/suite/heap/heap_btree.test index d3fbe4cc0d2..d86f0828742 100644 --- a/mysql-test/suite/heap/heap_btree.test +++ b/mysql-test/suite/heap/heap_btree.test @@ -116,7 +116,7 @@ drop table t1; create table t1 (btn char(10) not null, key using BTREE (btn)) engine=heap; insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("hello"),("hello"), ("a"),("b"),("c"),("d"),("e"),("f"),("g"),("h"),("i"); explain select * from t1 where btn like "i%"; ---replace_column 9 # +--replace_column 10 # explain select * from t1 where btn like "h%"; explain select * from t1 where btn like "a%"; explain select * from t1 where btn like "b%"; diff --git a/mysql-test/suite/heap/heap_hash.result b/mysql-test/suite/heap/heap_hash.result index eb73b53dd2f..659da48ce22 100644 --- a/mysql-test/suite/heap/heap_hash.result +++ b/mysql-test/suite/heap/heap_hash.result @@ -64,8 +64,8 @@ a 869751 alter table t1 engine=myisam; explain select * from t1 where a in (869751,736494,226312,802616); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL uniq_id NULL NULL NULL 5 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL uniq_id NULL NULL NULL 5 Using where drop table t1; create table t1 (x int not null, y int not null, key x using HASH (x), unique y using HASH (y)) engine=heap; @@ -83,9 +83,9 @@ x y x y 2 5 2 2 2 6 2 2 explain select * from t1,t1 as t2 where t1.x=t2.y; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL x NULL NULL NULL 6 -1 SIMPLE t2 eq_ref y y 4 test.t1.x 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL x NULL NULL NULL 6 +1 SIMPLE t2 NULL eq_ref y y 4 test.t1.x 1 drop table t1; create table t1 (a int) engine=heap; insert into t1 values(1); @@ -157,18 +157,18 @@ drop table t1; create table t1 (btn char(10) not null, key using HASH (btn)) engine=heap; insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("a"),("b"),("c"),("d"),("e"),("f"),("g"),("h"),("i"); explain select * from t1 where btn like "q%"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL btn NULL NULL NULL 14 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL btn NULL NULL NULL 14 Using where select * from t1 where btn like "q%"; btn alter table t1 add column new_col char(1) not null, add key using HASH (btn,new_col), drop key btn; update t1 set new_col=left(btn,1); explain select * from t1 where btn="a"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL btn NULL NULL NULL 14 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL btn NULL NULL NULL 14 Using where explain select * from t1 where btn="a" and new_col="a"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref btn btn 11 const,const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref btn btn 11 const,const 2 Using where drop table t1; CREATE TABLE t1 ( a int default NULL, @@ -180,16 +180,16 @@ INSERT INTO t1 VALUES (NULL,99),(99,NULL),(1,1),(2,2),(1,3); SELECT * FROM t1 WHERE a=NULL; a b explain SELECT * FROM t1 WHERE a IS NULL; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 5 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 5 const 2 Using where SELECT * FROM t1 WHERE a<=>NULL; a b NULL 99 SELECT * FROM t1 WHERE b=NULL; a b explain SELECT * FROM t1 WHERE b IS NULL; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref b b 5 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref b b 5 const 1 Using where SELECT * FROM t1 WHERE b<=>NULL; a b 99 NULL @@ -218,59 +218,59 @@ insert into t1 values ('aaaf', 'prefill-hash=4',0); insert into t1 values ('aaag', 'prefill-hash=3',0); insert into t1 values ('aaah', 'prefill-hash=6',0); explain select * from t1 where a='aaaa'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 8 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 8 const 2 Using where explain select * from t1 where a='aaab'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 8 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 8 const 2 Using where explain select * from t1 where a='aaac'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 8 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 8 const 2 Using where explain select * from t1 where a='aaad'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 8 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 8 const 2 Using where insert into t1 select * from t1; flush tables; explain select * from t1 where a='aaaa'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 8 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 8 const 2 Using where explain select * from t1 where a='aaab'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 8 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 8 const 2 Using where explain select * from t1 where a='aaac'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 8 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 8 const 2 Using where explain select * from t1 where a='aaad'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 8 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 8 const 2 Using where flush tables; explain select * from t1 where a='aaaa'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 8 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 8 const 2 Using where explain select * from t1 where a='aaab'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 8 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 8 const 2 Using where explain select * from t1 where a='aaac'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 8 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 8 const 2 Using where explain select * from t1 where a='aaad'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 8 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 8 const 2 Using where create table t2 as select * from t1; delete from t1; insert into t1 select * from t2; explain select * from t1 where a='aaaa'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 8 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 8 const 2 Using where explain select * from t1 where a='aaab'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 8 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 8 const 2 Using where explain select * from t1 where a='aaac'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 8 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 8 const 2 Using where explain select * from t1 where a='aaad'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 8 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref a a 8 const 2 Using where drop table t1, t2; create table t1 ( id int unsigned not null primary key auto_increment, @@ -289,29 +289,29 @@ insert into t1 (name) values ('Matt'), ('Lilu'), ('Corbin'), ('Carly'), ('Emily'), ('Mike'); insert into t2 select * from t1; explain select * from t1 where name='matt'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref heap_idx,btree_idx btree_idx 22 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref heap_idx,btree_idx btree_idx 22 const 1 Using where explain select * from t2 where name='matt'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ref btree_idx,heap_idx btree_idx 22 const 1 Using where explain select * from t1 where name='Lilu'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref heap_idx,btree_idx btree_idx 22 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref heap_idx,btree_idx btree_idx 22 const 1 Using where explain select * from t2 where name='Lilu'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ref btree_idx,heap_idx btree_idx 22 const 1 Using where explain select * from t1 where name='Phil'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref heap_idx,btree_idx btree_idx 22 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref heap_idx,btree_idx btree_idx 22 const 1 Using where explain select * from t2 where name='Phil'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ref btree_idx,heap_idx btree_idx 22 const 1 Using where explain select * from t1 where name='Lilu'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref heap_idx,btree_idx btree_idx 22 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref heap_idx,btree_idx btree_idx 22 const 1 Using where explain select * from t2 where name='Lilu'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ref btree_idx,heap_idx btree_idx 22 const 1 Using where insert into t1 (name) select name from t2; insert into t1 (name) select name from t2; insert into t1 (name) select name from t2; @@ -323,8 +323,8 @@ select count(*) from t1 where name='Matt'; count(*) 7 explain select * from t1 ignore index (btree_idx) where name='matt'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref heap_idx heap_idx 22 const 7 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref heap_idx heap_idx 22 const 7 Using where show index from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored t1 0 PRIMARY 1 id NULL 91 NULL NULL HASH NO @@ -351,9 +351,9 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par t3 1 a 1 a NULL NULL NULL NULL HASH NO t3 1 a 2 b NULL 13 NULL NULL HASH NO explain select * from t1 ignore key(btree_idx), t3 where t1.name='matt' and t3.a = concat('',t1.name) and t3.b=t1.name; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref heap_idx heap_idx 22 const 7 Using where -1 SIMPLE t3 ref a a 44 func,const 7 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref heap_idx heap_idx 22 const 7 Using where +1 SIMPLE t3 NULL ref a a 44 func,const 7 Using where drop table t1, t2, t3; create temporary table t1 ( a int, index (a) ) engine=memory; insert into t1 values (1),(2),(3),(4),(5); @@ -362,8 +362,8 @@ a 1 3 explain select a from t1 where a in (1,3); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 5 NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range a a 5 NULL 4 Using where drop table t1; End of 4.1 tests CREATE TABLE t1(col1 VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, @@ -392,8 +392,8 @@ INSERT INTO t1 VALUES (2, NULL); INSERT INTO t1 VALUES (3, 1); INSERT INTO t1 VALUES (4, NULL); EXPLAIN SELECT * FROM t1 WHERE val IS NULL; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref val val 5 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref val val 5 const 1 Using where SELECT * FROM t1 WHERE val IS NULL; pk val 4 NULL @@ -410,21 +410,21 @@ select 0+a from t1 where a > 736494; 869751 802616 explain select 0+a from t1 where a > 736494; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL uniq_id NULL NULL NULL 5 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL uniq_id NULL NULL NULL 5 Using where select 0+a from t1 where a = 736494; 0+a 736494 explain select 0+a from t1 where a = 736494; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 const uniq_id uniq_id 8 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL const uniq_id uniq_id 8 const 1 select 0+a from t1 where a=869751 or a=736494; 0+a 736494 869751 explain select 0+a from t1 where a=869751 or a=736494; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range uniq_id uniq_id 8 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range uniq_id uniq_id 8 NULL 2 Using where select 0+a from t1 where a in (869751,736494,226312,802616,728912); 0+a 226312 @@ -433,8 +433,8 @@ select 0+a from t1 where a in (869751,736494,226312,802616,728912); 802616 869751 explain select 0+a from t1 where a in (869751,736494,226312,802616,728912); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range uniq_id uniq_id 8 NULL 5 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range uniq_id uniq_id 8 NULL 5 Using where drop table t1; End of 5.3 tests # @@ -453,15 +453,15 @@ DROP TABLE t1; CREATE TABLE t1 (c1 VARCHAR(10) NOT NULL, KEY i1 (c1(3))) ENGINE=MEMORY DEFAULT CHARSET=latin1; INSERT INTO t1 VALUES ('foo1'), ('bar2'), ('baz3'); explain SELECT * FROM t1 WHERE c1='bar2'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref i1 i1 5 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref i1 i1 5 const 2 Using where SELECT * FROM t1 WHERE c1='bar2'; c1 bar2 ALTER TABLE t1 DROP KEY i1, ADD KEY il (c1(3)) using btree; explain SELECT * FROM t1 WHERE c1='bar2'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref il il 5 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref il il 5 const 1 Using where SELECT * FROM t1 WHERE c1='bar2'; c1 bar2 diff --git a/mysql-test/suite/innodb/r/innodb-dict.result b/mysql-test/suite/innodb/r/innodb-dict.result index d56fec0f9af..78f26c19695 100644 --- a/mysql-test/suite/innodb/r/innodb-dict.result +++ b/mysql-test/suite/innodb/r/innodb-dict.result @@ -17,11 +17,11 @@ INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; INSERT INTO t1 SELECT * FROM t1; EXPLAIN SELECT d FROM t1 WHERE d = 5; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref my_d my_d 5 const 128 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref my_d my_d 5 const 128 Using index EXPLAIN SELECT D FROM t1 WHERE D = 5; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref my_d my_d 5 const 128 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref my_d my_d 5 const 128 Using index ALTER TABLE t1 DROP INDEX my_d; ALTER TABLE t1 MODIFY COLUMN D INT; ANALYZE TABLE t1; @@ -30,11 +30,11 @@ test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK ALTER TABLE t1 ADD INDEX my_d (D); EXPLAIN SELECT d FROM t1 WHERE d = 5; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref my_d my_d 5 const 128 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref my_d my_d 5 const 128 Using index EXPLAIN SELECT D FROM t1 WHERE D = 5; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref my_d my_d 5 const 128 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref my_d my_d 5 const 128 Using index SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/innodb/r/innodb-index-online.result b/mysql-test/suite/innodb/r/innodb-index-online.result index 1ee352cd402..766d22e0ad5 100644 --- a/mysql-test/suite/innodb/r/innodb-index-online.result +++ b/mysql-test/suite/innodb/r/innodb-index-online.result @@ -185,8 +185,8 @@ INSERT INTO t1 SELECT 10 + c1, c2, c3 FROM t1; INSERT INTO t1 SELECT 20 + c1, c2, c3 FROM t1; INSERT INTO t1 SELECT 40 + c1, c2, c3 FROM t1; EXPLAIN SELECT COUNT(*) FROM t1 WHERE c2 > 3; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using where ANALYZE TABLE t1; Table Op Msg_type Msg_text test.t1 analyze status Engine-independent statistics collected @@ -207,8 +207,8 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par t1 0 PRIMARY 1 c1 A 80 NULL NULL BTREE NO t1 1 c2d 1 c2 A 10 NULL NULL YES BTREE NO EXPLAIN SELECT COUNT(*) FROM t1 WHERE c2 > 3; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range c2d c2d 5 NULL 32 Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range c2d c2d 5 NULL 32 Using where; Using index SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/innodb/r/innodb-index.result b/mysql-test/suite/innodb/r/innodb-index.result index 603d4a61a89..1edf07859ac 100644 --- a/mysql-test/suite/innodb/r/innodb-index.result +++ b/mysql-test/suite/innodb/r/innodb-index.result @@ -26,8 +26,8 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 analyze table t1; explain select * from t1 force index(d2) order by d; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL d2 23 NULL 4 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL d2 23 NULL 4 select * from t1 force index (d2) order by d; a b c d 3 4 ad ad @@ -80,8 +80,8 @@ Table Op Msg_type Msg_text test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK explain select * from t1 force index(c) order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 10 NULL 4 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c 10 NULL 4 alter table t1 add primary key (a), drop index c; affected rows: 0 info: Records: 0 Duplicates: 0 Warnings: 0 @@ -123,8 +123,8 @@ Table Op Msg_type Msg_text test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK explain select * from t1 force index(c) order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 10 NULL 4 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c 10 NULL 4 select * from t1 force index(c) order by c; a b c d 3 4 ad ad @@ -178,14 +178,14 @@ a b c d 4 4 tr tr analyze table t1; explain select * from t1 force index(b) order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b 5 NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL b 5 NULL 5 explain select * from t1 force index(c) order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 10 NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c 10 NULL 5 explain select * from t1 force index(d) order by d; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL d 23 NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL d 23 NULL 5 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -256,14 +256,14 @@ a b c d 4 4 afe afe 5 1 ggg ggg explain select * from t1 order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using filesort explain select * from t1 force index(c) order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using filesort explain select * from t1 force index(d) order by d; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using filesort show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -297,14 +297,14 @@ a b c d 5 1 ggg ggg analyze table t1; explain select * from t1 order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 6 Using filesort explain select * from t1 force index(c) order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 6 Using filesort explain select * from t1 order by d; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 6 Using filesort show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -339,8 +339,8 @@ a b c d 8 9 fff fff analyze table t1; explain select * from t1 force index(b) order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b 16 NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL b 16 NULL 5 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -373,8 +373,8 @@ a b c d 11 11 kkk kkk analyze table t1; explain select * from t1 force index(b) order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b 16 NULL 6 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL b 16 NULL 6 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -419,11 +419,11 @@ a b c d 13 13 yyy aaa analyze table t1; explain select * from t1 force index(b) order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b 16 NULL 7 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL b 16 NULL 7 explain select * from t1 force index(c) order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 34 NULL 7 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c 34 NULL 7 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -599,8 +599,8 @@ a b c d 8 9 fff fff 10 10 kkk iii explain select * from t1 force index(b) order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b 5 NULL 6 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL b 5 NULL 6 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -650,14 +650,14 @@ a b c d 10 10 kkk iii 11 11 aaa mmm explain select * from t1 force index(b) order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b 5 NULL 7 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL b 5 NULL 7 explain select * from t1 force index(c) order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 31 NULL 7 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c 31 NULL 7 explain select * from t1 force index(d) order by d; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL d 63 NULL 7 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL d 63 NULL 7 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -748,14 +748,14 @@ Table Op Msg_type Msg_text test.t1 check status OK analyze table t1; explain select * from t1 force index(c) order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 5 NULL 9 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c 5 NULL 9 explain select * from t1 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL PRIMARY 4 NULL 9 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL PRIMARY 4 NULL 9 explain select * from t1 force index(b) order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b 4 NULL 9 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL b 4 NULL 9 select * from t1 order by a; a b c 1 5 1 @@ -815,14 +815,14 @@ Table Op Msg_type Msg_text test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK explain select * from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 2 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 2 explain select * from t1 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 2 Using filesort explain select * from t1 order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL PRIMARY 4 NULL 2 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL PRIMARY 4 NULL 2 checksum table t1; Table Checksum test.t1 582702641 @@ -852,11 +852,11 @@ Table Op Msg_type Msg_text test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK explain select * from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL PRIMARY 4 NULL 2 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL PRIMARY 4 NULL 2 Using index explain select * from t1 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL PRIMARY 4 NULL 2 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL PRIMARY 4 NULL 2 Using index drop table t1; SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET FOREIGN_KEY_CHECKS=0; diff --git a/mysql-test/suite/innodb/r/innodb-index_ucs2.result b/mysql-test/suite/innodb/r/innodb-index_ucs2.result index c8a1e8c7da1..fac027dde96 100644 --- a/mysql-test/suite/innodb/r/innodb-index_ucs2.result +++ b/mysql-test/suite/innodb/r/innodb-index_ucs2.result @@ -39,8 +39,8 @@ a b c d 8 9 fff fff 10 10 kkk iii explain select * from t1 force index(b) order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b 5 NULL 6 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL b 5 NULL 6 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -90,14 +90,14 @@ a b c d 10 10 kkk iii 11 11 aaa mmm explain select * from t1 force index(b) order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b 5 NULL 7 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL b 5 NULL 7 explain select * from t1 force index(c) order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 21 NULL 7 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c 21 NULL 7 explain select * from t1 force index(d) order by d; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL d 43 NULL 7 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL d 43 NULL 7 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/innodb/r/innodb-isolation.result b/mysql-test/suite/innodb/r/innodb-isolation.result index b6e512cc6de..2f63862e9ea 100644 --- a/mysql-test/suite/innodb/r/innodb-isolation.result +++ b/mysql-test/suite/innodb/r/innodb-isolation.result @@ -938,41 +938,41 @@ COUNT(*) # Show The EXPLAIN output for these queries; # EXPLAIN SELECT * FROM t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL # EXPLAIN SELECT COUNT(*) FROM t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL k2 5 NULL # Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL k2 5 NULL # Using index EXPLAIN SELECT COUNT(c1) FROM t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL k2 5 NULL # Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL k2 5 NULL # Using index EXPLAIN SELECT COUNT(c2) FROM t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL k2 5 NULL # Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL k2 5 NULL # Using index EXPLAIN SELECT COUNT(c3) FROM t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL # EXPLAIN SELECT SUM(c1) FROM t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL k2 5 NULL # Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL k2 5 NULL # Using index EXPLAIN SELECT SUM(c2) FROM t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL k2 5 NULL # Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL k2 5 NULL # Using index EXPLAIN SELECT AVG(c1), MAX(c1), MIN(c2), AVG(c3), SUM(c4) FROM t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL # +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL # EXPLAIN SELECT c1, c2 FROM t1 WHERE c1 > ((SELECT COUNT(*) FROM t1) / 2); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL # Using where -2 SUBQUERY t1 index NULL k2 5 NULL # Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL range PRIMARY PRIMARY 4 NULL # Using where +2 SUBQUERY t1 NULL index NULL k2 5 NULL # Using index EXPLAIN SELECT COUNT(c2) FROM t1 WHERE c1 > ((SELECT COUNT(*) FROM t1) / 2); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL # Using where -2 SUBQUERY t1 index NULL k2 5 NULL # Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL range PRIMARY PRIMARY 4 NULL # Using where +2 SUBQUERY t1 NULL index NULL k2 5 NULL # Using index EXPLAIN SELECT COUNT(*) FROM t1 WHERE c1 > (SELECT AVG(c1) FROM t1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL # Using where; Using index -2 SUBQUERY t1 index NULL k2 5 NULL # Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL range PRIMARY PRIMARY 4 NULL # Using where; Using index +2 SUBQUERY t1 NULL index NULL k2 5 NULL # Using index # # Make all indexes in t2 obsolete to the active repeatable read transaction # in the default connection. @@ -1401,17 +1401,17 @@ INSERT INTO t1(c1) SELECT c1 + 10 FROM t1; INSERT INTO t1(c1) SELECT c1 + 100 FROM t1; CREATE TABLE t2 STATS_PERSISTENT=0 SELECT * FROM t1; EXPLAIN SELECT COUNT(*) FROM t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c2_idx 4 NULL 12 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c2_idx 4 NULL 12 Using index EXPLAIN SELECT COUNT(*) FROM t1 FORCE INDEX(c2_idx); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c2_idx 4 NULL 12 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c2_idx 4 NULL 12 Using index EXPLAIN SELECT COUNT(*) FROM t1, t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c2_idx 4 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 12 Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c2_idx 4 NULL 12 Using index +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 12 Using join buffer (flat, BNL join) EXPLAIN SELECT COUNT(*) FROM t1 FORCE INDEX(c2_idx), t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c2_idx 4 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 12 Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c2_idx 4 NULL 12 Using index +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 12 Using join buffer (flat, BNL join) DROP TABLE t1, t2; diff --git a/mysql-test/suite/innodb/r/innodb-table-online.result b/mysql-test/suite/innodb/r/innodb-table-online.result index 91d9b355125..4a1102cb637 100644 --- a/mysql-test/suite/innodb/r/innodb-table-online.result +++ b/mysql-test/suite/innodb/r/innodb-table-online.result @@ -172,8 +172,8 @@ INSERT INTO t1 SELECT 10 + c1, c2, c3 FROM t1; INSERT INTO t1 SELECT 20 + c1, c2, c3 FROM t1; INSERT INTO t1 SELECT 40 + c1, c2, c3 FROM t1; EXPLAIN SELECT COUNT(*) FROM t1 WHERE c2 > 3; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL ROWS Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL ROWS 80 Using where ANALYZE TABLE t1; Table Op Msg_type Msg_text test.t1 analyze status Engine-independent statistics collected diff --git a/mysql-test/suite/innodb/r/innodb_bug30423.result b/mysql-test/suite/innodb/r/innodb_bug30423.result index 786041370ef..0854099a83e 100644 --- a/mysql-test/suite/innodb/r/innodb_bug30423.result +++ b/mysql-test/suite/innodb/r/innodb_bug30423.result @@ -53,10 +53,10 @@ LEFT JOIN bug30243_3 sa_opportunities ON orgs.org_id=sa_opportunities.org_id LEFT JOIN bug30243_2 contacts ON orgs.org_id=contacts.org_id ; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE orgs index NULL org_id 4 NULL ROWS Using index -1 SIMPLE sa_opportunities ref org_id org_id 5 test.orgs.org_id ROWS Using index -1 SIMPLE contacts ref contacts$org_id contacts$org_id 5 test.orgs.org_id ROWS Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE orgs NULL index NULL org_id 4 NULL ROWS Using index +1 SIMPLE sa_opportunities NULL ref org_id org_id 5 test.orgs.org_id ROWS Using index +1 SIMPLE contacts NULL ref contacts$org_id contacts$org_id 5 test.orgs.org_id ROWS Using index select @@innodb_stats_method; @@innodb_stats_method nulls_ignored @@ -82,10 +82,10 @@ LEFT JOIN bug30243_3 sa_opportunities ON orgs.org_id=sa_opportunities.org_id LEFT JOIN bug30243_2 contacts ON orgs.org_id=contacts.org_id; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE orgs index NULL org_id 4 NULL ROWS Using index -1 SIMPLE sa_opportunities ref org_id org_id 5 test.orgs.org_id ROWS Using index -1 SIMPLE contacts ref contacts$org_id contacts$org_id 5 test.orgs.org_id ROWS Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE orgs NULL index NULL org_id 4 NULL ROWS Using index +1 SIMPLE sa_opportunities NULL ref org_id org_id 5 test.orgs.org_id ROWS Using index +1 SIMPLE contacts NULL ref contacts$org_id contacts$org_id 5 test.orgs.org_id ROWS Using index SELECT COUNT(*) FROM table_bug30423 WHERE org_id IS NULL; COUNT(*) 1024 diff --git a/mysql-test/suite/innodb/r/innodb_bulk_create_index_replication.result b/mysql-test/suite/innodb/r/innodb_bulk_create_index_replication.result index ae050170b4f..1e891fc28d5 100644 --- a/mysql-test/suite/innodb/r/innodb_bulk_create_index_replication.result +++ b/mysql-test/suite/innodb/r/innodb_bulk_create_index_replication.result @@ -29,11 +29,11 @@ CREATE INDEX idx_id ON t1(id); CREATE INDEX idx_title ON t1(title); /* Select by index. */ EXPLAIN SELECT * FROM t1 WHERE id = 10; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref idx_id idx_id 5 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref idx_id idx_id 5 const 1 EXPLAIN SELECT * FROM t1 WHERE title = 'a10'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref idx_title idx_title 103 const 1 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref idx_title idx_title 103 const 1 Using index condition SELECT * FROM t1 WHERE id = 10; class id title 10 10 a10 diff --git a/mysql-test/suite/innodb/r/innodb_bulk_create_index_small.result b/mysql-test/suite/innodb/r/innodb_bulk_create_index_small.result index b48207d4497..feb6d62aeed 100644 --- a/mysql-test/suite/innodb/r/innodb_bulk_create_index_small.result +++ b/mysql-test/suite/innodb/r/innodb_bulk_create_index_small.result @@ -28,11 +28,11 @@ Table Op Msg_type Msg_text test.t1 check status OK /* Select by index. */ EXPLAIN SELECT * FROM t1 WHERE id = 10; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref idx_id idx_id 5 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref idx_id idx_id 5 const 1 EXPLAIN SELECT * FROM t1 WHERE title = 'a10'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref idx_title idx_title 103 const 1 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref idx_title idx_title 103 const 1 Using index condition SELECT * FROM t1 WHERE id = 10; class id title 10 10 a10 @@ -91,11 +91,11 @@ Table Op Msg_type Msg_text test.t1 check status OK /* Select by index. */ EXPLAIN SELECT * FROM t1 WHERE id = 10; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref idx_id idx_id 5 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref idx_id idx_id 5 const 1 EXPLAIN SELECT * FROM t1 WHERE title = 'a10'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref idx_title idx_title 103 const 1 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref idx_title idx_title 103 const 1 Using index condition SELECT * FROM t1 WHERE id = 10; class id title 10 10 a10 diff --git a/mysql-test/suite/innodb/r/innodb_gis.result b/mysql-test/suite/innodb/r/innodb_gis.result index 90fc5be1e73..7892089b30c 100644 --- a/mysql-test/suite/innodb/r/innodb_gis.result +++ b/mysql-test/suite/innodb/r/innodb_gis.result @@ -233,8 +233,8 @@ fid AsText(Envelope(g)) 120 POLYGON((0 0,10 0,10 10,0 10,0 0)) 121 POLYGON((3 6,44 6,44 9,3 9,3 6)) explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelope(g)) from gis_geometry; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_geometry ALL NULL NULL NULL NULL 21 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_geometry NULL ALL NULL NULL NULL NULL 21 100.00 Warnings: Note 1003 select st_dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,st_geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,st_isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,st_astext(st_envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry` SELECT fid, X(g) FROM gis_point ORDER by fid; @@ -250,8 +250,8 @@ fid Y(g) 103 20 104 20 explain extended select X(g),Y(g) FROM gis_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_point NULL ALL NULL NULL NULL NULL 4 100.00 Warnings: Note 1003 select st_x(`test`.`gis_point`.`g`) AS `X(g)`,st_y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point` SELECT fid, AsText(StartPoint(g)) FROM gis_line ORDER by fid; @@ -285,8 +285,8 @@ fid IsClosed(g) 106 1 107 0 explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),NumPoints(g),AsText(PointN(g, 2)),IsClosed(g) FROM gis_line; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_line ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_line NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select st_astext(st_startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,st_astext(st_endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,st_length(`test`.`gis_line`.`g`) AS `GLength(g)`,st_numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,st_astext(st_pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,st_isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line` SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; @@ -315,8 +315,8 @@ fid AsText(InteriorRingN(g, 1)) 109 LINESTRING(10 10,20 10,20 20,10 20,10 10) 110 NULL explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumInteriorRings(g),AsText(InteriorRingN(g, 1)) FROM gis_polygon; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_polygon ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_polygon NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select st_astext(st_centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,st_area(`test`.`gis_polygon`.`g`) AS `Area(g)`,st_astext(st_exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,st_numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,st_astext(st_interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon` SELECT fid, IsClosed(g) FROM gis_multi_line ORDER by fid; @@ -354,8 +354,8 @@ fid NumGeometries(g) 120 2 121 2 explain extended SELECT fid, NumGeometries(g) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_multi_point NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,st_numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point` SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point ORDER by fid; @@ -382,8 +382,8 @@ fid AsText(GeometryN(g, 1)) 120 POINT(0 0) 121 POINT(44 6) explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_multi_point NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,st_astext(st_geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point` SELECT g1.fid as first, g2.fid as second, @@ -401,9 +401,9 @@ Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort -1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE g1 NULL ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort +1 SIMPLE g2 NULL ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join) Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,st_within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,st_contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,mbroverlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,st_equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,mbrdisjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,st_touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,mbrintersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,st_crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; @@ -555,8 +555,8 @@ COUNT(*) 1 EXPLAIN SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref p p 28 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ref p p 28 const 1 Using where SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)'); COUNT(*) 1 @@ -564,22 +564,22 @@ INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(3 4)')); INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(3 4)')); EXPLAIN SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 2 Using where SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)'); COUNT(*) 1 EXPLAIN SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref p p 28 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ref p p 28 const # Using where SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)'); COUNT(*) 1 EXPLAIN SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 2 Using where SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)'); COUNT(*) 1 @@ -602,8 +602,8 @@ drop table t1; create table t1(id int not null primary key, g1 geometry not null, spatial index(g1)); insert into t1 values(1, polygonfromtext('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))')); explain select id from t1 where contains(g1, pointfromtext('POINT(1 1)')); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range g1 g1 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range g1 g1 34 NULL 1 Using where select id from t1 where contains(g1, pointfromtext('POINT(1 1)')); id 1 diff --git a/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result b/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result index 797c30d700f..cf8c9b2dc5e 100644 --- a/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result +++ b/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result @@ -111,6 +111,7 @@ select 2 as a, 2 as b) as t2 for update; id 1 select_type PRIMARY table <derived2> +partitions NULL type ALL possible_keys NULL key NULL @@ -121,6 +122,7 @@ Extra id 1 select_type PRIMARY table t1 +partitions NULL type eq_ref possible_keys PRIMARY key PRIMARY @@ -131,6 +133,7 @@ Extra Using where id 2 select_type DERIVED table NULL +partitions NULL type NULL possible_keys NULL key NULL @@ -141,6 +144,7 @@ Extra No tables used id 3 select_type UNION table NULL +partitions NULL type NULL possible_keys NULL key NULL @@ -302,6 +306,7 @@ select 3 as a, 1 as b) as t2 for update; id 1 select_type PRIMARY table <derived2> +partitions NULL type ALL possible_keys NULL key NULL @@ -312,6 +317,7 @@ Extra id 1 select_type PRIMARY table t1 +partitions NULL type eq_ref possible_keys PRIMARY key PRIMARY @@ -322,6 +328,7 @@ Extra Using where id 2 select_type DERIVED table NULL +partitions NULL type NULL possible_keys NULL key NULL @@ -332,6 +339,7 @@ Extra No tables used id 3 select_type UNION table NULL +partitions NULL type NULL possible_keys NULL key NULL diff --git a/mysql-test/suite/innodb/r/innodb_stats_persistent.result b/mysql-test/suite/innodb/r/innodb_stats_persistent.result index e25ab2a8a24..7386eb6c54d 100644 --- a/mysql-test/suite/innodb/r/innodb_stats_persistent.result +++ b/mysql-test/suite/innodb/r/innodb_stats_persistent.result @@ -22,8 +22,8 @@ connection default; # With innodb_stats_include_delete_marked=ON, # DELETE must not affect statistics before COMMIT. EXPLAIN SELECT * FROM t1 WHERE val=4; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref val val 4 const 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref val val 4 const 1 Using index connection con1; COUNT(*) 0 @@ -32,8 +32,8 @@ SELECT COUNT(*) FROM t1; COUNT(*) 16 EXPLAIN SELECT * FROM t1 WHERE val=4; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref val val 4 const 16 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref val val 4 const 16 Using index BEGIN; DELETE FROM t1; COMMIT; @@ -45,8 +45,8 @@ BEGIN; INSERT INTO t2 (val) SELECT 4 FROM seq_1_to_16; # The INSERT will show up before COMMIT. EXPLAIN SELECT * FROM t2 WHERE val=4; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref val val 4 const 16 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ref val val 4 const 16 Using index SELECT COUNT(*) FROM t2; COUNT(*) 16 @@ -57,29 +57,29 @@ COUNT(*) 0 connection con1; EXPLAIN SELECT * FROM t2 WHERE val=4; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref val val 4 const 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ref val val 4 const 1 Using index InnoDB 0 transactions not purged # After COMMIT and purge, the DELETE must show up. EXPLAIN SELECT * FROM t1 WHERE val=4; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref val val 4 const 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref val val 4 const 1 Using index SET GLOBAL innodb_stats_include_delete_marked = OFF; BEGIN; INSERT INTO t1 (val) SELECT 4 FROM seq_1_to_16; EXPLAIN SELECT * FROM t1 WHERE val=4; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref val val 4 const 16 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref val val 4 const 16 Using index ROLLBACK; EXPLAIN SELECT * FROM t1 WHERE val=4; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref val val 4 const 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref val val 4 const 1 Using index BEGIN; INSERT INTO t1 (val) SELECT 4 FROM seq_1_to_16; COMMIT; EXPLAIN SELECT * FROM t1 WHERE val=4; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref val val 4 const 16 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref val val 4 const 16 Using index BEGIN; DELETE FROM t1; SELECT COUNT(*) FROM t1; @@ -90,12 +90,12 @@ COUNT(*) # However, if there was a WHERE condition, # ha_innobase::records_in_range() would count the delete-marked records. EXPLAIN SELECT * FROM t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL val 4 NULL 16 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL val 4 NULL 16 Using index ROLLBACK; EXPLAIN SELECT * FROM t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL val 4 NULL 16 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL val 4 NULL 16 Using index SELECT COUNT(*) FROM t1; COUNT(*) 16 diff --git a/mysql-test/suite/innodb/r/partition_locking.result b/mysql-test/suite/innodb/r/partition_locking.result index 56bfe388517..d2d53057f5a 100644 --- a/mysql-test/suite/innodb/r/partition_locking.result +++ b/mysql-test/suite/innodb/r/partition_locking.result @@ -196,8 +196,8 @@ d a b c 9 03 07 343 explain SELECT d,a,b,c FROM t3 ORDER BY d LOCK IN SHARE MODE SKIP LOCKED; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 index NULL PRIMARY 257 NULL 14 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL index NULL PRIMARY 257 NULL 14 # # UPDATE ... SELECT * FROM t1 FOR UPDATE; @@ -390,8 +390,8 @@ d a b c 9 03 07 343 explain SELECT d,a,b,c FROM t3 ORDER BY d LOCK IN SHARE MODE SKIP LOCKED; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 index NULL PRIMARY 257 NULL 14 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL index NULL PRIMARY 257 NULL 14 # # UPDATE ... SELECT * FROM t1 FOR UPDATE; diff --git a/mysql-test/suite/innodb/r/temporary_table.result b/mysql-test/suite/innodb/r/temporary_table.result index 3168c357bde..bd7b2df20aa 100644 --- a/mysql-test/suite/innodb/r/temporary_table.result +++ b/mysql-test/suite/innodb/r/temporary_table.result @@ -23,24 +23,24 @@ i f c 97 1.4 delhi 96 1.5 ahmedabad explain select * from t1 where f > 1.29999; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using where alter table t1 add index sec_index(f); explain select * from t1 where f > 1.29999; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range sec_index sec_index 5 NULL 3 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range sec_index sec_index 5 NULL 3 Using index condition select * from t1 where f > 1.29999; i f c 98 1.3 jaipur 97 1.4 delhi 96 1.5 ahmedabad explain select * from t1 where i = 100; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using where alter table t1 add unique index pri_index(i); explain select * from t1 where i = 100; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 const pri_index pri_index 5 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL const pri_index pri_index 5 const 1 select * from t1 where i = 100; i f c 100 1.1 pune diff --git a/mysql-test/suite/innodb/r/temporary_table_optimization.result b/mysql-test/suite/innodb/r/temporary_table_optimization.result index c678fd56880..00c4e1d616b 100644 --- a/mysql-test/suite/innodb/r/temporary_table_optimization.result +++ b/mysql-test/suite/innodb/r/temporary_table_optimization.result @@ -114,12 +114,12 @@ drop procedure populate_t1; create temporary table t1 (t1_i int, t1_f float) engine = innodb; insert into t1 values (1, 1.1), (2, 2.5), (3, 2.5), (4, 4.4); explain select * from t1 where t1_i = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 4 Using where alter table t1 add unique index pri_index(t1_i); explain select * from t1 where t1_i = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 const pri_index pri_index 5 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL const pri_index pri_index 5 const 1 select * from t1 where t1_i = 1; t1_i t1_f 1 1.1 @@ -127,8 +127,8 @@ alter table t1 add unique index sec_index(t1_f); ERROR 23000: Duplicate entry '2.5' for key 'sec_index' alter table t1 add index sec_index(t1_f); explain select * from t1 where t1_f >= 2.5; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range sec_index sec_index 5 NULL 3 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range sec_index sec_index 5 NULL 3 Using index condition select * from t1 where t1_f >= 2.5; t1_i t1_f 2 2.5 diff --git a/mysql-test/suite/innodb/t/innodb-isolation.test b/mysql-test/suite/innodb/t/innodb-isolation.test index 6d347dc71af..35d4ad134e5 100644 --- a/mysql-test/suite/innodb/t/innodb-isolation.test +++ b/mysql-test/suite/innodb/t/innodb-isolation.test @@ -165,27 +165,27 @@ COMMIT; # column 9 is the row count provided by handler::info(). In InnoDB, this is # a statistical estimate. After the multi-transactional changes above, # Solaris reports 10 rows which is correct, but other OSes report 9. ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT * FROM t1; ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT COUNT(*) FROM t1; ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT COUNT(c1) FROM t1; ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT COUNT(c2) FROM t1; ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT COUNT(c3) FROM t1; ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT SUM(c1) FROM t1; ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT SUM(c2) FROM t1; ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT AVG(c1), MAX(c1), MIN(c2), AVG(c3), SUM(c4) FROM t1; ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT c1, c2 FROM t1 WHERE c1 > ((SELECT COUNT(*) FROM t1) / 2); ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT COUNT(c2) FROM t1 WHERE c1 > ((SELECT COUNT(*) FROM t1) / 2); ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT COUNT(*) FROM t1 WHERE c1 > (SELECT AVG(c1) FROM t1); --echo # diff --git a/mysql-test/suite/innodb/t/innodb_bug30423.test b/mysql-test/suite/innodb/t/innodb_bug30423.test index de53a935156..b6490cf3fd9 100644 --- a/mysql-test/suite/innodb/t/innodb_bug30423.test +++ b/mysql-test/suite/innodb/t/innodb_bug30423.test @@ -139,7 +139,7 @@ analyze table bug30243_3; # Following query plan shows that we get the correct rows per # unique value (should be approximately 1 row per value) --- replace_column 9 ROWS +-- replace_column 10 ROWS explain SELECT COUNT(*), 0 FROM bug30243_1 orgs LEFT JOIN bug30243_3 sa_opportunities @@ -160,7 +160,7 @@ analyze table bug30243_3; # Following query plan shows that we get the correct rows per # unique value (~1) --- replace_column 9 ROWS +-- replace_column 10 ROWS explain SELECT COUNT(*), 0 FROM bug30243_1 orgs LEFT JOIN bug30243_3 sa_opportunities diff --git a/mysql-test/suite/innodb_fts/r/fulltext.result b/mysql-test/suite/innodb_fts/r/fulltext.result index ce72d797ac1..c26f7ee96f2 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext.result +++ b/mysql-test/suite/innodb_fts/r/fulltext.result @@ -14,8 +14,8 @@ a b Full-text indexes are called collections Only MyISAM tables support collections explain extended select * from t1 where MATCH(a,b) AGAINST ("collections"); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 fulltext a a 0 1 100.00 Using where +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL fulltext a a 0 1 100.00 Using where Warnings: Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (match `test`.`t1`.`a`,`test`.`t1`.`b` against ('collections')) select * from t1 where MATCH(a,b) AGAINST ("indexes"); @@ -58,41 +58,41 @@ Full-text search in MySQL implements vector space model select * from t1 where MATCH(a,b) AGAINST ("indexes" IN BOOLEAN MODE WITH QUERY EXPANSION); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WITH QUERY EXPANSION)' at line 1 explain select * from t1 where MATCH(a,b) AGAINST ("collections"); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 fulltext a a 0 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL fulltext a a 0 1 Using where explain select * from t1 where MATCH(a,b) AGAINST ("collections")>0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 fulltext a a 0 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL fulltext a a 0 1 Using where explain select * from t1 where MATCH(a,b) AGAINST ("collections")>1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 fulltext a a 0 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL fulltext a a 0 1 Using where explain select * from t1 where MATCH(a,b) AGAINST ("collections")>=0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using where explain select * from t1 where MATCH(a,b) AGAINST ("collections")>=1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 fulltext a a 0 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL fulltext a a 0 1 Using where explain select * from t1 where 0<MATCH(a,b) AGAINST ("collections"); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 fulltext a a 0 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL fulltext a a 0 1 Using where explain select * from t1 where 1<MATCH(a,b) AGAINST ("collections"); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 fulltext a a 0 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL fulltext a a 0 1 Using where explain select * from t1 where 0<=MATCH(a,b) AGAINST ("collections"); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using where explain select * from t1 where 1<=MATCH(a,b) AGAINST ("collections"); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 fulltext a a 0 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL fulltext a a 0 1 Using where explain select * from t1 where MATCH(a,b) AGAINST ("collections")>0 and a like '%ll%'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 fulltext a a 0 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL fulltext a a 0 1 Using where select * from t1 where MATCH(a,b) AGAINST("support -collections" IN BOOLEAN MODE); a b MySQL has now support for full-text search explain extended select * from t1 where MATCH(a,b) AGAINST("support -collections" IN BOOLEAN MODE); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 fulltext a a 0 1 100.00 Using where +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL fulltext a a 0 1 100.00 Using where Warnings: Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (match `test`.`t1`.`a`,`test`.`t1`.`b` against ('support -collections' in boolean mode)) select * from t1 where MATCH(a,b) AGAINST("support collections" IN BOOLEAN MODE); @@ -464,16 +464,16 @@ INSERT INTO t1 VALUES('test', 1),('test', 1),('test', 1),('test', 1), ANALYZE TABLE t1; EXPLAIN SELECT * FROM t1 WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 fulltext b,a a 0 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL fulltext b,a a 0 1 Using where EXPLAIN SELECT * FROM t1 USE INDEX(a) WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 fulltext a a 0 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL fulltext a a 0 1 Using where EXPLAIN SELECT * FROM t1 FORCE INDEX(a) WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 fulltext a a 0 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL fulltext a a 0 1 Using where EXPLAIN SELECT * FROM t1 IGNORE INDEX(a) WHERE MATCH(a) AGAINST('test' IN BOOLEAN MODE) AND b=1; ERROR HY000: Can't find FULLTEXT index matching the column list @@ -544,10 +544,10 @@ not exists( SELECT 1 FROM t2, t3 WHERE t3.a=t1.a AND MATCH(b2) AGAINST('scargill' IN BOOLEAN MODE) ); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where -2 MATERIALIZED t2 fulltext b2 b2 0 1 Using where -2 MATERIALIZED t3 ALL NULL NULL NULL NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 2 Using where +2 MATERIALIZED t2 NULL fulltext b2 b2 0 1 Using where +2 MATERIALIZED t3 NULL ALL NULL NULL NULL NULL 2 Using where # should return 0 SELECT count(*) FROM t1 WHERE not exists( @@ -649,8 +649,8 @@ ERROR HY000: Can't find FULLTEXT index matching the column list SELECT MATCH(a) AGAINST ('*') FROM z; ERROR HY000: Can't find FULLTEXT index matching the column list EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM q; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE q ALL NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE q NULL ALL NULL NULL NULL NULL 1 SELECT MATCH(b) AGAINST ('*') FROM q; ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*' DROP TABLE z, q; diff --git a/mysql-test/suite/innodb_fts/r/fulltext_misc.result b/mysql-test/suite/innodb_fts/r/fulltext_misc.result index f3e1ef519fd..c0095c0d24a 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext_misc.result +++ b/mysql-test/suite/innodb_fts/r/fulltext_misc.result @@ -7,25 +7,25 @@ INSERT INTO t1 VALUES ('test'); EXPLAIN SELECT 1 FROM t1 WHERE 1 > ALL((SELECT 1 FROM t1 JOIN t1 a ON (MATCH(t1.f1) AGAINST ("")) WHERE t1.f1 GROUP BY t1.f1)); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 index NULL f1_2 8 NULL 1 Using index -2 SUBQUERY t1 fulltext f1_2,f1 f1 0 1 Using where -2 SUBQUERY a index NULL f1_2 8 NULL 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL index NULL f1_2 8 NULL 1 Using index +2 SUBQUERY t1 NULL fulltext f1_2,f1 f1 0 1 Using where +2 SUBQUERY a NULL index NULL f1_2 8 NULL 1 Using index PREPARE stmt FROM 'EXPLAIN SELECT 1 FROM t1 WHERE 1 > ALL((SELECT 1 FROM t1 RIGHT OUTER JOIN t1 a ON (MATCH(t1.f1) AGAINST ("")) WHERE t1.f1 GROUP BY t1.f1))'; EXECUTE stmt; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 index NULL f1_2 8 NULL 1 Using index -2 SUBQUERY t1 fulltext f1_2,f1 f1 0 1 Using where -2 SUBQUERY a index NULL f1_2 8 NULL 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL index NULL f1_2 8 NULL 1 Using index +2 SUBQUERY t1 NULL fulltext f1_2,f1 f1 0 1 Using where +2 SUBQUERY a NULL index NULL f1_2 8 NULL 1 Using index EXECUTE stmt; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 index NULL f1_2 8 NULL 1 Using index -2 SUBQUERY t1 fulltext f1_2,f1 f1 0 1 Using where -2 SUBQUERY a index NULL f1_2 8 NULL 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL index NULL f1_2 8 NULL 1 Using index +2 SUBQUERY t1 NULL fulltext f1_2,f1 f1 0 1 Using where +2 SUBQUERY a NULL index NULL f1_2 8 NULL 1 Using index DEALLOCATE PREPARE stmt; PREPARE stmt FROM 'EXPLAIN SELECT 1 FROM t1 @@ -33,15 +33,15 @@ PREPARE stmt FROM ON (MATCH(t1.f1) AGAINST ("")) WHERE t1.f1 GROUP BY t1.f1))'; EXECUTE stmt; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 index NULL f1_2 8 NULL 1 Using index -2 SUBQUERY t1 fulltext f1_2,f1 f1 0 1 Using where -2 SUBQUERY a index NULL f1_2 8 NULL 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL index NULL f1_2 8 NULL 1 Using index +2 SUBQUERY t1 NULL fulltext f1_2,f1 f1 0 1 Using where +2 SUBQUERY a NULL index NULL f1_2 8 NULL 1 Using index EXECUTE stmt; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 index NULL f1_2 8 NULL 1 Using index -2 SUBQUERY t1 fulltext f1_2,f1 f1 0 1 Using where -2 SUBQUERY a index NULL f1_2 8 NULL 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL index NULL f1_2 8 NULL 1 Using index +2 SUBQUERY t1 NULL fulltext f1_2,f1 f1 0 1 Using where +2 SUBQUERY a NULL index NULL f1_2 8 NULL 1 Using index DEALLOCATE PREPARE stmt; DROP TABLE t1; drop table if exists t1; @@ -143,10 +143,10 @@ INSERT INTO t2 VALUES (1),(2); # Should not crash EXPLAIN EXTENDED SELECT * FROM t1 UNION SELECT * FROM t1 ORDER BY a + 12; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 -2 UNION t1 ALL NULL NULL NULL NULL 2 100.00 -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 2 100.00 +2 UNION t1 NULL ALL NULL NULL NULL NULL 2 100.00 +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL NULL Using filesort Warnings: Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` union /* select#2 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` order by `a` + 12 # Should not crash @@ -158,10 +158,10 @@ a EXPLAIN EXTENDED SELECT * FROM t1 UNION SELECT * FROM t1 ORDER BY MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 -2 UNION t1 ALL NULL NULL NULL NULL 2 100.00 -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 2 100.00 +2 UNION t1 NULL ALL NULL NULL NULL NULL 2 100.00 +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL NULL Using filesort Warnings: Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` union /* select#2 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` order by (match `a` against ('+abc' in boolean mode)) # Should not crash @@ -174,11 +174,11 @@ a EXPLAIN EXTENDED SELECT * FROM t1 UNION SELECT * FROM t1 ORDER BY (SELECT a FROM t2 WHERE b = 12); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 -2 UNION t1 ALL NULL NULL NULL NULL 2 100.00 -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort -3 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 2 100.00 +2 UNION t1 NULL ALL NULL NULL NULL NULL 2 100.00 +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL NULL Using filesort +3 DEPENDENT SUBQUERY t2 NULL ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: Note 1276 Field or reference 'a' of SELECT #3 was resolved in SELECT #-1 Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` union /* select#2 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` order by <expr_cache><`a`>((/* select#3 */ select `a` from `test`.`t2` where `test`.`t2`.`b` = 12)) diff --git a/mysql-test/suite/innodb_fts/r/fulltext_order_by.result b/mysql-test/suite/innodb_fts/r/fulltext_order_by.result index 0d3a4a85b86..f9f6bd3ffb8 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext_order_by.result +++ b/mysql-test/suite/innodb_fts/r/fulltext_order_by.result @@ -66,8 +66,8 @@ if(a in (4,7),2,1) rel alter table t1 add key m (message); ANALYZE TABLE t1; explain SELECT message FROM t1 WHERE MATCH (message) AGAINST ('steve') ORDER BY message; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 fulltext message message 0 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL fulltext message message 0 1 Using where; Using filesort SELECT message FROM t1 WHERE MATCH (message) AGAINST ('steve') ORDER BY message desc; message steve is cool diff --git a/mysql-test/suite/innodb_gis/r/0.result b/mysql-test/suite/innodb_gis/r/0.result index 6dd2cd16437..90f3db501dc 100644 --- a/mysql-test/suite/innodb_gis/r/0.result +++ b/mysql-test/suite/innodb_gis/r/0.result @@ -233,8 +233,8 @@ fid AsText(Envelope(g)) 120 POLYGON((0 0,10 0,10 10,0 10,0 0)) 121 POLYGON((3 6,44 6,44 9,3 9,3 6)) explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelope(g)) from gis_geometry; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_geometry ALL NULL NULL NULL NULL 21 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_geometry NULL ALL NULL NULL NULL NULL 21 100.00 Warnings: Note 1003 select st_dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,st_geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,st_isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,st_astext(st_envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry` SELECT fid, X(g) FROM gis_point ORDER by fid; @@ -250,8 +250,8 @@ fid Y(g) 103 20 104 20 explain extended select X(g),Y(g) FROM gis_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_point NULL ALL NULL NULL NULL NULL 4 100.00 Warnings: Note 1003 select st_x(`test`.`gis_point`.`g`) AS `X(g)`,st_y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point` SELECT fid, AsText(StartPoint(g)) FROM gis_line ORDER by fid; @@ -285,8 +285,8 @@ fid IsClosed(g) 106 1 107 0 explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),NumPoints(g),AsText(PointN(g, 2)),IsClosed(g) FROM gis_line; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_line ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_line NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select st_astext(st_startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,st_astext(st_endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,st_length(`test`.`gis_line`.`g`) AS `GLength(g)`,st_numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,st_astext(st_pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,st_isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line` SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; @@ -315,8 +315,8 @@ fid AsText(InteriorRingN(g, 1)) 109 LINESTRING(10 10,20 10,20 20,10 20,10 10) 110 NULL explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumInteriorRings(g),AsText(InteriorRingN(g, 1)) FROM gis_polygon; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_polygon ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_polygon NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select st_astext(st_centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,st_area(`test`.`gis_polygon`.`g`) AS `Area(g)`,st_astext(st_exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,st_numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,st_astext(st_interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon` SELECT fid, IsClosed(g) FROM gis_multi_line ORDER by fid; @@ -354,8 +354,8 @@ fid NumGeometries(g) 120 2 121 2 explain extended SELECT fid, NumGeometries(g) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_multi_point NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,st_numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point` SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point ORDER by fid; @@ -382,8 +382,8 @@ fid AsText(GeometryN(g, 1)) 120 POINT(0 0) 121 POINT(44 6) explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_multi_point NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,st_astext(st_geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point` SELECT g1.fid as first, g2.fid as second, @@ -401,9 +401,9 @@ Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort -1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE g1 NULL ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort +1 SIMPLE g2 NULL ALL NULL NULL NULL NULL 2 100.00 Using join buffer (flat, BNL join) Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,st_within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,st_contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,mbroverlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,st_equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,mbrdisjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,st_touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,mbrintersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,st_crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; @@ -555,8 +555,8 @@ COUNT(*) 1 EXPLAIN SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref p p 28 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ref p p 28 const 1 Using where SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)'); COUNT(*) 1 @@ -564,22 +564,22 @@ INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(3 4)')); INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(3 4)')); EXPLAIN SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 2 Using where SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)'); COUNT(*) 1 EXPLAIN SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref p p 28 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ref p p 28 const # Using where SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)'); COUNT(*) 1 EXPLAIN SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 2 Using where SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)'); COUNT(*) 1 diff --git a/mysql-test/suite/innodb_gis/r/1.result b/mysql-test/suite/innodb_gis/r/1.result index f8db53a4ca9..5461dc2691e 100644 --- a/mysql-test/suite/innodb_gis/r/1.result +++ b/mysql-test/suite/innodb_gis/r/1.result @@ -226,8 +226,8 @@ fid ST_AsText(ST_Envelope(g)) 120 POLYGON((0 0,10 0,10 10,0 10,0 0)) 121 POLYGON((3 6,44 6,44 9,3 9,3 6)) explain extended select ST_Dimension(g), ST_GeometryType(g), ST_IsEmpty(g), ST_AsText(ST_Envelope(g)) from gis_geometry; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_geometry ALL NULL NULL NULL NULL # # +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_geometry NULL ALL NULL NULL NULL NULL # # Warnings: Note 1003 select st_dimension(`test`.`gis_geometry`.`g`) AS `ST_Dimension(g)`,st_geometrytype(`test`.`gis_geometry`.`g`) AS `ST_GeometryType(g)`,st_isempty(`test`.`gis_geometry`.`g`) AS `ST_IsEmpty(g)`,st_astext(st_envelope(`test`.`gis_geometry`.`g`)) AS `ST_AsText(ST_Envelope(g))` from `test`.`gis_geometry` SELECT fid, ST_X(g) FROM gis_point; @@ -243,8 +243,8 @@ fid ST_Y(g) 103 20 104 20 explain extended select ST_X(g),ST_Y(g) FROM gis_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_point ALL NULL NULL NULL NULL # # +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_point NULL ALL NULL NULL NULL NULL # # Warnings: Note 1003 select st_x(`test`.`gis_point`.`g`) AS `ST_X(g)`,st_y(`test`.`gis_point`.`g`) AS `ST_Y(g)` from `test`.`gis_point` SELECT fid, ST_AsText(ST_StartPoint(g)) FROM gis_line; @@ -278,8 +278,8 @@ fid ST_IsClosed(g) 106 1 107 0 explain extended select ST_AsText(ST_StartPoint(g)),ST_AsText(ST_EndPoint(g)),ST_Length(g),ST_NumPoints(g),ST_AsText(ST_PointN(g, 2)),ST_IsClosed(g) FROM gis_line; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_line ALL NULL NULL NULL NULL # # +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_line NULL ALL NULL NULL NULL NULL # # Warnings: Note 1003 select st_astext(st_startpoint(`test`.`gis_line`.`g`)) AS `ST_AsText(ST_StartPoint(g))`,st_astext(st_endpoint(`test`.`gis_line`.`g`)) AS `ST_AsText(ST_EndPoint(g))`,st_length(`test`.`gis_line`.`g`) AS `ST_Length(g)`,st_numpoints(`test`.`gis_line`.`g`) AS `ST_NumPoints(g)`,st_astext(st_pointn(`test`.`gis_line`.`g`,2)) AS `ST_AsText(ST_PointN(g, 2))`,st_isclosed(`test`.`gis_line`.`g`) AS `ST_IsClosed(g)` from `test`.`gis_line` SELECT fid, ST_AsText(ST_Centroid(g)) FROM gis_polygon; @@ -308,8 +308,8 @@ fid ST_AsText(ST_InteriorRingN(g, 1)) 109 LINESTRING(10 10,20 10,20 20,10 20,10 10) 110 NULL explain extended select ST_AsText(ST_Centroid(g)),ST_Area(g),ST_AsText(ST_ExteriorRing(g)),ST_NumInteriorRings(g),ST_AsText(ST_InteriorRingN(g, 1)) FROM gis_polygon; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_polygon ALL NULL NULL NULL NULL # # +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_polygon NULL ALL NULL NULL NULL NULL # # Warnings: Note 1003 select st_astext(st_centroid(`test`.`gis_polygon`.`g`)) AS `ST_AsText(ST_Centroid(g))`,st_area(`test`.`gis_polygon`.`g`) AS `ST_Area(g)`,st_astext(st_exteriorring(`test`.`gis_polygon`.`g`)) AS `ST_AsText(ST_ExteriorRing(g))`,st_numinteriorrings(`test`.`gis_polygon`.`g`) AS `ST_NumInteriorRings(g)`,st_astext(st_interiorringn(`test`.`gis_polygon`.`g`,1)) AS `ST_AsText(ST_InteriorRingN(g, 1))` from `test`.`gis_polygon` SELECT fid, ST_IsClosed(g) FROM gis_multi_line; @@ -347,8 +347,8 @@ fid ST_NumGeometries(g) 120 2 121 2 explain extended SELECT fid, ST_NumGeometries(g) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL # # +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_multi_point NULL ALL NULL NULL NULL NULL # # Warnings: Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,st_numgeometries(`test`.`gis_multi_point`.`g`) AS `ST_NumGeometries(g)` from `test`.`gis_multi_point` SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; @@ -375,8 +375,8 @@ fid ST_AsText(ST_GeometryN(g, 1)) 120 POINT(0 0) 121 POINT(44 6) explain extended SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL # # +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_multi_point NULL ALL NULL NULL NULL NULL # # Warnings: Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,st_astext(st_geometryn(`test`.`gis_multi_point`.`g`,2)) AS `ST_AsText(ST_GeometryN(g, 2))` from `test`.`gis_multi_point` SELECT g1.fid as first, g2.fid as second, @@ -394,9 +394,9 @@ MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL # # Using temporary; Using filesort -1 SIMPLE g2 ALL NULL NULL NULL NULL # # Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE g1 NULL ALL NULL NULL NULL NULL # # Using temporary; Using filesort +1 SIMPLE g2 NULL ALL NULL NULL NULL NULL # # Using join buffer (flat, BNL join) Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,mbrwithin(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,mbrcontains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,mbroverlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,mbrequals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,mbrdisjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,st_touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,mbrintersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,st_crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; @@ -437,26 +437,26 @@ SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)'))) ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))) POINT(1 4) explain extended SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select st_astext(st_geometryfromwkb(st_aswkb(st_geometryfromtext('POINT(1 4)')))) AS `ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)'))))` explain extended SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_PointFromText('POINT(1 4)')))); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select st_astext(st_geometryfromwkb(st_aswkb(st_geometryfromtext('POINT(1 4)')))) AS `ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_PointFromText('POINT(1 4)'))))` SELECT ST_SRID(ST_GeomFromText('LineString(1 1,2 2)',101)); ST_SRID(ST_GeomFromText('LineString(1 1,2 2)',101)) 101 explain extended SELECT ST_SRID(ST_GeomFromText('LineString(1 1,2 2)',101)); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select srid(st_geometryfromtext('LineString(1 1,2 2)',101)) AS `ST_SRID(ST_GeomFromText('LineString(1 1,2 2)',101))` explain extended select ST_issimple(MultiPoint(Point(3, 6), Point(4, 10))), ST_issimple(Point(3, 6)); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select st_issimple(multipoint(point(3,6),point(4,10))) AS `ST_issimple(MultiPoint(Point(3, 6), Point(4, 10)))`,st_issimple(point(3,6)) AS `ST_issimple(Point(3, 6))` create table t1 (a geometry not null); @@ -942,8 +942,8 @@ COUNT(*) 1 EXPLAIN SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref p p 28 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ref p p 28 const 1 Using where SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)'); COUNT(*) 1 @@ -951,22 +951,22 @@ INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(3 4)')); INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(3 4)')); EXPLAIN SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 2 Using where SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)'); COUNT(*) 1 EXPLAIN SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref p p 28 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ref p p 28 const # Using where SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)'); COUNT(*) 1 EXPLAIN SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 2 Using where SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)'); COUNT(*) 1 diff --git a/mysql-test/suite/innodb_gis/r/bug17057168.result b/mysql-test/suite/innodb_gis/r/bug17057168.result index 0002acaf8a1..1aaf53afea7 100644 --- a/mysql-test/suite/innodb_gis/r/bug17057168.result +++ b/mysql-test/suite/innodb_gis/r/bug17057168.result @@ -12,8 +12,8 @@ INSERT INTO t1 (location) SELECT POINT(tmp1.id, tmp2.id) FROM tmp tmp1, tmp tmp2 ORDER BY tmp1.id, tmp2.id; EXPLAIN SELECT id, ST_AsText(location) FROM t1 WHERE location = POINT(1, 2); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref location location 28 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref location location 28 const 1 Using where SELECT id, ST_AsText(location) FROM t1 WHERE location = POINT(1, 2); id ST_AsText(location) 163 POINT(1 2) diff --git a/mysql-test/suite/innodb_gis/r/create_spatial_index.result b/mysql-test/suite/innodb_gis/r/create_spatial_index.result index 25a5a4dd289..2e10a7c4178 100644 --- a/mysql-test/suite/innodb_gis/r/create_spatial_index.result +++ b/mysql-test/suite/innodb_gis/r/create_spatial_index.result @@ -59,78 +59,78 @@ test.tab analyze status Engine-independent statistics collected test.tab analyze status OK SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('LINESTRING( 300 300,400 400)'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) '); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRWithin(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRWithin(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('POLYGON((100 200,200 300,400 500,500 300,300 200,100 300,100 200))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE ST_Crosses(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE ST_Crosses(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('LINESTRING( 10 10,30 30,40 40)'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_CRosses(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE ST_Crosses(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE ST_Crosses(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('POLYGON((4 -2,5 -4,6 -5,7 -4,7 2,4 -2))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab index idx3 PRIMARY 4 NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 Using where SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) @@ -144,29 +144,29 @@ c1 ST_Astext(c4) 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRDisjoint(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab index idx3 PRIMARY 4 NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 Using where EXPLAIN DELETE FROM tab WHERE MBRDisjoint(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ALL idx3 NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 Using where SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBREquals(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBREquals(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) @@ -174,114 +174,114 @@ c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where SET @g1 = ST_GeomFromText('LINESTRING( 30 30,40 40,50 50)'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 2,4 5,5 5,7 1,0 0 ))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('LINESTRING(7 1,30 30,1010 3010,1010 2010,3010 3010,4010 4010,5010 5010 )'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab index idx3 PRIMARY 4 NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 Using where SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab index idx3 PRIMARY 4 NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 Using where EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ALL idx3 NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE ST_Touches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where EXPLAIN DELETE FROM tab WHERE ST_Touches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where SET @g1 = ST_GeomFromText('LINESTRING( 100 100,200 200,300 300)'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE ST_Touches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE ST_Touches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) '); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRWithin(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRWithin(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('POLYGON((4 -2,5 -4,6 -5,7 -4,7 2,4 -2))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab index idx3 PRIMARY 4 NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 Using where SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) @@ -295,29 +295,29 @@ c1 ST_Astext(c4) 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRDisjoint(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab index idx3 PRIMARY 4 NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 Using where EXPLAIN DELETE FROM tab WHERE MBRDisjoint(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ALL idx3 NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 Using where SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBREquals(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBREquals(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) @@ -325,54 +325,54 @@ c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where SET @g1 = ST_GeomFromText('LINESTRING( 30 30,40 40,50 50)'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 2,4 5,5 5,7 1,0 0 ))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRTouches(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRTouches(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRTouches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where EXPLAIN DELETE FROM tab WHERE MBRTouches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where CREATE PROCEDURE proc_wl6968() BEGIN SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))'); @@ -382,12 +382,12 @@ WHERE MBRContains(tab.c4, @g1); EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1); END | CALL proc_wl6968(); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))'); SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) @@ -488,78 +488,78 @@ test.tab analyze status Engine-independent statistics collected test.tab analyze status OK SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('LINESTRING( 300 300,400 400)'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) '); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRWithin(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRWithin(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('POLYGON((100 200,200 300,400 500,500 300,300 200,100 300,100 200))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE ST_Crosses(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE ST_Crosses(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('LINESTRING( 10 10,30 30,40 40)'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_CRosses(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE ST_Crosses(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE ST_Crosses(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('POLYGON((4 -2,5 -4,6 -5,7 -4,7 2,4 -2))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ALL idx3 NULL NULL NULL 10 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) @@ -573,29 +573,29 @@ c1 ST_Astext(c4) 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRDisjoint(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ALL idx3 NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 Using where EXPLAIN DELETE FROM tab WHERE MBRDisjoint(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ALL idx3 NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 Using where SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBREquals(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBREquals(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) @@ -603,114 +603,114 @@ c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where SET @g1 = ST_GeomFromText('LINESTRING( 30 30,40 40,50 50)'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 2,4 5,5 5,7 1,0 0 ))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('LINESTRING(7 1,30 30,1010 3010,1010 2010,3010 3010,4010 4010,5010 5010 )'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ALL idx3 NULL NULL NULL 10 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ALL idx3 NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 Using where EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ALL idx3 NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE ST_Touches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where EXPLAIN DELETE FROM tab WHERE ST_Touches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where SET @g1 = ST_GeomFromText('LINESTRING( 100 100,200 200,300 300)'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE ST_Touches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE ST_Touches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) '); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRWithin(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRWithin(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('POLYGON((4 -2,5 -4,6 -5,7 -4,7 2,4 -2))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ALL idx3 NULL NULL NULL 10 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) @@ -724,29 +724,29 @@ c1 ST_Astext(c4) 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRDisjoint(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ALL idx3 NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 Using where EXPLAIN DELETE FROM tab WHERE MBRDisjoint(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ALL idx3 NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 Using where SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBREquals(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBREquals(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) @@ -754,54 +754,54 @@ c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where SET @g1 = ST_GeomFromText('LINESTRING( 30 30,40 40,50 50)'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 2,4 5,5 5,7 1,0 0 ))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRTouches(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRTouches(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRTouches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where EXPLAIN DELETE FROM tab WHERE MBRTouches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where CREATE PROCEDURE proc_wl6968() BEGIN SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'); @@ -811,12 +811,12 @@ WHERE MBREquals(tab.c4, @g1); EXPLAIN DELETE FROM tab WHERE MBREquals(tab.c4, @g1); END | CALL proc_wl6968(); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) '); SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) @@ -906,78 +906,78 @@ test.tab analyze status Engine-independent statistics collected test.tab analyze status OK SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('LINESTRING( 300 300,400 400)'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) '); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRWithin(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRWithin(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('POLYGON((100 200,200 300,400 500,500 300,300 200,100 300,100 200))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE ST_Crosses(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE ST_Crosses(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('LINESTRING( 10 10,30 30,40 40)'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_CRosses(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Crosses(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE ST_Crosses(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE ST_Crosses(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('POLYGON((4 -2,5 -4,6 -5,7 -4,7 2,4 -2))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab index idx3 PRIMARY 4 NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 Using where SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) @@ -991,29 +991,29 @@ c1 ST_Astext(c4) 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRDisjoint(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab index idx3 PRIMARY 4 NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 Using where EXPLAIN DELETE FROM tab WHERE MBRDisjoint(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ALL idx3 NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 Using where SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBREquals(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBREquals(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) @@ -1021,114 +1021,114 @@ c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where SET @g1 = ST_GeomFromText('LINESTRING( 30 30,40 40,50 50)'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 2,4 5,5 5,7 1,0 0 ))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('LINESTRING(7 1,30 30,1010 3010,1010 2010,3010 3010,4010 4010,5010 5010 )'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab index idx3 PRIMARY 4 NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 Using where SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab index idx3 PRIMARY 4 NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 Using where EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ALL idx3 NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE ST_Touches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where EXPLAIN DELETE FROM tab WHERE ST_Touches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where SET @g1 = ST_GeomFromText('LINESTRING( 100 100,200 200,300 300)'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE ST_Touches(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 4 POLYGON((300 300,400 400,500 500,300 500,300 400,300 300)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE ST_Touches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE ST_Touches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((7 1,6 2,6 3,10 3,10 1,7 1))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRContains(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRContains(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) '); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRWithin(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRWithin(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRWithin(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText('POLYGON((4 -2,5 -4,6 -5,7 -4,7 2,4 -2))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab index idx3 PRIMARY 4 NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 Using where SELECT c1,ST_Astext(c4) FROM tab WHERE MBRDisjoint(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) @@ -1142,29 +1142,29 @@ c1 ST_Astext(c4) 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRDisjoint(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab index idx3 PRIMARY 4 NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL index idx3 PRIMARY 4 NULL 10 Using where EXPLAIN DELETE FROM tab WHERE MBRDisjoint(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ALL idx3 NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ALL idx3 NULL NULL NULL 10 Using where SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 10 POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBREquals(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBREquals(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) @@ -1172,54 +1172,54 @@ c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where SET @g1 = ST_GeomFromText('LINESTRING( 30 30,40 40,50 50)'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRIntersects(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 1 POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBRintersects(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 2,4 5,5 5,7 1,0 0 ))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBROverlaps(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 3 POLYGON((7 1,6 2,6 3,10 3,10 1,7 1)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where EXPLAIN DELETE FROM tab WHERE MBROverlaps(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 1 Using where SET @g1 = ST_GeomFromText( 'POLYGON((0 0,0 30,30 40,40 50,50 30,0 0))'); EXPLAIN SELECT c1,ST_Astext(c4) FROM tab WHERE MBRTouches(tab.c4, @g1) ORDER BY c1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where; Using filesort SELECT c1,ST_Astext(c4) FROM tab WHERE MBRTouches(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) 2 POLYGON((40 50,40 70,50 100,70 100,80 80,70 50,40 50)) EXPLAIN UPDATE tab SET C2 = ST_GeomFromText('POINT(0 0)') WHERE MBRTouches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where EXPLAIN DELETE FROM tab WHERE MBRTouches(tab.c4, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx3 idx3 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx3 idx3 34 NULL 2 Using where SET @g1 = ST_GeomFromText('POLYGON((5010 5010,5020 5020,5030 5030,5040 5030,5020 5010,5010 5010))'); SELECT c1,ST_Astext(c4) FROM tab WHERE MBREquals(tab.c4, @g1) ORDER BY c1; c1 ST_Astext(c4) diff --git a/mysql-test/suite/innodb_gis/r/geometry.result b/mysql-test/suite/innodb_gis/r/geometry.result index 1f5a8aba00c..b4864f2016c 100644 --- a/mysql-test/suite/innodb_gis/r/geometry.result +++ b/mysql-test/suite/innodb_gis/r/geometry.result @@ -180,40 +180,40 @@ CREATE UNIQUE INDEX idx2 on tab(c8(5) ASC) ; #check equality predicate on the index columns EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab WHERE c2=ST_LineFromText('LINESTRING(10 10,20 20,30 30)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ref idx1 idx1 8 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ref idx1 idx1 8 const # Using where #check index with WKB function EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab WHERE c2=ST_LineStringFromWKB(ST_AsWKB(ST_LineFromText('LINESTRING(10 10,20 20,30 30)'))); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ref idx1 idx1 8 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ref idx1 idx1 8 const # Using where #check index with WKT function EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab WHERE c3=ST_PolyFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ref idx3 idx3 8 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ref idx3 idx3 8 const # Using where #check index with WKB function EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab WHERE c3=ST_PolyFromWKB(ST_AsWkB(ST_PolyFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'))); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab ref idx3 idx3 8 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL ref idx3 idx3 8 const # Using where #check index with WKT function EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab WHERE c8=ST_GeomCollFromText('GeometryCollection(Point(1 1),LineString(2 2, 3 3))'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab const idx2 idx2 8 const # +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL const idx2 idx2 8 const # #check index with WKB function EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab WHERE c8=ST_GeometryFromWKB(ST_AsWKB(ST_GeomCollFromText('GeometryCollection(Point(1 1),LineString(2 2, 3 3))'))); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab const idx2 idx2 8 const # +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL const idx2 idx2 8 const # #check index with DELETE operation EXPLAIN DELETE FROM tab WHERE c8=ST_GeometryFromWKB(ST_AsWKB(ST_GeomCollFromText('GeometryCollection(Point(1 1),LineString(2 2, 3 3))'))); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab range idx2 idx2 8 NULL # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab NULL range idx2 idx2 8 NULL # Using where #check the spatial values SELECT ST_AsText(c1) FROM tab; ST_AsText(c1) @@ -704,40 +704,40 @@ CREATE UNIQUE INDEX idx2 on tab3(c8(5) ASC) ; #check equality predicate on the index columns EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 WHERE c2=ST_LineFromText('LINESTRING(10 10,20 20,30 30)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab3 ref idx1 idx1 8 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab3 NULL ref idx1 idx1 8 const # Using where #check index with WKB function EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 WHERE c2=ST_LineStringFromWKB(ST_AsWKB(ST_LineFromText('LINESTRING(10 10,20 20,30 30)'))); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab3 ref idx1 idx1 8 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab3 NULL ref idx1 idx1 8 const # Using where #check index with WKT function EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 WHERE c3=ST_PolyFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab3 ref idx3 idx3 8 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab3 NULL ref idx3 idx3 8 const # Using where #check index with WKB function EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 WHERE c3=ST_PolyFromWKB(ST_AsWkB(ST_PolyFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'))); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab3 ref idx3 idx3 8 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab3 NULL ref idx3 idx3 8 const # Using where #check index with WKT function EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 WHERE c8=ST_GeomCollFromText('GeometryCollection(Point(1 1),LineString(2 2, 3 3))'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab3 const idx2 idx2 8 const # +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab3 NULL const idx2 idx2 8 const # #check index with WKB function EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 WHERE c8=ST_GeometryFromWKB(ST_AsWKB(ST_GeomCollFromText('GeometryCollection(Point(1 1),LineString(2 2, 3 3))'))); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab3 const idx2 idx2 8 const # +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab3 NULL const idx2 idx2 8 const # #check index with DELETE operation EXPLAIN DELETE FROM tab3 WHERE c8=ST_GeometryFromWKB(ST_AsWKB(ST_GeomCollFromText('GeometryCollection(Point(1 1),LineString(2 2, 3 3))'))); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab3 range idx2 idx2 8 NULL # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab3 NULL range idx2 idx2 8 NULL # Using where #check the spatial values SELECT ST_AsText(c1) FROM tab3; ST_AsText(c1) @@ -784,13 +784,13 @@ tab3 CREATE TABLE `tab3` ( #check index with WKB function EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 WHERE c2=ST_LineStringFromWKB(ST_AsWKB(ST_LineFromText('LINESTRING(10 10,20 20,30 30)'))); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab3 ref idx1 idx1 8 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab3 NULL ref idx1 idx1 8 const # Using where #check index with WKT function EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 WHERE c3=ST_PolyFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tab3 ref idx3 idx3 8 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tab3 NULL ref idx3 idx3 8 const # Using where #check the Geometry property functions SELECT fid, ST_Dimension(g) FROM gis_geometry; fid ST_Dimension(g) @@ -889,8 +889,8 @@ fid ST_AsText(ST_Envelope(g)) 121 POLYGON((10 10,20 10,20 20,10 20,10 10)) 122 POLYGON((3 6,44 6,44 9,3 9,3 6)) explain extended select ST_Dimension(g), ST_GeometryType(g), ST_IsEmpty(g), ST_AsText(ST_Envelope(g)) from gis_geometry; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_geometry ALL NULL NULL NULL NULL # 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_geometry NULL ALL NULL NULL NULL NULL # 100.00 Warnings: Note 1003 select st_dimension(`test`.`gis_geometry`.`g`) AS `ST_Dimension(g)`,st_geometrytype(`test`.`gis_geometry`.`g`) AS `ST_GeometryType(g)`,st_isempty(`test`.`gis_geometry`.`g`) AS `ST_IsEmpty(g)`,st_astext(st_envelope(`test`.`gis_geometry`.`g`)) AS `ST_AsText(ST_Envelope(g))` from `test`.`gis_geometry` #check Geometry point functions @@ -907,8 +907,8 @@ fid ST_Y(g) 103 20 104 20 explain extended select ST_X(g),ST_Y(g) FROM gis_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_point ALL NULL NULL NULL NULL # 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_point NULL ALL NULL NULL NULL NULL # 100.00 Warnings: Note 1003 select st_x(`test`.`gis_point`.`g`) AS `ST_X(g)`,st_y(`test`.`gis_point`.`g`) AS `ST_Y(g)` from `test`.`gis_point` SELECT fid, ST_AsText(ST_StartPoint(g)) FROM gis_line; @@ -943,8 +943,8 @@ fid ST_IsClosed(g) 107 0 explain extended select ST_AsText(ST_StartPoint(g)),ST_AsText(ST_EndPoint(g)), ST_Length(g),ST_NumPoints(g),ST_AsText(ST_PointN(g, 2)),ST_IsClosed(g) FROM gis_line; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_line ALL NULL NULL NULL NULL # 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_line NULL ALL NULL NULL NULL NULL # 100.00 Warnings: Note 1003 select st_astext(st_startpoint(`test`.`gis_line`.`g`)) AS `ST_AsText(ST_StartPoint(g))`,st_astext(st_endpoint(`test`.`gis_line`.`g`)) AS `ST_AsText(ST_EndPoint(g))`,st_length(`test`.`gis_line`.`g`) AS `ST_Length(g)`,st_numpoints(`test`.`gis_line`.`g`) AS `ST_NumPoints(g)`,st_astext(st_pointn(`test`.`gis_line`.`g`,2)) AS `ST_AsText(ST_PointN(g, 2))`,st_isclosed(`test`.`gis_line`.`g`) AS `ST_IsClosed(g)` from `test`.`gis_line` SELECT fid, ST_AsText(ST_Centroid(g)) FROM gis_polygon; @@ -974,8 +974,8 @@ fid ST_AsText(ST_InteriorRingN(g, 1)) 110 NULL explain extended select ST_AsText(ST_Centroid(g)),ST_Area(g),ST_AsText(ST_ExteriorRing(g)), ST_NumInteriorRings(g),ST_AsText(ST_InteriorRingN(g, 1)) FROM gis_polygon; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_polygon ALL NULL NULL NULL NULL # 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_polygon NULL ALL NULL NULL NULL NULL # 100.00 Warnings: Note 1003 select st_astext(st_centroid(`test`.`gis_polygon`.`g`)) AS `ST_AsText(ST_Centroid(g))`,st_area(`test`.`gis_polygon`.`g`) AS `ST_Area(g)`,st_astext(st_exteriorring(`test`.`gis_polygon`.`g`)) AS `ST_AsText(ST_ExteriorRing(g))`,st_numinteriorrings(`test`.`gis_polygon`.`g`) AS `ST_NumInteriorRings(g)`,st_astext(st_interiorringn(`test`.`gis_polygon`.`g`,1)) AS `ST_AsText(ST_InteriorRingN(g, 1))` from `test`.`gis_polygon` SELECT fid, ST_IsClosed(g) FROM gis_multi_line; @@ -1014,8 +1014,8 @@ fid ST_NumGeometries(g) 121 2 122 2 explain extended SELECT fid, ST_NumGeometries(g) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL # 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_multi_point NULL ALL NULL NULL NULL NULL # 100.00 Warnings: Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,st_numgeometries(`test`.`gis_multi_point`.`g`) AS `ST_NumGeometries(g)` from `test`.`gis_multi_point` SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; @@ -1044,8 +1044,8 @@ fid ST_AsText(ST_GeometryN(g, 1)) 121 POINT(10 10) 122 POINT(44 6) explain extended SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL # 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_multi_point NULL ALL NULL NULL NULL NULL # 100.00 Warnings: Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,st_astext(st_geometryn(`test`.`gis_multi_point`.`g`,2)) AS `ST_AsText(ST_GeometryN(g, 2))` from `test`.`gis_multi_point` SELECT g1.fid as first, g2.fid as second, @@ -1068,9 +1068,9 @@ MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL # 100.00 Using temporary; Using filesort -1 SIMPLE g2 ALL NULL NULL NULL NULL # 100.00 Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE g1 NULL ALL NULL NULL NULL NULL # 100.00 Using temporary; Using filesort +1 SIMPLE g2 NULL ALL NULL NULL NULL NULL # 100.00 Using join buffer (flat, BNL join) Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,mbrwithin(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,mbrcontains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,mbroverlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,mbrequals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,mbrdisjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,st_touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,mbrintersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,st_crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` # check support of Foreign Key constraint diff --git a/mysql-test/suite/innodb_gis/r/gis.result b/mysql-test/suite/innodb_gis/r/gis.result index f41fcab5bbb..a73836e8960 100644 --- a/mysql-test/suite/innodb_gis/r/gis.result +++ b/mysql-test/suite/innodb_gis/r/gis.result @@ -227,8 +227,8 @@ fid ST_AsText(ST_Envelope(g)) 120 POLYGON((0 0,10 0,10 10,0 10,0 0)) 121 POLYGON((3 6,44 6,44 9,3 9,3 6)) explain extended select ST_Dimension(g), ST_GeometryType(g), ST_IsEmpty(g), ST_AsText(ST_Envelope(g)) from gis_geometry; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_geometry ALL NULL NULL NULL NULL # 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_geometry NULL ALL NULL NULL NULL NULL # 100.00 Warnings: Note 1003 select st_dimension(`test`.`gis_geometry`.`g`) AS `ST_Dimension(g)`,st_geometrytype(`test`.`gis_geometry`.`g`) AS `ST_GeometryType(g)`,st_isempty(`test`.`gis_geometry`.`g`) AS `ST_IsEmpty(g)`,st_astext(st_envelope(`test`.`gis_geometry`.`g`)) AS `ST_AsText(ST_Envelope(g))` from `test`.`gis_geometry` SELECT fid, ST_X(g) FROM gis_point; @@ -244,8 +244,8 @@ fid ST_Y(g) 103 20 104 20 explain extended select ST_X(g),ST_Y(g) FROM gis_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_point ALL NULL NULL NULL NULL # 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_point NULL ALL NULL NULL NULL NULL # 100.00 Warnings: Note 1003 select st_x(`test`.`gis_point`.`g`) AS `ST_X(g)`,st_y(`test`.`gis_point`.`g`) AS `ST_Y(g)` from `test`.`gis_point` SELECT fid, ST_AsText(ST_StartPoint(g)) FROM gis_line; @@ -279,8 +279,8 @@ fid ST_IsClosed(g) 106 1 107 0 explain extended select ST_AsText(ST_StartPoint(g)),ST_AsText(ST_EndPoint(g)),ST_Length(g),ST_NumPoints(g),ST_AsText(ST_PointN(g, 2)),ST_IsClosed(g) FROM gis_line; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_line ALL NULL NULL NULL NULL # 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_line NULL ALL NULL NULL NULL NULL # 100.00 Warnings: Note 1003 select st_astext(st_startpoint(`test`.`gis_line`.`g`)) AS `ST_AsText(ST_StartPoint(g))`,st_astext(st_endpoint(`test`.`gis_line`.`g`)) AS `ST_AsText(ST_EndPoint(g))`,st_length(`test`.`gis_line`.`g`) AS `ST_Length(g)`,st_numpoints(`test`.`gis_line`.`g`) AS `ST_NumPoints(g)`,st_astext(st_pointn(`test`.`gis_line`.`g`,2)) AS `ST_AsText(ST_PointN(g, 2))`,st_isclosed(`test`.`gis_line`.`g`) AS `ST_IsClosed(g)` from `test`.`gis_line` SELECT fid, ST_AsText(ST_Centroid(g)) FROM gis_polygon; @@ -309,8 +309,8 @@ fid ST_AsText(ST_InteriorRingN(g, 1)) 109 LINESTRING(10 10,20 10,20 20,10 20,10 10) 110 NULL explain extended select ST_AsText(ST_Centroid(g)),ST_Area(g),ST_AsText(ST_ExteriorRing(g)),ST_NumInteriorRings(g),ST_AsText(ST_InteriorRingN(g, 1)) FROM gis_polygon; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_polygon ALL NULL NULL NULL NULL # 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_polygon NULL ALL NULL NULL NULL NULL # 100.00 Warnings: Note 1003 select st_astext(st_centroid(`test`.`gis_polygon`.`g`)) AS `ST_AsText(ST_Centroid(g))`,st_area(`test`.`gis_polygon`.`g`) AS `ST_Area(g)`,st_astext(st_exteriorring(`test`.`gis_polygon`.`g`)) AS `ST_AsText(ST_ExteriorRing(g))`,st_numinteriorrings(`test`.`gis_polygon`.`g`) AS `ST_NumInteriorRings(g)`,st_astext(st_interiorringn(`test`.`gis_polygon`.`g`,1)) AS `ST_AsText(ST_InteriorRingN(g, 1))` from `test`.`gis_polygon` SELECT fid, ST_IsClosed(g) FROM gis_multi_line; @@ -348,8 +348,8 @@ fid ST_NumGeometries(g) 120 2 121 2 explain extended SELECT fid, ST_NumGeometries(g) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL # 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_multi_point NULL ALL NULL NULL NULL NULL # 100.00 Warnings: Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,st_numgeometries(`test`.`gis_multi_point`.`g`) AS `ST_NumGeometries(g)` from `test`.`gis_multi_point` SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; @@ -376,8 +376,8 @@ fid ST_AsText(ST_GeometryN(g, 1)) 120 POINT(0 0) 121 POINT(44 6) explain extended SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL # 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE gis_multi_point NULL ALL NULL NULL NULL NULL # 100.00 Warnings: Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,st_astext(st_geometryn(`test`.`gis_multi_point`.`g`,2)) AS `ST_AsText(ST_GeometryN(g, 2))` from `test`.`gis_multi_point` SELECT g1.fid as first, g2.fid as second, @@ -395,9 +395,9 @@ MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL # 100.00 Using temporary; Using filesort -1 SIMPLE g2 ALL NULL NULL NULL NULL # 100.00 Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE g1 NULL ALL NULL NULL NULL NULL # 100.00 Using temporary; Using filesort +1 SIMPLE g2 NULL ALL NULL NULL NULL NULL # 100.00 Using join buffer (flat, BNL join) Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,mbrwithin(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,mbrcontains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,mbroverlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,mbrequals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,mbrdisjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,st_touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,mbrintersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,st_crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; @@ -438,26 +438,26 @@ SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)'))) ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))) POINT(1 4) explain extended SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select st_astext(st_geometryfromwkb(st_aswkb(st_geometryfromtext('POINT(1 4)')))) AS `ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)'))))` explain extended SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_PointFromText('POINT(1 4)')))); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select st_astext(st_geometryfromwkb(st_aswkb(st_geometryfromtext('POINT(1 4)')))) AS `ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_PointFromText('POINT(1 4)'))))` SELECT ST_SRID(ST_GeomFromText('LineString(1 1,2 2)',101)); ST_SRID(ST_GeomFromText('LineString(1 1,2 2)',101)) 101 explain extended SELECT ST_SRID(ST_GeomFromText('LineString(1 1,2 2)',101)); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select srid(st_geometryfromtext('LineString(1 1,2 2)',101)) AS `ST_SRID(ST_GeomFromText('LineString(1 1,2 2)',101))` explain extended select ST_issimple(MultiPoint(Point(3, 6), Point(4, 10))), ST_issimple(Point(3, 6)); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select st_issimple(multipoint(point(3,6),point(4,10))) AS `ST_issimple(MultiPoint(Point(3, 6), Point(4, 10)))`,st_issimple(point(3,6)) AS `ST_issimple(Point(3, 6))` create table t1 (a geometry not null); @@ -939,8 +939,8 @@ COUNT(*) 1 EXPLAIN SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref p p 28 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ref p p 28 const 1 Using where SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)'); COUNT(*) 1 @@ -948,22 +948,22 @@ INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(3 4)')); INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(3 4)')); EXPLAIN SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 2 Using where SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)'); COUNT(*) 1 EXPLAIN SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref p p 28 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ref p p 28 const # Using where SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)'); COUNT(*) 1 EXPLAIN SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 2 Using where SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)'); COUNT(*) 1 diff --git a/mysql-test/suite/innodb_gis/r/innodb_gis_rtree.result b/mysql-test/suite/innodb_gis/r/innodb_gis_rtree.result index 5f0187eaa30..f2ed437d860 100644 --- a/mysql-test/suite/innodb_gis/r/innodb_gis_rtree.result +++ b/mysql-test/suite/innodb_gis/r/innodb_gis_rtree.result @@ -165,8 +165,8 @@ SELECT count(*) FROM t1; count(*) 150 EXPLAIN SELECT fid, AsText(g) FROM t1 WHERE Within(g, GeomFromText('Polygon((140 140,160 140,160 160,140 160,140 140))')); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range g g 34 NULL 8 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range g g 34 NULL 8 Using where SELECT fid, AsText(g) FROM t1 WHERE Within(g, GeomFromText('Polygon((140 140,160 140,160 160,140 160,140 140))')); fid AsText(g) 1 LINESTRING(150 150,150 150) @@ -299,8 +299,8 @@ count(*) 100 EXPLAIN SELECT fid, AsText(g) FROM t2 WHERE Within(g, GeomFromText('Polygon((40 40,60 40,60 60,40 60,40 40))')); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range g g 34 NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL range g g 34 NULL 4 Using where SELECT fid, AsText(g) FROM t2 WHERE Within(g, GeomFromText('Polygon((40 40,60 40,60 60,40 60,40 40))')); fid AsText(g) @@ -1486,32 +1486,32 @@ INSERT INTO t1 VALUES (GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)')), (GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)')); EXPLAIN SELECT 1 FROM t1 WHERE a = GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL a NULL NULL NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL a NULL NULL NULL 2 Using where SELECT 1 FROM t1 WHERE a = GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)'); 1 1 1 EXPLAIN SELECT 1 FROM t1 WHERE a < GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL a NULL NULL NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL a NULL NULL NULL 2 Using where SELECT 1 FROM t1 WHERE a < GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)'); 1 EXPLAIN SELECT 1 FROM t1 WHERE a <= GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL a NULL NULL NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL a NULL NULL NULL 2 Using where SELECT 1 FROM t1 WHERE a <= GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)'); 1 1 1 EXPLAIN SELECT 1 FROM t1 WHERE a > GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL a NULL NULL NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL a NULL NULL NULL 2 Using where SELECT 1 FROM t1 WHERE a > GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)'); 1 EXPLAIN SELECT 1 FROM t1 WHERE a >= GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL a NULL NULL NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL a NULL NULL NULL 2 Using where SELECT 1 FROM t1 WHERE a >= GEOMFROMTEXT('LINESTRING(-1 -1, 1 -1, -1 -1, -1 1, 1 1)'); 1 1 @@ -1596,17 +1596,17 @@ DROP TABLE t1; CREATE TABLE t1 (a GEOMETRY NOT NULL, SPATIAL KEY(a)); INSERT INTO t1 VALUES (Point(1,2)),(Point(1,3)); EXPLAIN SELECT * FROM t1 WHERE MBRINTERSECTS(a,Point(1,2)); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range a a 34 NULL 1 Using where EXPLAIN SELECT * FROM t1 WHERE ST_INTERSECTS(a,Point(1,2)); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range a a 34 NULL 1 Using where EXPLAIN SELECT * FROM t1 WHERE MBRINTERSECTS(Point(1,2),a); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range a a 34 NULL 1 Using where EXPLAIN SELECT * FROM t1 WHERE ST_INTERSECTS(Point(1,2),a); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range a a 34 NULL 1 Using where DROP TABLE t1; # # MDEV-8610 "WHERE CONTAINS(indexed_geometry_column,1)" causes full table scan diff --git a/mysql-test/suite/innodb_gis/r/point_basic.result b/mysql-test/suite/innodb_gis/r/point_basic.result index 14f07d4facf..33861cbdc28 100644 --- a/mysql-test/suite/innodb_gis/r/point_basic.result +++ b/mysql-test/suite/innodb_gis/r/point_basic.result @@ -24,8 +24,8 @@ INSERT INTO gis_point VALUES (ST_PointFromText('POINT(100.32374832 101.23741821)'), ST_PointFromText('POINT(200.32247328 101.86728201)')), (ST_PointFromText('POINT(100.32374832 101.23741821)'), ST_PointFromText('POINT(100.32374832 101.98527111)')); EXPLAIN SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point GROUP BY p1, p2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE gis_point ALL NULL NULL NULL NULL # Using temporary; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE gis_point NULL ALL NULL NULL NULL NULL # Using temporary; Using filesort SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point GROUP BY p1, p2; ST_AsText(p1) ST_AsText(p2) POINT(100.32374832 101.23741821) POINT(100.32374832 101.98527111) @@ -301,8 +301,8 @@ INSERT INTO gis_point VALUES (206, ST_PointFromWKB(ST_AsWKB(ST_PointFromText('POINT(103.43718640 105.248206478)')))); 'The ORDER BY will use filesort' EXPLAIN SELECT ST_AsText(p) FROM gis_point ORDER BY p; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE gis_point ALL NULL NULL NULL NULL # Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE gis_point NULL ALL NULL NULL NULL NULL # Using filesort SELECT ST_AsText(p) FROM gis_point ORDER BY p; ST_AsText(p) POINT(10 10) @@ -1325,8 +1325,8 @@ Table Op Msg_type Msg_text test.gis_point check status OK The ORDER BY for spatial index will use filesort EXPLAIN SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point ORDER BY p1, p2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE gis_point ALL NULL NULL NULL NULL # Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE gis_point NULL ALL NULL NULL NULL NULL # Using filesort SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point ORDER BY p1, p2; ST_AsText(p1) ST_AsText(p2) POINT(2 4) POINT(-2 -6) @@ -1487,8 +1487,8 @@ a ST_AsText(p) ST_AsText(l) ST_AsText(g) 1 POINT(10 10) LINESTRING(1 1,5 5,10 10) POLYGON((30 30,40 40,50 50,30 50,30 40,30 30)) 2 POINT(20 20) LINESTRING(2 3,7 8,9 10,15 16) POLYGON((10 30,30 40,40 50,40 30,30 20,10 30)) EXPLAIN UPDATE t1 SET p = ST_GeomFromText('POINT(30 30)') WHERE p = ST_GeomFromText('POINT(20 20)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range PRIMARY PRIMARY 27 NULL # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range PRIMARY PRIMARY 27 NULL # Using where UPDATE t1 SET p = ST_GeomFromText('POINT(30 30)') WHERE p = ST_GeomFromText('POINT(20 20)'); SELECT a, ST_AsText(p), ST_AsText(l), ST_AsText(g) FROM t1; a ST_AsText(p) ST_AsText(l) ST_AsText(g) @@ -1525,8 +1525,8 @@ a ST_AsText(p) ST_AsText(l) ST_AsText(g) ALTER TABLE t1 DROP PRIMARY KEY; ALTER TABLE t1 ADD PRIMARY KEY(p); EXPLAIN SELECT a, ST_AsText(p) FROM t1 WHERE a = 2 AND p = ST_GeomFromText('POINT(30 30)'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 const PRIMARY,idx2 PRIMARY 27 const # +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL const PRIMARY,idx2 PRIMARY 27 const # SELECT a, ST_AsText(p) FROM t1 WHERE a = 2 AND p = ST_GeomFromText('POINT(30 30)'); a ST_AsText(p) 2 POINT(30 30) diff --git a/mysql-test/suite/innodb_gis/r/rt_precise.result b/mysql-test/suite/innodb_gis/r/rt_precise.result index 4929dfc99a8..432f3efe69c 100644 --- a/mysql-test/suite/innodb_gis/r/rt_precise.result +++ b/mysql-test/suite/innodb_gis/r/rt_precise.result @@ -21,8 +21,8 @@ Table Op Msg_type Msg_text test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK EXPLAIN SELECT fid, ST_AsText(g) FROM t1 WHERE ST_Within(g, ST_GeomFromText('Polygon((140 140,160 140,160 160,140 140))')); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL gis_key NULL NULL NULL # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL gis_key NULL NULL NULL # Using where SELECT fid, ST_AsText(g) FROM t1 WHERE ST_Within(g, ST_GeomFromText('Polygon((140 140,160 140,160 160,140 160,140 140))')) ORDER BY fid; fid ST_AsText(g) 1 LINESTRING(150 150,150 150) diff --git a/mysql-test/suite/innodb_gis/r/rtree.result b/mysql-test/suite/innodb_gis/r/rtree.result index 9b91b9b9c16..93d196932d3 100644 --- a/mysql-test/suite/innodb_gis/r/rtree.result +++ b/mysql-test/suite/innodb_gis/r/rtree.result @@ -10,8 +10,8 @@ test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK set @g1 = ST_GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))'); explain select ST_astext(t1.g) from t1 where MBRWithin(t1.g, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL g NULL NULL NULL 5 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL g NULL NULL NULL 5 Using where select ST_astext(t1.g) from t1 where MBRWithin(t1.g, @g1); ST_astext(t1.g) POINT(1 1) @@ -156,8 +156,8 @@ test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK set @g1 = ST_GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))'); explain select ST_astext(t1.g) from t1 where MBRWithin(t1.g, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL g NULL NULL NULL 5 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL g NULL NULL NULL 5 Using where select ST_astext(t1.g) from t1 where MBRWithin(t1.g, @g1); ST_astext(t1.g) POINT(1 1) diff --git a/mysql-test/suite/innodb_gis/r/rtree_estimate.result b/mysql-test/suite/innodb_gis/r/rtree_estimate.result index dafcc40aba8..7fc034664ea 100644 --- a/mysql-test/suite/innodb_gis/r/rtree_estimate.result +++ b/mysql-test/suite/innodb_gis/r/rtree_estimate.result @@ -6,8 +6,8 @@ SET @g1 = ST_GeomFromText('POINT(10 10)'); SET @g2 = ST_GeomFromText('POLYGON((5 5, 20 5, 20 21, 5 21, 5 5))'); SET @g3 = ST_GeomFromText('POLYGON((1.79769e+308 1.79769e+308, 20 5, -1.79769e+308 -1.79769e+308, 1.79769e+308 1.79769e+308))'); EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRContains(g, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL g NULL NULL NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL g NULL NULL NULL 1 Using where SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g1); ST_AsText(g) INSERT INTO t1 VALUES(@g1); @@ -23,105 +23,105 @@ Table Op Msg_type Msg_text test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRContains(g, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range g g 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range g g 34 NULL 1 Using where SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g1); ST_AsText(g) POINT(10 10) EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRDisjoint(g, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range g g 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range g g 34 NULL 2 Using where SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g1); ST_AsText(g) POINT(10 10) EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBREquals(g, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range g g 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range g g 34 NULL 1 Using where SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g1); ST_AsText(g) POINT(10 10) EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRIntersects(g, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range g g 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range g g 34 NULL 1 Using where SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g1); ST_AsText(g) POINT(10 10) EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range g g 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range g g 34 NULL 1 Using where SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g1); ST_AsText(g) POINT(10 10) EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRContains(g, @g2); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range g g 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range g g 34 NULL 1 Using where SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g2); ST_AsText(g) POINT(10 10) POLYGON((5 5,20 5,20 21,5 21,5 5)) EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRDisjoint(g, @g2); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range g g 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range g g 34 NULL 1 Using where SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g2); ST_AsText(g) POINT(10 10) POLYGON((5 5,20 5,20 21,5 21,5 5)) EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBREquals(g, @g2); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range g g 34 NULL 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range g g 34 NULL 1 Using where SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g2); ST_AsText(g) POINT(10 10) POLYGON((5 5,20 5,20 21,5 21,5 5)) EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRIntersects(g, @g2); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range g g 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range g g 34 NULL 2 Using where SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g2); ST_AsText(g) POINT(10 10) POLYGON((5 5,20 5,20 21,5 21,5 5)) EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g2); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range g g 34 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range g g 34 NULL 2 Using where SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g2); ST_AsText(g) POINT(10 10) POLYGON((5 5,20 5,20 21,5 21,5 5)) EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRContains(g, @g3); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL g NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL g NULL NULL NULL 3 Using where SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g3); ST_AsText(g) POINT(10 10) POLYGON((5 5,20 5,20 21,5 21,5 5)) POLYGON((1.79769e308 1.79769e308,20 5,-1.79769e308 -1.79769e308,1.79769e308 1.79769e308)) EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRDisjoint(g, @g3); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL g NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL g NULL NULL NULL 3 Using where SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g3); ST_AsText(g) POINT(10 10) POLYGON((5 5,20 5,20 21,5 21,5 5)) POLYGON((1.79769e308 1.79769e308,20 5,-1.79769e308 -1.79769e308,1.79769e308 1.79769e308)) EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBREquals(g, @g3); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL g NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL g NULL NULL NULL 3 Using where SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g3); ST_AsText(g) POINT(10 10) POLYGON((5 5,20 5,20 21,5 21,5 5)) POLYGON((1.79769e308 1.79769e308,20 5,-1.79769e308 -1.79769e308,1.79769e308 1.79769e308)) EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRIntersects(g, @g3); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL g NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL g NULL NULL NULL 3 Using where SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g3); ST_AsText(g) POINT(10 10) POLYGON((5 5,20 5,20 21,5 21,5 5)) POLYGON((1.79769e308 1.79769e308,20 5,-1.79769e308 -1.79769e308,1.79769e308 1.79769e308)) EXPLAIN SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g3); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL g NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL g NULL NULL NULL 3 Using where SELECT ST_AsText(g) FROM t1 WHERE MBRWithin(g, @g3); ST_AsText(g) POINT(10 10) diff --git a/mysql-test/suite/innodb_gis/r/rtree_multi_pk.result b/mysql-test/suite/innodb_gis/r/rtree_multi_pk.result index 948b700aa6c..5bbd15fb500 100644 --- a/mysql-test/suite/innodb_gis/r/rtree_multi_pk.result +++ b/mysql-test/suite/innodb_gis/r/rtree_multi_pk.result @@ -10,8 +10,8 @@ test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK set @g1 = ST_GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))'); explain select ST_astext(t1.g) from t1 where MBRWithin(t1.g, @g1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL g NULL NULL NULL 5 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL g NULL NULL NULL 5 Using where select ST_astext(t1.g) from t1 where MBRWithin(t1.g, @g1); ST_astext(t1.g) POINT(1 1) diff --git a/mysql-test/suite/innodb_gis/r/types.result b/mysql-test/suite/innodb_gis/r/types.result index a337ee10e3d..55f74f1c66b 100644 --- a/mysql-test/suite/innodb_gis/r/types.result +++ b/mysql-test/suite/innodb_gis/r/types.result @@ -32,8 +32,8 @@ MULTIPOLYGON(((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))) GEOMETRYCOLLECTION(POINT(1 1),LINESTRING(2 2,3 3)) CREATE INDEX i_p ON t_wl6455 (g(10)); EXPLAIN SELECT ST_AsText(g) FROM t_wl6455 WHERE g = POINT(2,2); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t_wl6455 ref i_p i_p 12 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t_wl6455 NULL ref i_p i_p 12 const # Using where SELECT ST_AsText(g) FROM t_wl6455 WHERE g = POINT(2,2); ST_AsText(g) POINT(2 2) diff --git a/mysql-test/suite/innodb_gis/t/1.test b/mysql-test/suite/innodb_gis/t/1.test index 950db360794..ffd544d7fff 100644 --- a/mysql-test/suite/innodb_gis/t/1.test +++ b/mysql-test/suite/innodb_gis/t/1.test @@ -91,12 +91,12 @@ SELECT fid, ST_Dimension(g) FROM gis_geometry; SELECT fid, ST_GeometryType(g) FROM gis_geometry; SELECT fid, ST_IsEmpty(g) FROM gis_geometry; SELECT fid, ST_AsText(ST_Envelope(g)) FROM gis_geometry; ---replace_column 9 # 10 # +--replace_column 10 # 11 # explain extended select ST_Dimension(g), ST_GeometryType(g), ST_IsEmpty(g), ST_AsText(ST_Envelope(g)) from gis_geometry; SELECT fid, ST_X(g) FROM gis_point; SELECT fid, ST_Y(g) FROM gis_point; ---replace_column 9 # 10 # +--replace_column 10 # 11 # explain extended select ST_X(g),ST_Y(g) FROM gis_point; SELECT fid, ST_AsText(ST_StartPoint(g)) FROM gis_line; @@ -105,7 +105,7 @@ SELECT fid, ST_Length(g) FROM gis_line; SELECT fid, ST_NumPoints(g) FROM gis_line; SELECT fid, ST_AsText(ST_PointN(g, 2)) FROM gis_line; SELECT fid, ST_IsClosed(g) FROM gis_line; ---replace_column 9 # 10 # +--replace_column 10 # 11 # explain extended select ST_AsText(ST_StartPoint(g)),ST_AsText(ST_EndPoint(g)),ST_Length(g),ST_NumPoints(g),ST_AsText(ST_PointN(g, 2)),ST_IsClosed(g) FROM gis_line; SELECT fid, ST_AsText(ST_Centroid(g)) FROM gis_polygon; @@ -113,7 +113,7 @@ SELECT fid, ST_Area(g) FROM gis_polygon; SELECT fid, ST_AsText(ST_ExteriorRing(g)) FROM gis_polygon; SELECT fid, ST_NumInteriorRings(g) FROM gis_polygon; SELECT fid, ST_AsText(ST_InteriorRingN(g, 1)) FROM gis_polygon; ---replace_column 9 # 10 # +--replace_column 10 # 11 # explain extended select ST_AsText(ST_Centroid(g)),ST_Area(g),ST_AsText(ST_ExteriorRing(g)),ST_NumInteriorRings(g),ST_AsText(ST_InteriorRingN(g, 1)) FROM gis_polygon; SELECT fid, ST_IsClosed(g) FROM gis_multi_line; @@ -125,7 +125,7 @@ SELECT fid, ST_NumGeometries(g) from gis_multi_point; SELECT fid, ST_NumGeometries(g) from gis_multi_line; SELECT fid, ST_NumGeometries(g) from gis_multi_polygon; SELECT fid, ST_NumGeometries(g) from gis_geometrycollection; ---replace_column 9 # 10 # +--replace_column 10 # 11 # explain extended SELECT fid, ST_NumGeometries(g) from gis_multi_point; SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; @@ -133,7 +133,7 @@ SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_line; SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_polygon; SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_geometrycollection; SELECT fid, ST_AsText(ST_GeometryN(g, 1)) from gis_geometrycollection; ---replace_column 9 # 10 # +--replace_column 10 # 11 # explain extended SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; SELECT g1.fid as first, g2.fid as second, @@ -141,7 +141,7 @@ MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; ---replace_column 9 # 10 # +--replace_column 10 # 11 # explain extended SELECT g1.fid as first, g2.fid as second, MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g) as o, MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, diff --git a/mysql-test/suite/innodb_gis/t/geometry.test b/mysql-test/suite/innodb_gis/t/geometry.test index 4e8f0f729b5..cd56c056520 100644 --- a/mysql-test/suite/innodb_gis/t/geometry.test +++ b/mysql-test/suite/innodb_gis/t/geometry.test @@ -134,55 +134,55 @@ CREATE INDEX idx3 on tab(c3(5) ASC) USING BTREE; CREATE UNIQUE INDEX idx2 on tab(c8(5) ASC) ; --echo #check equality predicate on the index columns ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab WHERE c2=ST_LineFromText('LINESTRING(10 10,20 20,30 30)'); --echo #check index with WKB function ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab WHERE c2=ST_LineStringFromWKB(ST_AsWKB(ST_LineFromText('LINESTRING(10 10,20 20,30 30)'))); --echo #check index with WKT function ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab WHERE c3=ST_PolyFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'); --echo #check index with WKB function ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab WHERE c3=ST_PolyFromWKB(ST_AsWkB(ST_PolyFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'))); --echo #check index with WKT function ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab WHERE c8=ST_GeomCollFromText('GeometryCollection(Point(1 1),LineString(2 2, 3 3))'); --echo #check index with WKB function ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab WHERE c8=ST_GeometryFromWKB(ST_AsWKB(ST_GeomCollFromText('GeometryCollection(Point(1 1),LineString(2 2, 3 3))'))); #--echo #check range predicate on the index columns -#--replace_column 9 # +#--replace_column 10 # #--error ER_WRONG_ARGUMENTS #EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab #WHERE c2>=ST_LineFromText('LINESTRING(10 10,20 20,30 30)'); # -#--replace_column 9 # +#--replace_column 10 # #--error ER_WRONG_ARGUMENTS #EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab #WHERE c3>=ST_PolyFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'); # -#--replace_column 9 # +#--replace_column 10 # #--error ER_WRONG_ARGUMENTS #EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab #WHERE c8>=ST_GeomCollFromText('GeometryCollection(Point(1 1),LineString(2 2, 3 3))'); --echo #check index with DELETE operation ---replace_column 9 # +--replace_column 10 # EXPLAIN DELETE FROM tab WHERE c8=ST_GeometryFromWKB(ST_AsWKB(ST_GeomCollFromText('GeometryCollection(Point(1 1),LineString(2 2, 3 3))'))); @@ -489,55 +489,55 @@ CREATE UNIQUE INDEX idx2 on tab3(c8(5) ASC) ; --enable_warnings --echo #check equality predicate on the index columns ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 WHERE c2=ST_LineFromText('LINESTRING(10 10,20 20,30 30)'); --echo #check index with WKB function ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 WHERE c2=ST_LineStringFromWKB(ST_AsWKB(ST_LineFromText('LINESTRING(10 10,20 20,30 30)'))); --echo #check index with WKT function ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 WHERE c3=ST_PolyFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'); --echo #check index with WKB function ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 WHERE c3=ST_PolyFromWKB(ST_AsWkB(ST_PolyFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'))); --echo #check index with WKT function ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 WHERE c8=ST_GeomCollFromText('GeometryCollection(Point(1 1),LineString(2 2, 3 3))'); --echo #check index with WKB function ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 WHERE c8=ST_GeometryFromWKB(ST_AsWKB(ST_GeomCollFromText('GeometryCollection(Point(1 1),LineString(2 2, 3 3))'))); # --echo #check range predicate on the index columns -# --replace_column 9 # +# --replace_column 10 # # --error ER_WRONG_ARGUMENTS # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 # WHERE c2>=ST_LineFromText('LINESTRING(10 10,20 20,30 30)'); # -# --replace_column 9 # +# --replace_column 10 # # --error ER_WRONG_ARGUMENTS # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 # WHERE c3>=ST_PolyFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'); -# --replace_column 9 # +# --replace_column 10 # # --error ER_WRONG_ARGUMENTS # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 # WHERE c8>=ST_GeomCollFromText('GeometryCollection(Point(1 1),LineString(2 2, 3 3))'); --echo #check index with DELETE operation ---replace_column 9 # +--replace_column 10 # EXPLAIN DELETE FROM tab3 WHERE c8=ST_GeometryFromWKB(ST_AsWKB(ST_GeomCollFromText('GeometryCollection(Point(1 1),LineString(2 2, 3 3))'))); @@ -561,12 +561,12 @@ ALTER TABLE tab3 ROW_FORMAT=Dynamic; SHOW CREATE TABLE tab3; --echo #check index with WKB function ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 WHERE c2=ST_LineStringFromWKB(ST_AsWKB(ST_LineFromText('LINESTRING(10 10,20 20,30 30)'))); --echo #check index with WKT function ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_ASText(c1),ST_AsText(c2),ST_AsText(c8) FROM tab3 WHERE c3=ST_PolyFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'); @@ -577,13 +577,13 @@ SELECT fid, ST_Dimension(g) FROM gis_geometry; SELECT fid, ST_GeometryType(g) FROM gis_geometry; SELECT fid, ST_IsEmpty(g) FROM gis_geometry; SELECT fid, ST_AsText(ST_Envelope(g)) FROM gis_geometry; ---replace_column 9 # +--replace_column 10 # explain extended select ST_Dimension(g), ST_GeometryType(g), ST_IsEmpty(g), ST_AsText(ST_Envelope(g)) from gis_geometry; --echo #check Geometry point functions SELECT fid, ST_X(g) FROM gis_point; SELECT fid, ST_Y(g) FROM gis_point; ---replace_column 9 # +--replace_column 10 # explain extended select ST_X(g),ST_Y(g) FROM gis_point; SELECT fid, ST_AsText(ST_StartPoint(g)) FROM gis_line; @@ -592,7 +592,7 @@ SELECT fid, ST_Length(g) FROM gis_line; SELECT fid, ST_NumPoints(g) FROM gis_line; SELECT fid, ST_AsText(ST_PointN(g, 2)) FROM gis_line; SELECT fid, ST_IsClosed(g) FROM gis_line; ---replace_column 9 # +--replace_column 10 # explain extended select ST_AsText(ST_StartPoint(g)),ST_AsText(ST_EndPoint(g)), ST_Length(g),ST_NumPoints(g),ST_AsText(ST_PointN(g, 2)),ST_IsClosed(g) FROM gis_line; @@ -601,7 +601,7 @@ SELECT fid, ST_Area(g) FROM gis_polygon; SELECT fid, ST_AsText(ST_ExteriorRing(g)) FROM gis_polygon; SELECT fid, ST_NumInteriorRings(g) FROM gis_polygon; SELECT fid, ST_AsText(ST_InteriorRingN(g, 1)) FROM gis_polygon; ---replace_column 9 # +--replace_column 10 # explain extended select ST_AsText(ST_Centroid(g)),ST_Area(g),ST_AsText(ST_ExteriorRing(g)), ST_NumInteriorRings(g),ST_AsText(ST_InteriorRingN(g, 1)) FROM gis_polygon; @@ -614,7 +614,7 @@ SELECT fid, ST_NumGeometries(g) from gis_multi_point; SELECT fid, ST_NumGeometries(g) from gis_multi_line; SELECT fid, ST_NumGeometries(g) from gis_multi_polygon; SELECT fid, ST_NumGeometries(g) from gis_geometrycollection; ---replace_column 9 # +--replace_column 10 # explain extended SELECT fid, ST_NumGeometries(g) from gis_multi_point; SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; @@ -622,7 +622,7 @@ SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_line; SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_polygon; SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_geometrycollection; SELECT fid, ST_AsText(ST_GeometryN(g, 1)) from gis_geometrycollection; ---replace_column 9 # +--replace_column 10 # explain extended SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; SELECT g1.fid as first, g2.fid as second, @@ -630,7 +630,7 @@ MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; ---replace_column 9 # +--replace_column 10 # explain extended SELECT g1.fid as first, g2.fid as second, MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g) as o, MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, diff --git a/mysql-test/suite/innodb_gis/t/gis.test b/mysql-test/suite/innodb_gis/t/gis.test index 966aea7bc77..8a6e5db43cc 100644 --- a/mysql-test/suite/innodb_gis/t/gis.test +++ b/mysql-test/suite/innodb_gis/t/gis.test @@ -88,12 +88,12 @@ SELECT fid, ST_Dimension(g) FROM gis_geometry; SELECT fid, ST_GeometryType(g) FROM gis_geometry; SELECT fid, ST_IsEmpty(g) FROM gis_geometry; SELECT fid, ST_AsText(ST_Envelope(g)) FROM gis_geometry; ---replace_column 9 # +--replace_column 10 # explain extended select ST_Dimension(g), ST_GeometryType(g), ST_IsEmpty(g), ST_AsText(ST_Envelope(g)) from gis_geometry; SELECT fid, ST_X(g) FROM gis_point; SELECT fid, ST_Y(g) FROM gis_point; ---replace_column 9 # +--replace_column 10 # explain extended select ST_X(g),ST_Y(g) FROM gis_point; SELECT fid, ST_AsText(ST_StartPoint(g)) FROM gis_line; @@ -102,7 +102,7 @@ SELECT fid, ST_Length(g) FROM gis_line; SELECT fid, ST_NumPoints(g) FROM gis_line; SELECT fid, ST_AsText(ST_PointN(g, 2)) FROM gis_line; SELECT fid, ST_IsClosed(g) FROM gis_line; ---replace_column 9 # +--replace_column 10 # explain extended select ST_AsText(ST_StartPoint(g)),ST_AsText(ST_EndPoint(g)),ST_Length(g),ST_NumPoints(g),ST_AsText(ST_PointN(g, 2)),ST_IsClosed(g) FROM gis_line; SELECT fid, ST_AsText(ST_Centroid(g)) FROM gis_polygon; @@ -110,7 +110,7 @@ SELECT fid, ST_Area(g) FROM gis_polygon; SELECT fid, ST_AsText(ST_ExteriorRing(g)) FROM gis_polygon; SELECT fid, ST_NumInteriorRings(g) FROM gis_polygon; SELECT fid, ST_AsText(ST_InteriorRingN(g, 1)) FROM gis_polygon; ---replace_column 9 # +--replace_column 10 # explain extended select ST_AsText(ST_Centroid(g)),ST_Area(g),ST_AsText(ST_ExteriorRing(g)),ST_NumInteriorRings(g),ST_AsText(ST_InteriorRingN(g, 1)) FROM gis_polygon; SELECT fid, ST_IsClosed(g) FROM gis_multi_line; @@ -122,7 +122,7 @@ SELECT fid, ST_NumGeometries(g) from gis_multi_point; SELECT fid, ST_NumGeometries(g) from gis_multi_line; SELECT fid, ST_NumGeometries(g) from gis_multi_polygon; SELECT fid, ST_NumGeometries(g) from gis_geometrycollection; ---replace_column 9 # +--replace_column 10 # explain extended SELECT fid, ST_NumGeometries(g) from gis_multi_point; SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; @@ -130,7 +130,7 @@ SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_line; SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_polygon; SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_geometrycollection; SELECT fid, ST_AsText(ST_GeometryN(g, 1)) from gis_geometrycollection; ---replace_column 9 # +--replace_column 10 # explain extended SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; SELECT g1.fid as first, g2.fid as second, @@ -138,7 +138,7 @@ MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; ---replace_column 9 # +--replace_column 10 # explain extended SELECT g1.fid as first, g2.fid as second, MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g) as o, MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, diff --git a/mysql-test/suite/innodb_gis/t/point_basic.test b/mysql-test/suite/innodb_gis/t/point_basic.test index f6bc6d234a7..c82ba9836a0 100644 --- a/mysql-test/suite/innodb_gis/t/point_basic.test +++ b/mysql-test/suite/innodb_gis/t/point_basic.test @@ -31,7 +31,7 @@ INSERT INTO gis_point VALUES (ST_PointFromText('POINT(100.32374832 101.23741821)'), ST_PointFromText('POINT(200.32247328 101.86728201)')), (ST_PointFromText('POINT(100.32374832 101.23741821)'), ST_PointFromText('POINT(100.32374832 101.98527111)')); ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point GROUP BY p1, p2; SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point GROUP BY p1, p2; @@ -216,7 +216,7 @@ INSERT INTO gis_point VALUES (206, ST_PointFromWKB(ST_AsWKB(ST_PointFromText('POINT(103.43718640 105.248206478)')))); -- echo 'The ORDER BY will use filesort' ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_AsText(p) FROM gis_point ORDER BY p; SELECT ST_AsText(p) FROM gis_point ORDER BY p; @@ -640,7 +640,7 @@ ALTER TABLE gis_point ENGINE InnoDB; CHECK TABLE gis_point; -- echo The ORDER BY for spatial index will use filesort ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point ORDER BY p1, p2; SELECT ST_AsText(p1), ST_AsText(p2) FROM gis_point ORDER BY p1, p2; @@ -766,7 +766,7 @@ ST_GeomFromText('POLYGON((10 30, 30 40, 40 50, 40 30, 30 20, 10 30))')); SELECT a, ST_AsText(p), ST_AsText(l), ST_AsText(g) FROM t1; ---replace_column 9 # +--replace_column 10 # EXPLAIN UPDATE t1 SET p = ST_GeomFromText('POINT(30 30)') WHERE p = ST_GeomFromText('POINT(20 20)'); UPDATE t1 SET p = ST_GeomFromText('POINT(30 30)') WHERE p = ST_GeomFromText('POINT(20 20)'); @@ -807,7 +807,7 @@ SELECT a, ST_AsText(p), ST_AsText(l), ST_AsText(g) FROM t1; ALTER TABLE t1 DROP PRIMARY KEY; ALTER TABLE t1 ADD PRIMARY KEY(p); ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT a, ST_AsText(p) FROM t1 WHERE a = 2 AND p = ST_GeomFromText('POINT(30 30)'); SELECT a, ST_AsText(p) FROM t1 WHERE a = 2 AND p = ST_GeomFromText('POINT(30 30)'); diff --git a/mysql-test/suite/innodb_gis/t/rt_precise.test b/mysql-test/suite/innodb_gis/t/rt_precise.test index 2f155814eb6..8049ff02ff1 100644 --- a/mysql-test/suite/innodb_gis/t/rt_precise.test +++ b/mysql-test/suite/innodb_gis/t/rt_precise.test @@ -37,7 +37,7 @@ SELECT count(*) FROM t1; ANALYZE TABLE t1; ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT fid, ST_AsText(g) FROM t1 WHERE ST_Within(g, ST_GeomFromText('Polygon((140 140,160 140,160 160,140 140))')); SELECT fid, ST_AsText(g) FROM t1 WHERE ST_Within(g, ST_GeomFromText('Polygon((140 140,160 140,160 160,140 160,140 140))')) ORDER BY fid; diff --git a/mysql-test/suite/innodb_gis/t/types.test b/mysql-test/suite/innodb_gis/t/types.test index 1303e4c487b..0db836b94ba 100644 --- a/mysql-test/suite/innodb_gis/t/types.test +++ b/mysql-test/suite/innodb_gis/t/types.test @@ -48,7 +48,7 @@ SELECT ST_AsText(g) FROM t_wl6455; CREATE INDEX i_p ON t_wl6455 (g(10)); # Select on prefix index. ---replace_column 9 # +--replace_column 10 # EXPLAIN SELECT ST_AsText(g) FROM t_wl6455 WHERE g = POINT(2,2); SELECT ST_AsText(g) FROM t_wl6455 WHERE g = POINT(2,2); diff --git a/mysql-test/suite/innodb_zip/r/index_large_prefix.result b/mysql-test/suite/innodb_zip/r/index_large_prefix.result index 986453851eb..26dbbdc4718 100644 --- a/mysql-test/suite/innodb_zip/r/index_large_prefix.result +++ b/mysql-test/suite/innodb_zip/r/index_large_prefix.result @@ -47,8 +47,8 @@ select @@session.tx_isolation; @@session.tx_isolation REPEATABLE-READ explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE worklog5743 ref idx idx 5 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; a1 a2 = repeat("a", 10000) 9 1 @@ -73,8 +73,8 @@ select @@session.tx_isolation; @@session.tx_isolation REPEATABLE-READ explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE worklog5743 ref idx idx 5 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; a1 a2 = repeat("a", 10000) 9 1 @@ -263,20 +263,20 @@ select @@session.tx_isolation; @@session.tx_isolation REPEATABLE-READ explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE worklog5743_1 ref idx6 idx6 5 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE worklog5743_1 NULL ref idx6 idx6 5 const 1 explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE worklog5743_2 ref idx6 idx6 5 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE worklog5743_2 NULL ref idx6 idx6 5 const 1 explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE worklog5743_4 ref idx6 idx6 5 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE worklog5743_4 NULL ref idx6 idx6 5 const 1 explain select a1, left(a2, 20) from worklog5743_8 where a1 = 9; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE worklog5743_8 ref idx5,idx7 idx5 5 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE worklog5743_8 NULL ref idx5,idx7 idx5 5 const 1 explain select a1, left(a2, 20) from worklog5743_16 where a1 = 9; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE worklog5743_16 ref idx5,idx7 idx5 5 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE worklog5743_16 NULL ref idx5,idx7 idx5 5 const 1 select a1, left(a2, 20) from worklog5743_1 where a1 = 9; a1 left(a2, 20) 9 aaaaaaaaaaaaaaaaaaaa @@ -372,8 +372,8 @@ select @@session.tx_isolation; @@session.tx_isolation REPEATABLE-READ explain select a1 from worklog5743 where a1 = 9; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE worklog5743 ref idx6 idx6 5 const 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE worklog5743 NULL ref idx6 idx6 5 const 1 Using index select a1 from worklog5743 where a1 = 9; a1 9 diff --git a/mysql-test/suite/json/r/json_no_table.result b/mysql-test/suite/json/r/json_no_table.result index 6784fe6da32..bcbc38ac616 100644 --- a/mysql-test/suite/json/r/json_no_table.result +++ b/mysql-test/suite/json/r/json_no_table.result @@ -3175,8 +3175,8 @@ Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' # Crash in Item_copy_json::~Item_copy_json # ---------------------------------------------------------------------- EXPLAIN SELECT COUNT(*), JSON_KEYS('{}'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used select json_search( '{ "a": "foo" }', 'one', 'foo', 'a' ); json_search( '{ "a": "foo" }', 'one', 'foo', 'a' ) "$.a" diff --git a/mysql-test/suite/json/r/json_table.result b/mysql-test/suite/json/r/json_table.result index 30c2c8bde50..580098f3b1b 100644 --- a/mysql-test/suite/json/r/json_table.result +++ b/mysql-test/suite/json/r/json_table.result @@ -226,8 +226,8 @@ EXPLAIN } explain select * from json_table('[{"a": 1, "b": [11,111]}, {"a": 2, "b": [22,222]}]', '$[*]' COLUMNS( a INT PATH '$.a')) as tt; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tt ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tt NULL ALL NULL NULL NULL NULL 40 Table function: json_table create view v1 as select * from json_table('[{"color": "blue", "price": 50}]', '$[*]' columns(color text path '$.nonexistent', @@ -380,10 +380,10 @@ insert into t2 select '[1,2,3]',A.a from t1 A, t1 B; explain select * from t1, (select * from t2, json_table(t2.js, '$[*]' columns (o for ordinality)) as jt) as TT2 where 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 -1 SIMPLE t2 ALL NULL NULL NULL NULL 100 Using join buffer (flat, BNL join) -1 SIMPLE jt ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 100 Using join buffer (flat, BNL join) +1 SIMPLE jt NULL ALL NULL NULL NULL NULL 40 Table function: json_table drop table t1, t2; CREATE TABLE t1 (x INT); INSERT INTO t1 VALUES (1); @@ -403,10 +403,10 @@ insert into t21 values (1, '{"a":100}'); explain select t20.a, jt1.ab from t20 left join t21 on t20.a=t21.a join JSON_TABLE(t21.js,'$' COLUMNS (ab INT PATH '$.a')) AS jt1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t20 ALL NULL NULL NULL NULL 2 -1 SIMPLE t21 eq_ref PRIMARY PRIMARY 4 test.t20.a 1 -1 SIMPLE jt1 ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t20 NULL ALL NULL NULL NULL NULL 2 +1 SIMPLE t21 NULL eq_ref PRIMARY PRIMARY 4 test.t20.a 1 +1 SIMPLE jt1 NULL ALL NULL NULL NULL NULL 40 Table function: json_table drop table t20, t21; select * from json_table( @@ -475,12 +475,12 @@ t20 left join t21 on t20.a=t21.a join (t31 left join (t32 join JSON_TABLE(t21.js,'$' COLUMNS (ab INT PATH '$.a')) AS jt1) on t31.a<3); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t31 system NULL NULL NULL NULL 1 -1 SIMPLE t20 ALL NULL NULL NULL NULL 100 -1 SIMPLE t21 eq_ref PRIMARY PRIMARY 4 test.t20.a 1 -1 SIMPLE t32 ALL NULL NULL NULL NULL 1 Using where -1 SIMPLE jt1 ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t31 NULL system NULL NULL NULL NULL 1 +1 SIMPLE t20 NULL ALL NULL NULL NULL NULL 100 +1 SIMPLE t21 NULL eq_ref PRIMARY PRIMARY 4 test.t20.a 1 +1 SIMPLE t32 NULL ALL NULL NULL NULL NULL 1 Using where +1 SIMPLE jt1 NULL ALL NULL NULL NULL NULL 40 Table function: json_table drop table t20,t21,t31,t32; # # MDEV-25142: JSON_TABLE: CREATE VIEW involving EXISTS PATH ends up with invalid frm @@ -636,8 +636,8 @@ t1 left join json_table(concat('',js), '$' columns ( color varchar(32) path '$.color') ) as JT on 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables explain select * from @@ -653,9 +653,9 @@ t1 left join json_table((select concat(a,js) from t2), '$' columns ( color varchar(32) path '$.color') ) as JT on 1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -2 SUBQUERY t2 system NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 SUBQUERY t2 NULL system NULL NULL NULL NULL 1 explain select * from @@ -789,9 +789,9 @@ WHERE EXISTS(SELECT * FROM JSON_TABLE(b, '$' COLUMNS(o FOR ORDINALITY)) AS jt WHERE jt.o = t1.a); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 -1 PRIMARY jt ALL NULL NULL NULL NULL 40 Table function: json_table; Using where; FirstMatch(t1) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 2 +1 PRIMARY jt NULL ALL NULL NULL NULL NULL 40 Table function: json_table; Using where; FirstMatch(t1) drop table t1; # # MDEV-25381: JSON_TABLE: ER_WRONG_OUTER_JOIN upon query with LEFT and RIGHT joins and view diff --git a/mysql-test/suite/json/r/json_table_mysql.result b/mysql-test/suite/json/r/json_table_mysql.result index ca9ef4793a5..7ab5f3a0ee9 100644 --- a/mysql-test/suite/json/r/json_table_mysql.result +++ b/mysql-test/suite/json/r/json_table_mysql.result @@ -375,8 +375,8 @@ WHERE a=1; i a EXPLAIN SELECT * FROM jt, JSON_TABLE(jt.i, '$' COLUMNS (a INT PATH '$')) AS tt WHERE a=1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables SELECT * FROM ( SELECT * FROM jt, JSON_TABLE(jt.i, '$' COLUMNS (a INT PATH '$')) AS tt WHERE a=1) AS ttt; @@ -384,8 +384,8 @@ i a EXPLAIN SELECT * FROM ( SELECT * FROM jt, JSON_TABLE(jt.i, '$' COLUMNS (a INT PATH '$')) AS tt WHERE a=1) AS ttt; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables DROP TABLE jt; CREATE VIEW v AS SELECT * FROM JSON_TABLE('[1,2,3]', @@ -480,9 +480,9 @@ EXPLAIN SELECT /*+ JOIN_ORDER(jt, t1) */ id, jt.* FROM t1, JSON_TABLE(jd, '$[*]' COLUMNS (jid FOR ORDINALITY, val INT PATH '$')) AS jt; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 2 -1 SIMPLE jt ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 2 +1 SIMPLE jt NULL ALL NULL NULL NULL NULL 40 Table function: json_table SELECT /*+ JOIN_ORDER(t2,jt) */ t1.id, t2.id, jt.* FROM t1, JSON_TABLE(t1.jd, '$[*]' COLUMNS (jid FOR ORDINALITY, @@ -506,19 +506,19 @@ FROM t1, JSON_TABLE(t1.jd, '$[*]' COLUMNS (jid FOR ORDINALITY, val INT PATH '$')) AS jt, t1 AS t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 2 -1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join) -1 SIMPLE jt ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 2 +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join) +1 SIMPLE jt NULL ALL NULL NULL NULL NULL 40 Table function: json_table EXPLAIN SELECT /*+ JOIN_ORDER(t2,jt) */ t1.id, t2.id, jt.* FROM t1, JSON_TABLE(t1.jd, '$[*]' COLUMNS (jid FOR ORDINALITY, val INT PATH '$')) AS jt, t1 AS t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 2 -1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join) -1 SIMPLE jt ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 2 +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join) +1 SIMPLE jt NULL ALL NULL NULL NULL NULL 40 Table function: json_table SELECT * FROM t1 WHERE id IN (SELECT * FROM JSON_TABLE('[1,2]', '$[*]' COLUMNS (id INT PATH '$')) AS jt); @@ -528,10 +528,10 @@ id jd EXPLAIN SELECT * FROM t1 WHERE id IN (SELECT * FROM JSON_TABLE('[1,2]', '$[*]' COLUMNS (id INT PATH '$')) AS jt); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 -1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 -2 MATERIALIZED jt ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 2 +1 PRIMARY <subquery2> NULL eq_ref distinct_key distinct_key 4 func 1 +2 MATERIALIZED jt NULL ALL NULL NULL NULL NULL 40 Table function: json_table DROP TABLE t1; SELECT * FROM JSON_TABLE('"asdf"', '$' COLUMNS( tm TIME PATH '$', @@ -673,8 +673,8 @@ SELECT * FROM t1 LEFT JOIN JSON_TABLE(t1.jc, '$' COLUMNS id jc id EXPLAIN SELECT * FROM t1 LEFT JOIN JSON_TABLE(t1.jc, '$' COLUMNS (id FOR ORDINALITY)) as jt ON t1.jc=jt.id; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables SELECT * FROM t1 t1o RIGHT JOIN t1 ON t1o.id=t1.id LEFT JOIN JSON_TABLE(t1.jc, '$' COLUMNS (id FOR ORDINALITY)) as jt ON t1.jc=jt.id; @@ -682,8 +682,8 @@ id jc id jc id EXPLAIN SELECT * FROM t1 t1o RIGHT JOIN t1 ON t1o.id=t1.id LEFT JOIN JSON_TABLE(t1.jc, '$' COLUMNS (id FOR ORDINALITY)) as jt ON t1.jc=jt.id; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables SELECT * FROM t1 AS t1o RIGHT JOIN (t1 AS t1i JOIN JSON_TABLE(t1o.jc, '$' COLUMNS (id FOR ORDINALITY)) as jt ON t1i.jc=jt.id) @@ -729,9 +729,9 @@ id jc id 3 3 3 EXPLAIN SELECT * FROM t1 LEFT JOIN JSON_TABLE(t1.jc, '$' COLUMNS (id INT PATH '$')) as jt ON t1.id=jt.id; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 -1 SIMPLE jt ALL NULL NULL NULL NULL 40 Table function: json_table; Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 +1 SIMPLE jt NULL ALL NULL NULL NULL NULL 40 Table function: json_table; Using where SELECT * FROM t1 LEFT JOIN JSON_TABLE(t1.jc, '$' COLUMNS (id FOR ORDINALITY)) as jt ON t1.jc=jt.id @@ -1006,29 +1006,29 @@ SELECT alias.* FROM JSON_TABLE('"asd123"', '$' COLUMNS (blb BLOB PATH '$')) as a blb asd123 EXPLAIN SELECT alias.* FROM JSON_TABLE('"asd123"', '$' COLUMNS (blb BLOB PATH '$')) as alias; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE alias ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE alias NULL ALL NULL NULL NULL NULL 40 Table function: json_table EXPLAIN SELECT alias.* FROM JSON_TABLE('"asd123"', '$' COLUMNS (blb TINYBLOB PATH '$')) as alias; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE alias ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE alias NULL ALL NULL NULL NULL NULL 40 Table function: json_table EXPLAIN SELECT alias.* FROM JSON_TABLE('"asd123"', '$' COLUMNS (blb MEDIUMBLOB PATH '$')) as alias; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE alias ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE alias NULL ALL NULL NULL NULL NULL 40 Table function: json_table EXPLAIN SELECT alias.* FROM JSON_TABLE('"asd123"', '$' COLUMNS (blb LONGBLOB PATH '$')) as alias; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE alias ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE alias NULL ALL NULL NULL NULL NULL 40 Table function: json_table EXPLAIN SELECT alias.* FROM JSON_TABLE('"asd123"', '$' COLUMNS (blb TEXT PATH '$')) as alias; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE alias ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE alias NULL ALL NULL NULL NULL NULL 40 Table function: json_table EXPLAIN SELECT alias.* FROM JSON_TABLE('"asd123"', '$' COLUMNS (blb TINYTEXT PATH '$')) as alias; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE alias ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE alias NULL ALL NULL NULL NULL NULL 40 Table function: json_table EXPLAIN SELECT alias.* FROM JSON_TABLE('"asd123"', '$' COLUMNS (blb MEDIUMTEXT PATH '$')) as alias; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE alias ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE alias NULL ALL NULL NULL NULL NULL 40 Table function: json_table EXPLAIN SELECT alias.* FROM JSON_TABLE('"asd123"', '$' COLUMNS (blb LONGTEXT PATH '$')) as alias; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE alias ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE alias NULL ALL NULL NULL NULL NULL 40 Table function: json_table SELECT * FROM (SELECT CAST(blb AS JSON) jf FROM JSON_TABLE('"asd123"', '$' COLUMNS (blb BLOB PATH '$')) AS jti) AS dt, @@ -1050,16 +1050,16 @@ DROP TABLE t; # Bug#26583283: ASSERTION `!THD->IS_ERROR()' FAILED IN SQL_RESOLVER.CC # EXPLAIN SELECT * FROM JSON_TABLE('null', '$' COLUMNS(AA DECIMAL PATH '$')) tt; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE tt ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE tt NULL ALL NULL NULL NULL NULL 40 Table function: json_table CREATE VIEW v1 AS SELECT * FROM JSON_TABLE( 'null', '$' COLUMNS (c1 DECIMAL PATH '$' ) ) AS jt; SELECT * FROM v1; c1 NULL EXPLAIN SELECT * FROM v1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE jt ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE jt NULL ALL NULL NULL NULL NULL 40 Table function: json_table DROP VIEW v1; # # Bug#25822408: ASSERTION `!COL->CHILD_JDS->PRODUCING_RECORDS' FAILED @@ -1115,9 +1115,9 @@ EXPLAIN SELECT * FROM t1 WHERE col_varchar_key NOT IN ( SELECT col_varchar_key FROM JSON_TABLE( '[{"col_key": 1},{"col_key": 2}]', "$[*]" COLUMNS (col_varchar_key VARCHAR(10) PATH "$.col_key")) AS innr1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where -2 DEPENDENT SUBQUERY innr1 ALL NULL NULL NULL NULL 40 Table function: json_table; Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 2 Using where +2 DEPENDENT SUBQUERY innr1 NULL ALL NULL NULL NULL NULL 40 Table function: json_table; Using where SELECT * FROM t1 WHERE col_varchar_key IN ( SELECT col_varchar_key FROM JSON_TABLE( '[{"col_key": 1},{"col_key": 2}]', "$[*]" COLUMNS @@ -1128,9 +1128,9 @@ EXPLAIN SELECT * FROM t1 WHERE col_varchar_key IN ( SELECT col_varchar_key FROM JSON_TABLE( '[{"col_key": 1},{"col_key": 2}]', "$[*]" COLUMNS (col_varchar_key VARCHAR(10) PATH "$.col_key")) AS innr1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 -1 PRIMARY innr1 ALL NULL NULL NULL NULL 40 Table function: json_table; Using where; FirstMatch(t1); Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 2 +1 PRIMARY innr1 NULL ALL NULL NULL NULL NULL 40 Table function: json_table; Using where; FirstMatch(t1); Using join buffer (flat, BNL join) DROP TABLE t1; # # Bug#26711551: WL8867:CONDITIONAL JUMP IN JSON_TABLE_COLUMN::CLEANUP @@ -1202,10 +1202,10 @@ id f1 id f1 EXPLAIN SELECT * FROM t1 as jj1, (SELECT tt2.* FROM t1 as tt2, JSON_TABLE(f1, "$" COLUMNS (id FOR ORDINALITY)) AS tbl) dt; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE jj1 ALL NULL NULL NULL NULL 6 -1 SIMPLE tt2 ALL NULL NULL NULL NULL 6 Using join buffer (flat, BNL join) -1 SIMPLE tbl ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE jj1 NULL ALL NULL NULL NULL NULL 6 +1 SIMPLE tt2 NULL ALL NULL NULL NULL NULL 6 Using join buffer (flat, BNL join) +1 SIMPLE tbl NULL ALL NULL NULL NULL NULL 40 Table function: json_table SELECT * FROM t1 as jj1, (SELECT tt2.* FROM t1 as tt2, JSON_TABLE(f1, "$" COLUMNS (id FOR ORDINALITY)) AS tbl STRAIGHT_JOIN @@ -1225,11 +1225,11 @@ EXPLAIN SELECT * FROM t1 as jj1, (SELECT tt2.* FROM t1 as tt2, JSON_TABLE(f1, "$" COLUMNS (id FOR ORDINALITY)) AS tbl STRAIGHT_JOIN t1 AS tt3) dt ORDER BY 1,3 LIMIT 11; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE jj1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort -1 SIMPLE tt2 ALL NULL NULL NULL NULL 6 Using join buffer (flat, BNL join) -1 SIMPLE tbl ALL NULL NULL NULL NULL 40 Table function: json_table -1 SIMPLE tt3 ALL NULL NULL NULL NULL 6 Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE jj1 NULL ALL NULL NULL NULL NULL 6 Using temporary; Using filesort +1 SIMPLE tt2 NULL ALL NULL NULL NULL NULL 6 Using join buffer (flat, BNL join) +1 SIMPLE tbl NULL ALL NULL NULL NULL NULL 40 Table function: json_table +1 SIMPLE tt3 NULL ALL NULL NULL NULL NULL 6 Using join buffer (flat, BNL join) SELECT * FROM t1 WHERE id IN (SELECT id FROM t1 as tt2, JSON_TABLE(f1, "$" COLUMNS (jf FOR ORDINALITY)) AS tbl); @@ -1243,11 +1243,11 @@ id f1 EXPLAIN SELECT * FROM t1 WHERE id IN (SELECT id FROM t1 as tt2, JSON_TABLE(f1, "$" COLUMNS (jf FOR ORDINALITY)) AS tbl); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 6 -1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 -2 MATERIALIZED tt2 ALL NULL NULL NULL NULL 6 -2 MATERIALIZED tbl ALL NULL NULL NULL NULL 40 Table function: json_table +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 6 +1 PRIMARY <subquery2> NULL eq_ref distinct_key distinct_key 4 func 1 +2 MATERIALIZED tt2 NULL ALL NULL NULL NULL NULL 6 +2 MATERIALIZED tbl NULL ALL NULL NULL NULL NULL 40 Table function: json_table DROP TABLE t1; # # Bug#26760811: WL#8867: MEMORY LEAK REPORTED BY ASAN AND VALGRIND diff --git a/mysql-test/suite/maria/collations.result b/mysql-test/suite/maria/collations.result index 86f7117c378..0950747cac8 100644 --- a/mysql-test/suite/maria/collations.result +++ b/mysql-test/suite/maria/collations.result @@ -4,8 +4,8 @@ Note 1051 Unknown table 'test.t1' CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_croatian_ci, KEY(a)) ENGINE=ARIA; INSERT INTO t1 VALUES ('na'),('nj'),('nz'),('Z'); explain SELECT a FROM t1 ORDER BY a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL a 33 NULL 4 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL a 33 NULL 4 Using index SELECT a FROM t1 ORDER BY a; a na @@ -14,8 +14,8 @@ nj Z ALTER TABLE t1 engine=myisam; explain SELECT a FROM t1 ORDER BY a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL a 33 NULL 4 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL a 33 NULL 4 Using index SELECT a FROM t1 ORDER BY a; a na diff --git a/mysql-test/suite/maria/create.result b/mysql-test/suite/maria/create.result index 801812b647f..0743819a504 100644 --- a/mysql-test/suite/maria/create.result +++ b/mysql-test/suite/maria/create.result @@ -41,9 +41,9 @@ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=Aria ROW_FORMAT=COMPRESSED; INSERT INTO t1 VALUES(1); CREATE TEMPORARY TABLE t2(b INT); EXPLAIN SELECT * FROM t1 WHERE a IN (SELECT MAX(a) FROM t2); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 1 Using index -2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL system NULL NULL NULL NULL 1 Using index +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away DROP TABLE t1,t2; SET SQL_MODE=''; CREATE TABLE t1 (c INT PRIMARY KEY) ENGINE=Aria; diff --git a/mysql-test/suite/maria/icp.result b/mysql-test/suite/maria/icp.result index 43ec6439144..d9001981760 100644 --- a/mysql-test/suite/maria/icp.result +++ b/mysql-test/suite/maria/icp.result @@ -166,8 +166,8 @@ FROM t1 WHERE ts BETWEEN '0000-00-00' AND '2010-00-01 00:00:00' ORDER BY ts DESC LIMIT 2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range PRIMARY PRIMARY 4 NULL 4 Using where DROP TABLE t1; # @@ -203,8 +203,8 @@ KEY (c1(6),i1) INSERT INTO t3 SELECT CONCAT('c-',1000+t2.a,'=w'), 1 FROM t2; EXPLAIN SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c1 c1 8 NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c1 c1 8 NULL 3 Using where SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w'; c1 c-1004=w @@ -212,14 +212,14 @@ c-1005=w c-1006=w EXPLAIN SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c1 c1 12 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c1 c1 12 NULL 2 Using where SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2; c1 EXPLAIN SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' or i1 > 2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL c1 NULL NULL NULL 100 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL ALL c1 NULL NULL NULL 100 Using where SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' or i1 > 2; c1 c-1004=w @@ -408,8 +408,8 @@ FROM t1 WHERE (pk BETWEEN 4 AND 5 OR pk < 2) AND c1 < 240 ORDER BY c1 LIMIT 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range PRIMARY,k1 PRIMARY 4 NULL 3 Using index condition; Using where; Rowid-ordered scan; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range PRIMARY,k1 PRIMARY 4 NULL 3 Using index condition; Using where; Rowid-ordered scan; Using filesort DROP TABLE t1; # # @@ -429,10 +429,10 @@ set optimizer_switch='semijoin=off'; EXPLAIN SELECT * FROM t1 WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL # Using where -2 DEPENDENT SUBQUERY it eq_ref PRIMARY PRIMARY 4 func # Using index condition -2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL # Using index; Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL # Using where +2 DEPENDENT SUBQUERY it NULL eq_ref PRIMARY PRIMARY 4 func # Using index condition +2 DEPENDENT SUBQUERY t2 NULL index NULL PRIMARY 4 NULL # Using index; Using join buffer (flat, BNL join) SELECT * FROM t1 WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10); pk i @@ -451,8 +451,8 @@ PRIMARY KEY (pk) ); INSERT INTO t1 VALUES (1,9),(2,7),(3,6),(4,3),(5,1); EXPLAIN SELECT pk, c1 FROM t1 WHERE (pk<3 or pk>3); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 5 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL PRIMARY NULL NULL NULL 5 Using where SET SESSION optimizer_switch='index_condition_pushdown=off'; SELECT pk, c1 FROM t1 WHERE (pk<3 or pk>3); pk c1 @@ -506,9 +506,9 @@ EXPLAIN SELECT c2 FROM t1 JOIN t2 ON t1.c1 = t2.c1 WHERE (t2.pk <= 4 AND t1.pk IN (2,1)) OR (t1.pk > 1 AND t2.pk BETWEEN 6 AND 6); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Rowid-ordered scan -1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range PRIMARY PRIMARY 4 NULL 2 Using index condition; Rowid-ordered scan +1 SIMPLE t2 NULL range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using where; Rowid-ordered scan; Using join buffer (flat, BNL join) SELECT c2 FROM t1 JOIN t2 ON t1.c1 = t2.c1 WHERE (t2.pk <= 4 AND t1.pk IN (2,1)) OR (t1.pk > 1 AND t2.pk BETWEEN 6 AND 6); @@ -599,9 +599,9 @@ test.t2 analyze status OK EXPLAIN SELECT t1.d1, t2.pk, t2.i1 FROM t1 STRAIGHT_JOIN t2 ON t2.i1 WHERE t2.pk <> t1.d1 AND t2.pk = 4; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL k1 9 NULL 3 Using index -1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL k1 9 NULL 3 Using index +1 SIMPLE t2 NULL const PRIMARY PRIMARY 4 const 1 Using where SELECT t1.d1, t2.pk, t2.i1 FROM t1 STRAIGHT_JOIN t2 ON t2.i1 WHERE t2.pk <> t1.d1 AND t2.pk = 4; d1 pk i1 @@ -609,9 +609,9 @@ d1 pk i1 EXPLAIN SELECT t1.d1, t2.pk, t2.i1 FROM t1 STRAIGHT_JOIN t2 ON t2.i1 WHERE t1.d1 <> t2.pk AND t2.pk = 4; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL k1 9 NULL 3 Using index -1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL k1 9 NULL 3 Using index +1 SIMPLE t2 NULL const PRIMARY PRIMARY 4 const 1 Using where SELECT t1.d1, t2.pk, t2.i1 FROM t1 STRAIGHT_JOIN t2 ON t2.i1 WHERE t1.d1 <> t2.pk AND t2.pk = 4; d1 pk i1 @@ -652,8 +652,8 @@ EXPLAIN SELECT * FROM t1 WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania' ORDER BY a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range b b 13 NULL # Using where; Rowid-ordered scan; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range b b 13 NULL # Using where; Rowid-ordered scan; Using filesort SELECT * FROM t1 WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania' ORDER BY a; @@ -664,8 +664,8 @@ EXPLAIN SELECT * FROM t1 WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania' ORDER BY a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range b b 13 NULL # Using index condition; Rowid-ordered scan; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range b b 13 NULL # Using index condition; Rowid-ordered scan; Using filesort SELECT * FROM t1 WHERE NOT(b = 'Texas') AND b BETWEEN 'wy' AND 'y' OR b = 'Pennsylvania' ORDER BY a; @@ -686,9 +686,9 @@ SET SESSION optimizer_switch='index_condition_pushdown=off'; EXPLAIN SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0) HAVING t1.c != 5 ORDER BY t1.c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL # Using where; Using filesort -1 SIMPLE t2 ref a a 515 test.t1.a # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL PRIMARY NULL NULL NULL # Using where; Using filesort +1 SIMPLE t2 NULL ref a a 515 test.t1.a # Using where SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0) HAVING t1.c != 5 ORDER BY t1.c; b c @@ -697,9 +697,9 @@ SET SESSION optimizer_switch='index_condition_pushdown=on'; EXPLAIN SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0) HAVING t1.c != 5 ORDER BY t1.c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL # Using where; Using filesort -1 SIMPLE t2 ref a a 515 test.t1.a # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL PRIMARY NULL NULL NULL # Using where; Using filesort +1 SIMPLE t2 NULL ref a a 515 test.t1.a # Using where SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND (t1.b<0 OR t1.b>0) HAVING t1.c != 5 ORDER BY t1.c; b c @@ -816,11 +816,11 @@ SELECT COUNT(*) FROM t1 AS t, t2 WHERE c = g AND (EXISTS (SELECT * FROM t1, t2 WHERE a = f AND h <= t.e AND a > t.b) OR a = 0 AND h < 'z' ); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t ALL PRIMARY,c NULL NULL NULL 64 Using where -1 PRIMARY t2 ref g g 5 test.t.c 18 Using where -2 DEPENDENT SUBQUERY t1 index PRIMARY PRIMARY 4 NULL 64 Using where; Using index -2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t NULL ALL PRIMARY,c NULL NULL NULL 64 Using where +1 PRIMARY t2 NULL ref g g 5 test.t.c 18 Using where +2 DEPENDENT SUBQUERY t1 NULL index PRIMARY PRIMARY 4 NULL 64 Using where; Using index +2 DEPENDENT SUBQUERY t2 NULL eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where SELECT COUNT(*) FROM t1 AS t, t2 WHERE c = g AND (EXISTS (SELECT * FROM t1, t2 WHERE a = f AND h <= t.e AND a > t.b) @@ -894,8 +894,8 @@ aa x a y EXPLAIN SELECT * FROM t1 FORCE INDEX(idx1) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range idx1 idx1 10 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range idx1 idx1 10 NULL 2 Using where SELECT * FROM t1 FORCE INDEX(idx1) WHERE (c1='aa' AND c2='x') OR (c1='a' AND c2='y'); c1 c2 aa x diff --git a/mysql-test/suite/maria/maria-gis-rtree-dynamic.result b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result index dad74e3767f..9caa92fc520 100644 --- a/mysql-test/suite/maria/maria-gis-rtree-dynamic.result +++ b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result @@ -167,8 +167,8 @@ SELECT count(*) FROM t1; count(*) 150 EXPLAIN SELECT fid, AsText(g) FROM t1 WHERE Within(g, GeomFromText('Polygon((140 140,160 140,160 160,140 160,140 140))')); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range g g 34 NULL 11 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range g g 34 NULL 11 Using where SELECT fid, AsText(g) FROM t1 WHERE Within(g, GeomFromText('Polygon((140 140,160 140,160 160,140 160,140 140))')); fid AsText(g) 1 LINESTRING(150 150,150 150) @@ -301,8 +301,8 @@ count(*) 100 EXPLAIN SELECT fid, AsText(g) FROM t2 WHERE Within(g, GeomFromText('Polygon((40 40,60 40,60 60,40 60,40 40))')); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range g g 34 NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL range g g 34 NULL 4 Using where SELECT fid, AsText(g) FROM t2 WHERE Within(g, GeomFromText('Polygon((40 40,60 40,60 60,40 60,40 40))')); fid AsText(g) diff --git a/mysql-test/suite/maria/maria-gis-rtree-trans.result b/mysql-test/suite/maria/maria-gis-rtree-trans.result index e118db697b2..e161b7c60f3 100644 --- a/mysql-test/suite/maria/maria-gis-rtree-trans.result +++ b/mysql-test/suite/maria/maria-gis-rtree-trans.result @@ -167,8 +167,8 @@ SELECT count(*) FROM t1; count(*) 150 EXPLAIN SELECT fid, AsText(g) FROM t1 WHERE Within(g, GeomFromText('Polygon((140 140,160 140,160 160,140 160,140 140))')); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range g g 34 NULL 11 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range g g 34 NULL 11 Using where SELECT fid, AsText(g) FROM t1 WHERE Within(g, GeomFromText('Polygon((140 140,160 140,160 160,140 160,140 140))')); fid AsText(g) 1 LINESTRING(150 150,150 150) @@ -301,8 +301,8 @@ count(*) 100 EXPLAIN SELECT fid, AsText(g) FROM t2 WHERE Within(g, GeomFromText('Polygon((40 40,60 40,60 60,40 60,40 40))')); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range g g 34 NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL range g g 34 NULL 4 Using where SELECT fid, AsText(g) FROM t2 WHERE Within(g, GeomFromText('Polygon((40 40,60 40,60 60,40 60,40 40))')); fid AsText(g) diff --git a/mysql-test/suite/maria/maria-gis-rtree.result b/mysql-test/suite/maria/maria-gis-rtree.result index 9267556bc4b..b6b1ab2bb9c 100644 --- a/mysql-test/suite/maria/maria-gis-rtree.result +++ b/mysql-test/suite/maria/maria-gis-rtree.result @@ -167,8 +167,8 @@ SELECT count(*) FROM t1; count(*) 150 EXPLAIN SELECT fid, AsText(g) FROM t1 WHERE Within(g, GeomFromText('Polygon((140 140,160 140,160 160,140 160,140 140))')); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range g g 34 NULL 11 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range g g 34 NULL 11 Using where SELECT fid, AsText(g) FROM t1 WHERE Within(g, GeomFromText('Polygon((140 140,160 140,160 160,140 160,140 140))')); fid AsText(g) 1 LINESTRING(150 150,150 150) @@ -301,8 +301,8 @@ count(*) 100 EXPLAIN SELECT fid, AsText(g) FROM t2 WHERE Within(g, GeomFromText('Polygon((40 40,60 40,60 60,40 60,40 40))')); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range g g 34 NULL 4 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL range g g 34 NULL 4 Using where SELECT fid, AsText(g) FROM t2 WHERE Within(g, GeomFromText('Polygon((40 40,60 40,60 60,40 60,40 40))')); fid AsText(g) diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result index ad714f26fb6..a2a1fa68571 100644 --- a/mysql-test/suite/maria/maria.result +++ b/mysql-test/suite/maria/maria.result @@ -76,29 +76,29 @@ drop table t1; create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)); insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4); explain select * from t1 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 4 Using filesort explain select * from t1 order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 4 Using filesort explain select * from t1 order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 4 Using filesort explain select a from t1 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL PRIMARY 4 NULL 4 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL PRIMARY 4 NULL 4 Using index explain select b from t1 order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL b 4 NULL 4 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL b 4 NULL 4 Using index explain select a,b from t1 order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 4 Using filesort explain select a,b from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 4 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 4 explain select a,b,c from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 4 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 4 drop table t1; set autocommit=0; begin; @@ -379,37 +379,37 @@ t1 1 a 2 b A 10 NULL NULL YES BTREE NO t1 1 c_2 1 c A 10 NULL NULL YES BTREE NO t1 1 c_2 2 a A 10 NULL NULL BTREE NO explain select * from t1,t2 where t1.a=t2.a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL a NULL NULL NULL 2 -1 SIMPLE t1 ref a a 4 test.t2.a 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ALL a NULL NULL NULL 2 +1 SIMPLE t1 NULL ref a a 4 test.t2.a 1 explain select * from t1,t2 force index(a) where t1.a=t2.a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL a NULL NULL NULL 2 -1 SIMPLE t1 ref a a 4 test.t2.a 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ALL a NULL NULL NULL 2 +1 SIMPLE t1 NULL ref a a 4 test.t2.a 1 explain select * from t1 force index(a),t2 force index(a) where t1.a=t2.a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL a NULL NULL NULL 2 -1 SIMPLE t1 ref a a 4 test.t2.a 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ALL a NULL NULL NULL 2 +1 SIMPLE t1 NULL ref a a 4 test.t2.a 1 explain select * from t1,t2 where t1.b=t2.b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL b NULL NULL NULL 2 Using where -1 SIMPLE t1 ref b b 5 test.t2.b 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ALL b NULL NULL NULL 2 Using where +1 SIMPLE t1 NULL ref b b 5 test.t2.b 1 explain select * from t1,t2 force index(c) where t1.a=t2.a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 2 -1 SIMPLE t1 ref a a 4 test.t2.a 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 2 +1 SIMPLE t1 NULL ref a a 4 test.t2.a 1 explain select * from t1 where a=0 or a=2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 4 NULL 5 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range a a 4 NULL 5 Using index condition explain select * from t1 force index (a) where a=0 or a=2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 4 NULL 5 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range a a 4 NULL 5 Using index condition explain select * from t1 where c=1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref c,c_2 c 5 const 2 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref c,c_2 c 5 const 2 explain select * from t1 use index() where c=1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 Using where drop table t1,t2; create table t1 (a int not null auto_increment primary key, b varchar(255)); insert into t1 (b) values (repeat('a',100)),(repeat('b',100)),(repeat('c',100)); @@ -551,13 +551,13 @@ select sql_big_result distinct t1.a from t1,t2; a 1 explain select sql_big_result distinct t1.a from t1,t2 order by t2.a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 1 Using temporary -1 SIMPLE t2 index NULL PRIMARY 4 NULL 2 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL system NULL NULL NULL NULL 1 Using temporary +1 SIMPLE t2 NULL index NULL PRIMARY 4 NULL 2 Using index explain select distinct t1.a from t1,t2 order by t2.a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 1 Using temporary -1 SIMPLE t2 index NULL PRIMARY 4 NULL 2 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL system NULL NULL NULL NULL 1 Using temporary +1 SIMPLE t2 NULL index NULL PRIMARY 4 NULL 2 Using index drop table t1,t2; create table t1 ( c1 varchar(32), @@ -667,15 +667,15 @@ drop table t1,t2; create table t1 ( a tinytext, b char(1), index idx (a(1),b) ); insert into t1 values (null,''), (null,''); explain select count(*) from t1 where a is null; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref idx idx 4 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref idx idx 4 const 2 Using where insert into t1 values(1,'a'); explain select count(*) from t1 where a is null; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref idx idx 4 const 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref idx idx 4 const 2 Using where explain select count(*) from t1 where a = 'a'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref idx idx 4 const 1 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref idx idx 4 const 1 Using where select count(*) from t1 where a is null; count(*) 2 @@ -1135,23 +1135,23 @@ select count(*) from t1 where v like 'a %'; count(*) 9 explain select count(*) from t1 where v='a '; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 13 const # Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 13 const # Using where; Using index explain select count(*) from t1 where c='a '; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref c c 11 const # Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref c c 11 const # Using where; Using index explain select count(*) from t1 where t='a '; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref t t 13 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref t t 13 const # Using where explain select count(*) from t1 where v like 'a%'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 13 NULL # Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range v v 13 NULL # Using where; Using index explain select count(*) from t1 where v between 'a' and 'a '; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 13 const # Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 13 const # Using where; Using index explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 13 const # Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 13 const # Using where; Using index alter table t1 add unique(v); ERROR 23000: Duplicate entry '{ ' for key 'v_2' show warnings; @@ -1173,8 +1173,8 @@ qq *a *a*a * *a *a*a * explain select * from t1 where v='a'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v,v_2 # 13 const # # +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v,v_2 # 13 const # # select v,count(*) from t1 group by v limit 10; v count(*) a 1 @@ -1337,20 +1337,20 @@ select count(*) from t1 where v like 'a %'; count(*) 9 explain select count(*) from t1 where v='a '; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 303 const # Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 303 const # Using where; Using index explain select count(*) from t1 where v like 'a%'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 303 NULL # Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range v v 303 NULL # Using where; Using index explain select count(*) from t1 where v between 'a' and 'a '; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 303 const # Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 303 const # Using where; Using index explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 303 const # Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 303 const # Using where; Using index explain select * from t1 where v='a'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 303 const # # +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 303 const # # select v,count(*) from t1 group by v limit 10; v count(*) a 1 @@ -1417,20 +1417,20 @@ select count(*) from t1 where v like 'a %'; count(*) 9 explain select count(*) from t1 where v='a '; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 33 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 33 const # Using where explain select count(*) from t1 where v like 'a%'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range v v 33 NULL # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range v v 33 NULL # Using where explain select count(*) from t1 where v between 'a' and 'a '; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 33 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 33 const # Using where explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 33 const # Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 33 const # Using where explain select * from t1 where v='a'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref v v 33 const # # +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref v v 33 const # # select v,count(*) from t1 group by v limit 10; v count(*) a 1 @@ -1586,8 +1586,8 @@ drop table t1; create table t1(a int, b varchar(12), key ba(b, a)); insert into t1 values (1, 'A'), (20, NULL); explain select * from t1 where a=20 and b is null; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref ba ba 20 const,const 1 Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref ba ba 20 const,const 1 Using where; Using index select * from t1 where a=20 and b is null; a b 20 NULL diff --git a/mysql-test/suite/maria/mrr.result b/mysql-test/suite/maria/mrr.result index a8d444d4bd4..b1b75c8124a 100644 --- a/mysql-test/suite/maria/mrr.result +++ b/mysql-test/suite/maria/mrr.result @@ -186,8 +186,8 @@ select 'zz-1',NULL,'cc-2', 'filler-data' from t2 order by a limit 500; explain select * from t4 where a IS NULL and b IS NULL and (c IS NULL or c='no-such-row1' or c='no-such-row2'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 range idx1 idx1 29 NULL 16 Using index condition; Rowid-ordered scan +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t4 NULL range idx1 idx1 29 NULL 16 Using index condition; Rowid-ordered scan select * from t4 where a IS NULL and b IS NULL and (c IS NULL or c='no-such-row1' or c='no-such-row2'); a b c filler @@ -208,8 +208,8 @@ NULL NULL NULL NULL-2 NULL NULL NULL NULL-1 explain select * from t4 where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 range idx1 idx1 29 NULL 32 Using index condition; Rowid-ordered scan +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t4 NULL range idx1 idx1 29 NULL 32 Using index condition; Rowid-ordered scan select * from t4 where (a ='b-1' or a='bb-1') and b IS NULL and (c='c-1' or c='cc-2'); a b c filler b-1 NULL c-1 NULL-15 @@ -363,10 +363,10 @@ COUNT(t1.v) EXPLAIN SELECT COUNT(t1.v) FROM t1, t2 IGNORE INDEX (idx), t3 IGNORE INDEX (idx) WHERE t3.v = t2.v AND t3.i < t2.i AND t3.pk > 0 AND t2.pk > 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL idx 7 NULL 15 Using index -1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 16 Using where; Using join buffer (flat, BNL join) -1 SIMPLE t3 ALL PRIMARY NULL NULL NULL 25 Using where; Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL idx 7 NULL 15 Using index +1 SIMPLE t2 NULL ALL PRIMARY NULL NULL NULL 16 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t3 NULL ALL PRIMARY NULL NULL NULL 25 Using where; Using join buffer (flat, BNL join) SELECT COUNT(t1.v) FROM t1, t2, t3 WHERE t3.v = t2.v AND t3.i < t2.i AND t3.pk > 0 AND t2.pk > 0; COUNT(t1.v) @@ -374,10 +374,10 @@ COUNT(t1.v) EXPLAIN SELECT COUNT(t1.v) FROM t1, t2, t3 WHERE t3.v = t2.v AND t3.i < t2.i AND t3.pk > 0 AND t2.pk > 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL idx 7 NULL 15 Using index -1 SIMPLE t2 ALL PRIMARY,idx NULL NULL NULL 16 Using where; Using join buffer (flat, BNL join) -1 SIMPLE t3 ref PRIMARY,idx idx 3 test.t2.v 2 Using index condition; Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL idx 7 NULL 15 Using index +1 SIMPLE t2 NULL ALL PRIMARY,idx NULL NULL NULL 16 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t3 NULL ref PRIMARY,idx idx 3 test.t2.v 2 Using index condition; Using where set join_cache_level=@save_join_cache_level; DROP TABLE t1,t2,t3; # @@ -403,9 +403,9 @@ EXPLAIN SELECT count(*) FROM t1 AS table1, t2 AS table2 WHERE table1.col_varchar_1024_latin1_key = table2.col_varchar_10_latin1 AND table1.pk<>0 ; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE table2 ALL NULL NULL NULL NULL 2 Using where -1 SIMPLE table1 ref PRIMARY,col_varchar_1024_latin1_key col_varchar_1024_latin1_key 1027 test.table2.col_varchar_10_latin1 2 Using index condition(BKA); Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE table2 NULL ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE table1 NULL ref PRIMARY,col_varchar_1024_latin1_key col_varchar_1024_latin1_key 1027 test.table2.col_varchar_10_latin1 2 Using index condition(BKA); Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan SELECT count(*) FROM t1 AS table1, t2 AS table2 WHERE diff --git a/mysql-test/suite/maria/ps_maria.result b/mysql-test/suite/maria/ps_maria.result index 6f5d557569b..3109d18fe1a 100644 --- a/mysql-test/suite/maria/ps_maria.result +++ b/mysql-test/suite/maria/ps_maria.result @@ -1156,6 +1156,7 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is def id 8 3 1 Y 32928 0 63 def select_type 253 19 6 N 1 39 8 def table 253 64 2 Y 0 39 8 +def partitions 250 6316032 0 Y 0 39 8 def type 253 10 3 Y 0 39 8 def possible_keys 253 4_OR_8_K 0 Y 0 39 8 def key 253 64 0 Y 0 39 8 @@ -1163,8 +1164,8 @@ def key_len 253 4_OR_8_K 0 Y 0 39 8 def ref 253 2048 0 Y 0 39 8 def rows 253 64 1 Y 0 39 8 def Extra 253 255 0 N 1 39 8 -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t9 ALL NULL NULL NULL NULL 2 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t9 NULL ALL NULL NULL NULL NULL 2 drop table if exists t2 ; create table t2 (s varchar(25), fulltext(s)) TRANSACTIONAL= 0 ENGINE = 'ARIA' ; diff --git a/mysql-test/suite/parts/r/optimizer.result b/mysql-test/suite/parts/r/optimizer.result index 42d85dbbd39..64a581e7fff 100644 --- a/mysql-test/suite/parts/r/optimizer.result +++ b/mysql-test/suite/parts/r/optimizer.result @@ -21,11 +21,11 @@ INSERT INTO t1 SELECT a + 40, b + 40 FROM t1; INSERT INTO t2 SELECT * FROM t1; # plans should be identical EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10,100) GROUP BY a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 5 NULL 2 Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0 range a a 5 NULL 2 Using where; Using index EXPLAIN SELECT a, MAX(b) FROM t2 WHERE a IN (10,100) GROUP BY a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range a a 5 NULL 2 Using where; Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL range a a 5 NULL 2 Using where; Using index FLUSH status; SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100) GROUP BY a; a MAX(b) diff --git a/mysql-test/suite/perfschema/r/batch_table_io_func.result b/mysql-test/suite/perfschema/r/batch_table_io_func.result index 212c08c7e90..deb48cb5235 100644 --- a/mysql-test/suite/perfschema/r/batch_table_io_func.result +++ b/mysql-test/suite/perfschema/r/batch_table_io_func.result @@ -116,10 +116,10 @@ id2 id3 c 61 612 612 explain extended select t1.*, t2.*, t3.* from t1 join t2 using (id1) join t3 using (id2); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 -1 SIMPLE t2 ALL NULL NULL NULL NULL 100 100.00 Using where; Using join buffer (flat, BNL join) -1 SIMPLE t3 ALL NULL NULL NULL NULL 1000 100.00 Using where; Using join buffer (incremental, BNL join) +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 100.00 +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 100 100.00 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t3 NULL ALL NULL NULL NULL NULL 1000 100.00 Using where; Using join buffer (incremental, BNL join) Warnings: Note 1003 select `test`.`t1`.`id1` AS `id1`,`test`.`t1`.`a` AS `a`,`test`.`t2`.`id1` AS `id1`,`test`.`t2`.`id2` AS `id2`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`id2` AS `id2`,`test`.`t3`.`id3` AS `id3`,`test`.`t3`.`c` AS `c` from `test`.`t1` join `test`.`t2` join `test`.`t3` where `test`.`t3`.`id2` = `test`.`t2`.`id2` and `test`.`t2`.`id1` = `test`.`t1`.`id1` call before_payload(); @@ -153,10 +153,10 @@ alter table t3 add unique index(id3); alter table t3 add index(id2); explain extended select t1.*, t2.*, t3.* from t1 join t2 using (id1) join t3 using (id2); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL id1 NULL NULL NULL 10 100.00 Using where -1 SIMPLE t2 ref id2,id1 id1 5 test.t1.id1 10 100.00 Using where -1 SIMPLE t3 ref id2 id2 5 test.t2.id2 10 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL id1 NULL NULL NULL 10 100.00 Using where +1 SIMPLE t2 NULL ref id2,id1 id1 5 test.t1.id1 10 100.00 Using where +1 SIMPLE t3 NULL ref id2 id2 5 test.t2.id2 10 100.00 Warnings: Note 1003 select `test`.`t1`.`id1` AS `id1`,`test`.`t1`.`a` AS `a`,`test`.`t2`.`id1` AS `id1`,`test`.`t2`.`id2` AS `id2`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`id2` AS `id2`,`test`.`t3`.`id3` AS `id3`,`test`.`t3`.`c` AS `c` from `test`.`t1` join `test`.`t2` join `test`.`t3` where `test`.`t3`.`id2` = `test`.`t2`.`id2` and `test`.`t2`.`id1` = `test`.`t1`.`id1` call before_payload(); diff --git a/mysql-test/suite/perfschema/r/digest_view.result b/mysql-test/suite/perfschema/r/digest_view.result index b2c908109e6..10d2976c60e 100644 --- a/mysql-test/suite/perfschema/r/digest_view.result +++ b/mysql-test/suite/perfschema/r/digest_view.result @@ -4,28 +4,28 @@ CREATE TABLE test.t1 (a int, b int); INSERT INTO test.t1 VALUES (1, 100), (2, 200), (3, 300); TRUNCATE TABLE performance_schema.events_statements_summary_by_digest; EXPLAIN EXTENDED SELECT * from test.v1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE v1 ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE v1 NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select `test`.`v1`.`a` AS `a`,`test`.`v1`.`b` AS `b` from `test`.`v1` EXPLAIN EXTENDED SELECT * from test.v1 where a = 1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE v1 ALL NULL NULL NULL NULL 3 100.00 Using where +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE v1 NULL ALL NULL NULL NULL NULL 3 100.00 Using where Warnings: Note 1003 select `test`.`v1`.`a` AS `a`,`test`.`v1`.`b` AS `b` from `test`.`v1` where `test`.`v1`.`a` = 1 EXPLAIN EXTENDED SELECT * from test.v1 where b > 100; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE v1 ALL NULL NULL NULL NULL 3 100.00 Using where +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE v1 NULL ALL NULL NULL NULL NULL 3 100.00 Using where Warnings: Note 1003 select `test`.`v1`.`a` AS `a`,`test`.`v1`.`b` AS `b` from `test`.`v1` where `test`.`v1`.`b` > 100 EXPLAIN EXTENDED SELECT a, b from test.v1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE v1 ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE v1 NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select `test`.`v1`.`a` AS `a`,`test`.`v1`.`b` AS `b` from `test`.`v1` EXPLAIN EXTENDED SELECT b, a from test.v1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE v1 ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE v1 NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select `test`.`v1`.`b` AS `b`,`test`.`v1`.`a` AS `a` from `test`.`v1` SELECT * from test.v1; @@ -72,28 +72,28 @@ test TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` DROP TABLE test.v1; CREATE VIEW test.v1 AS SELECT * FROM test.t1; EXPLAIN EXTENDED SELECT * from test.v1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` EXPLAIN EXTENDED SELECT * from test.v1 where a = 1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 100.00 Using where Warnings: Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`a` = 1 EXPLAIN EXTENDED SELECT * from test.v1 where b > 100; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 100.00 Using where Warnings: Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`b` > 100 EXPLAIN EXTENDED SELECT a, b from test.v1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` EXPLAIN EXTENDED SELECT b, a from test.v1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 100.00 Warnings: Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t1`.`a` AS `a` from `test`.`t1` SELECT * from test.v1; @@ -148,20 +148,20 @@ CREATE TABLE test.t1 (a int, b int); INSERT INTO test.t1 VALUES (1, 100), (2, 200), (3, 300); TRUNCATE TABLE performance_schema.events_statements_summary_by_digest; EXPLAIN SELECT * from test.v1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE v1 ALL NULL NULL NULL NULL 3 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE v1 NULL ALL NULL NULL NULL NULL 3 EXPLAIN SELECT * from test.v1 where a = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE v1 ALL NULL NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE v1 NULL ALL NULL NULL NULL NULL 3 Using where EXPLAIN SELECT * from test.v1 where b > 100; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE v1 ALL NULL NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE v1 NULL ALL NULL NULL NULL NULL 3 Using where EXPLAIN SELECT a, b from test.v1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE v1 ALL NULL NULL NULL NULL 3 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE v1 NULL ALL NULL NULL NULL NULL 3 EXPLAIN SELECT b, a from test.v1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE v1 ALL NULL NULL NULL NULL 3 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE v1 NULL ALL NULL NULL NULL NULL 3 SELECT * from test.v1; a b 1 100 @@ -205,20 +205,20 @@ test 61e13f96828d862446f5e8ee1cade61d TRUNCATE TABLE `performance_schema` . `eve DROP TABLE test.v1; CREATE VIEW test.v1 AS SELECT * FROM test.t1; EXPLAIN SELECT * from test.v1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 EXPLAIN SELECT * from test.v1 where a = 1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 Using where EXPLAIN SELECT * from test.v1 where b > 100; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 Using where EXPLAIN SELECT a, b from test.v1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 EXPLAIN SELECT b, a from test.v1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 SELECT * from test.v1; a b 1 100 diff --git a/mysql-test/suite/perfschema/r/misc.result b/mysql-test/suite/perfschema/r/misc.result index 83ca6d5cf3f..9af2536a03b 100644 --- a/mysql-test/suite/perfschema/r/misc.result +++ b/mysql-test/suite/perfschema/r/misc.result @@ -96,8 +96,8 @@ show global variables like "performance_schema_max_thread_instances"; Variable_name Value performance_schema_max_thread_instances 200 explain select * from performance_schema.threads; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE threads ALL NULL NULL NULL NULL 256 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE threads NULL ALL NULL NULL NULL NULL 256 use performance_schema; show events; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation diff --git a/mysql-test/suite/plugins/r/audit_null.result b/mysql-test/suite/plugins/r/audit_null.result index ada85b661ee..0bc8c2fc681 100644 --- a/mysql-test/suite/plugins/r/audit_null.result +++ b/mysql-test/suite/plugins/r/audit_null.result @@ -48,8 +48,8 @@ a alter table t2 add column b int; drop table t2; explain select distinct * from t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using temporary +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 2 Using temporary select distinct * from t2; a b 1 NULL diff --git a/mysql-test/suite/sql_sequence/next.result b/mysql-test/suite/sql_sequence/next.result index 76991fbe68c..2bbe9d18b8d 100644 --- a/mysql-test/suite/sql_sequence/next.result +++ b/mysql-test/suite/sql_sequence/next.result @@ -441,11 +441,11 @@ next_not_cached_value minimum_value maximum_value start_value increment cache_si drop sequence s1; CREATE SEQUENCE t1 start with 5 minvalue 1 maxvalue 10 increment by 1 cache 5 cycle; explain select next value for t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used explain select next value for t1, minimum_value from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL system NULL NULL NULL NULL 1 drop table t1; CREATE SEQUENCE s1; CREATE TABLE t1 (a int); @@ -478,13 +478,13 @@ select next value for s1; next value for s1 3984356 explain extended select next value for s1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select nextval(`test`.`s1`) AS `next value for s1` explain extended select previous value for s1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select lastval(`test`.`s1`) AS `previous value for s1` drop sequence s1; diff --git a/mysql-test/suite/sql_sequence/setval.result b/mysql-test/suite/sql_sequence/setval.result index 504d460fea5..946115f7448 100644 --- a/mysql-test/suite/sql_sequence/setval.result +++ b/mysql-test/suite/sql_sequence/setval.result @@ -235,8 +235,8 @@ select next_not_cached_value,cycle_count from t1; next_not_cached_value cycle_count 1016 0 explain extended select setval(t1,100),setval(t1,100,TRUE),setval(t1,100,FALSE,50); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 select setval(`test`.`t1`,100,1,0) AS `setval(t1,100)`,setval(`test`.`t1`,100,1,0) AS `setval(t1,100,TRUE)`,setval(`test`.`t1`,100,0,50) AS `setval(t1,100,FALSE,50)` drop sequence t1; diff --git a/mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result b/mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result index f6468fd8a7a..bf33f2e920e 100644 --- a/mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result +++ b/mysql-test/suite/sys_vars/r/max_seeks_for_key_func.result @@ -15,9 +15,9 @@ SELECT @@global.max_seeks_for_key; 20 INSERT INTO t1(b) VALUES("AREc"); EXPLAIN SELECT STRAIGHT_JOIN * FROM t1,t1 AS t2 WHERE t1.b = t2.b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 system NULL NULL NULL NULL 1 -1 SIMPLE t2 system NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL system NULL NULL NULL NULL 1 +1 SIMPLE t2 NULL system NULL NULL NULL NULL 1 SET @@session.max_seeks_for_key = 2; SELECT @@session.max_seeks_for_key; @@session.max_seeks_for_key @@ -25,9 +25,9 @@ SELECT @@session.max_seeks_for_key; INSERT INTO t1(b) VALUES("BREc"); INSERT INTO t1(b) VALUES("CRec"); EXPLAIN SELECT STRAIGHT_JOIN * FROM t1,t1 AS t2 WHERE t1.b = t2.b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 -1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join) '#--------------------FN_DYNVARS_084_02-------------------------#' CONNECT test_con2,localhost,root,,; connection test_con2; @@ -43,9 +43,9 @@ SELECT @@global.max_seeks_for_key; 20 INSERT INTO t1(b) VALUES("AREc"); EXPLAIN SELECT STRAIGHT_JOIN * FROM t1,t1 AS t2 WHERE t1.b = t2.b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 4 -1 SIMPLE t2 ALL NULL NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 4 +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join) SET @@session.max_seeks_for_key = 2; SELECT @@session.max_seeks_for_key; @@session.max_seeks_for_key @@ -53,26 +53,26 @@ SELECT @@session.max_seeks_for_key; INSERT INTO t1(b) VALUES("BREc"); INSERT INTO t1(b) VALUES("CRec"); EXPLAIN SELECT STRAIGHT_JOIN * FROM t1,t1 AS t2 WHERE t1.b = t2.b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 6 -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 6 +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 6 Using where; Using join buffer (flat, BNL join) INSERT INTO t1 VALUES(null,"test"); INSERT INTO t1 VALUES (null,"a"),(null,"a"),(null,"a"), (null,"a"),(null,"a"),(null,"a"),(null,"a"), (null,"a"),(null,"a"),(null,"a"); EXPLAIN SELECT STRAIGHT_JOIN * FROM t1,t1 AS t2 WHERE t1.b = t2.b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 17 -1 SIMPLE t2 ALL NULL NULL NULL NULL 17 Using where; Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 17 +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 17 Using where; Using join buffer (flat, BNL join) ANALYZE TABLE t1; Table Op Msg_type Msg_text test.t1 analyze status Engine-independent statistics collected test.t1 analyze status OK SET MAX_SEEKS_FOR_KEY=1; EXPLAIN SELECT STRAIGHT_JOIN * FROM t1,t1 AS t2 WHERE t1.b = t2.b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 17 -1 SIMPLE t2 ALL NULL NULL NULL NULL 17 Using where; Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 17 +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 17 Using where; Using join buffer (flat, BNL join) SET MAX_SEEKS_FOR_KEY=DEFAULT; connection default; disconnect test_con1; diff --git a/mysql-test/suite/vcol/r/vcol_keys_myisam.result b/mysql-test/suite/vcol/r/vcol_keys_myisam.result index 8b89da987a1..13da74f2597 100644 --- a/mysql-test/suite/vcol/r/vcol_keys_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_keys_myisam.result @@ -216,8 +216,8 @@ create table t1 (a int, b int as (a+1), c int, index(b)); insert t1 (a,c) values (0x7890abcd, 0x76543210); insert t1 (a,c) select seq, sin(seq)*10000 from seq_1_to_1000; explain select * from t1 where b=10; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref b b 5 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ref b b 5 const 1 select * from t1 where b=10; a b c 9 10 4121 diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result index b7bd63f662e..65ec4bce4ba 100644 --- a/mysql-test/suite/vcol/r/vcol_misc.result +++ b/mysql-test/suite/vcol/r/vcol_misc.result @@ -232,9 +232,9 @@ insert into t2(c,d) values set join_cache_level=6; explain select * from t1,t2 where t1.b=t2.c and d <= 100; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where -1 SIMPLE t2 ref idx idx 5 test.t1.b 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t2 NULL ref idx idx 5 test.t1.b 2 Using where select * from t1,t2 where t1.b=t2.c and d <= 100; a b c d v 3 30 30 100 101 diff --git a/mysql-test/suite/vcol/r/vcol_select_innodb.result b/mysql-test/suite/vcol/r/vcol_select_innodb.result index 40308b6e072..a627c9497f7 100644 --- a/mysql-test/suite/vcol/r/vcol_select_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_select_innodb.result @@ -17,45 +17,45 @@ select * from t2; a b c 1 -1 -1 explain select * from t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 1 select * from t2 where c=-1; a b c 1 -1 -1 explain select * from t2 where c=-1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref c c 5 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL ref c c 5 const 1 # select_type=SIMPLE, type=ALL select * from t1 where b=-1; a b c 1 -1 -1 1 -1 -1 explain select * from t1 where b=-1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using where # select_type=SIMPLE, type=const select * from t3 where a=1; a b c 1 -1 -1 explain select * from t3 where a=1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 const PRIMARY PRIMARY 4 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL const PRIMARY PRIMARY 4 const 1 # select_type=SIMPLE, type=range select * from t3 where c>=-1; a b c 1 -1 -1 explain select * from t3 where c>=-1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 1 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 1 Using index condition # select_type=SIMPLE, type=ref select * from t1,t3 where t1.c=t3.c and t3.c=-1; a b c a b c 1 -1 -1 1 -1 -1 1 -1 -1 1 -1 -1 explain select * from t1,t3 where t1.c=t3.c and t3.c=-1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 const c c 5 const 1 -1 SIMPLE t1 ref c c 5 const 2 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL const c c 5 const 1 +1 SIMPLE t1 NULL ref c c 5 const 2 # select_type=PRIMARY, type=index,ALL select * from t1 where b in (select c from t3); a b c @@ -64,9 +64,9 @@ a b c 1 -1 -1 3 -3 -3 explain select * from t1 where b in (select c from t3); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where -1 PRIMARY t3 eq_ref c c 5 test.t1.b 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 Using where +1 PRIMARY t3 NULL eq_ref c c 5 test.t1.b 1 Using index # select_type=PRIMARY, type=range,ref select * from t1 where c in (select c from t3 where c between -2 and -1); a b c @@ -74,9 +74,9 @@ a b c 1 -1 -1 1 -1 -1 explain select * from t1 where c in (select c from t3 where c between -2 and -1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t3 range c c 5 NULL 2 Using where; Using index -1 PRIMARY t1 ref c c 5 test.t3.c 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t3 NULL range c c 5 NULL 2 Using where; Using index +1 PRIMARY t1 NULL ref c c 5 test.t3.c 1 # select_type=UNION, type=system # select_type=UNION RESULT, type=<union1,2> select * from t1 union select * from t2; @@ -86,10 +86,10 @@ a b c 3 -3 -3 NULL NULL NULL explain select * from t1 union select * from t2; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 -2 UNION t2 ALL NULL NULL NULL NULL 1 -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 +2 UNION t2 NULL ALL NULL NULL NULL NULL 1 +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL # select_type=DERIVED, type=system set @tmp_optimizer_switch=@@optimizer_switch; set optimizer_switch='derived_merge=off,derived_with_keys=off'; @@ -101,9 +101,9 @@ a b c 3 -3 -3 NULL NULL NULL explain select * from (select a,b,c from t1) as t11; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5 -2 DERIVED t1 ALL NULL NULL NULL NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 5 +2 DERIVED t1 NULL ALL NULL NULL NULL NULL 5 set optimizer_switch=@tmp_optimizer_switch; ### ### Using aggregate functions with/without DISTINCT @@ -113,29 +113,29 @@ select count(*) from t1; count(*) 5 explain select count(*) from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 5 NULL 5 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c 5 NULL 5 Using index # SELECT COUNT(DISTINCT <non-vcol>) FROM tbl_name select count(distinct a) from t1; count(distinct a) 3 explain select count(distinct a) from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 # SELECT COUNT(DISTINCT <non-stored vcol>) FROM tbl_name select count(distinct b) from t1; count(distinct b) 3 explain select count(distinct b) from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 # SELECT COUNT(DISTINCT <stored vcol>) FROM tbl_name select count(distinct c) from t1; count(distinct c) 3 explain select count(distinct c) from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range NULL c 5 NULL 6 Using index for group-by ### ### filesort & range-based utils ### @@ -145,88 +145,88 @@ a b c 2 -2 -2 1 -1 -1 explain select * from t3 where c >= -2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition # SELECT * FROM tbl_name WHERE <non-vcol expr> select * from t3 where a between 1 and 2; a b c 1 -1 -1 2 -2 -2 explain select * from t3 where a between 1 and 2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range PRIMARY PRIMARY 4 NULL 2 Using where # SELECT * FROM tbl_name WHERE <non-indexed vcol expr> select * from t3 where b between -2 and -1; a b c 1 -1 -1 2 -2 -2 explain select * from t3 where b between -2 and -1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL ALL NULL NULL NULL NULL 6 Using where # SELECT * FROM tbl_name WHERE <indexed vcol expr> select * from t3 where c between -2 and -1; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where c between -2 and -1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition # SELECT * FROM tbl_name WHERE <non-vcol expr> ORDER BY <non-indexed vcol> select * from t3 where a between 1 and 2 order by b; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where a between 1 and 2 order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range PRIMARY PRIMARY 4 NULL 2 Using where; Using filesort # SELECT * FROM tbl_name WHERE <non-vcol expr> ORDER BY <indexed vcol> select * from t3 where a between 1 and 2 order by c; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where a between 1 and 2 order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range PRIMARY PRIMARY 4 NULL 2 Using where; Using filesort # SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <non-vcol> select * from t3 where b between -2 and -1 order by a; a b c 1 -1 -1 2 -2 -2 explain select * from t3 where b between -2 and -1 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 index NULL PRIMARY 4 NULL 6 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL index NULL PRIMARY 4 NULL 6 Using where # SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <non-indexed vcol> select * from t3 where b between -2 and -1 order by b; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where b between -2 and -1 order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL ALL NULL NULL NULL NULL 6 Using where; Using filesort # SELECT * FROM tbl_name WHERE <indexed vcol expr> ORDER BY <non-indexed vcol> select * from t3 where c between -2 and -1 order by b; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where c between -2 and -1 order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition; Using filesort # SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <indexed vcol> select * from t3 where b between -2 and -1 order by c; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where b between -2 and -1 order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL ALL NULL NULL NULL NULL 6 Using where; Using filesort # SELECT * FROM tbl_name WHERE <indexed vcol expr> ORDER BY <indexed vcol> select * from t3 where c between -2 and -1 order by c; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where c between -2 and -1 order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition # SELECT sum(<non-indexed vcol>) FROM tbl_name GROUP BY <non-indexed vcol> select sum(b) from t1 group by b; sum(b) @@ -235,8 +235,8 @@ NULL -2 -2 explain select sum(b) from t1 group by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using temporary; Using filesort # SELECT sum(<indexed vcol>) FROM tbl_name GROUP BY <indexed vcol> select sum(c) from t1 group by c; sum(c) @@ -245,8 +245,8 @@ NULL -2 -2 explain select sum(c) from t1 group by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 5 NULL 5 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c 5 NULL 5 Using index # SELECT sum(<non-indexed vcol>) FROM tbl_name GROUP BY <indexed vcol> select sum(b) from t1 group by c; sum(b) @@ -255,8 +255,8 @@ NULL -2 -2 explain select sum(b) from t1 group by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 5 NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c 5 NULL 5 # SELECT sum(<indexed vcol>) FROM tbl_name GROUP BY <non-indexed vcol> select sum(c) from t1 group by b; sum(c) @@ -265,6 +265,6 @@ NULL -2 -2 explain select sum(c) from t1 group by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using temporary; Using filesort SET GLOBAL innodb_stats_persistent=@save_stats_persistent; diff --git a/mysql-test/suite/vcol/r/vcol_select_myisam.result b/mysql-test/suite/vcol/r/vcol_select_myisam.result index 05f86347706..f542d6b462d 100644 --- a/mysql-test/suite/vcol/r/vcol_select_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_select_myisam.result @@ -15,45 +15,45 @@ select * from t2; a b c 1 -1 -1 explain select * from t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 system NULL NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL system NULL NULL NULL NULL 1 select * from t2 where c=-1; a b c 1 -1 -1 explain select * from t2 where c=-1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 system c NULL NULL NULL 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL system c NULL NULL NULL 1 # select_type=SIMPLE, type=ALL select * from t1 where b=-1; a b c 1 -1 -1 1 -1 -1 explain select * from t1 where b=-1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using where # select_type=SIMPLE, type=const select * from t3 where a=1; a b c 1 -1 -1 explain select * from t3 where a=1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 const PRIMARY PRIMARY 4 const 1 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL const PRIMARY PRIMARY 4 const 1 # select_type=SIMPLE, type=range select * from t3 where c>=-1; a b c 1 -1 -1 explain select * from t3 where c>=-1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 1 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 1 Using index condition # select_type=SIMPLE, type=ref select * from t1,t3 where t1.c=t3.c and t3.c=-1; a b c a b c 1 -1 -1 1 -1 -1 1 -1 -1 1 -1 -1 explain select * from t1,t3 where t1.c=t3.c and t3.c=-1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 const c c 5 const 1 -1 SIMPLE t1 ref c c 5 const 2 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL const c c 5 const 1 +1 SIMPLE t1 NULL ref c c 5 const 2 # select_type=PRIMARY, type=index,ALL select * from t1 where b in (select c from t3); a b c @@ -62,9 +62,9 @@ a b c 1 -1 -1 3 -3 -3 explain select * from t1 where b in (select c from t3); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where -1 PRIMARY t3 eq_ref c c 5 test.t1.b 1 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 Using where +1 PRIMARY t3 NULL eq_ref c c 5 test.t1.b 1 Using index # select_type=PRIMARY, type=range,ref select * from t1 where c in (select c from t3 where c between -2 and -1); a b c @@ -72,9 +72,9 @@ a b c 1 -1 -1 1 -1 -1 explain select * from t1 where c in (select c from t3 where c between -2 and -1); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t3 range c c 5 NULL 2 Using where; Using index -1 PRIMARY t1 ref c c 5 test.t3.c 2 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t3 NULL range c c 5 NULL 2 Using where; Using index +1 PRIMARY t1 NULL ref c c 5 test.t3.c 2 # select_type=UNION, type=system # select_type=UNION RESULT, type=<union1,2> select * from t1 union select * from t2; @@ -84,10 +84,10 @@ a b c 3 -3 -3 NULL NULL NULL explain select * from t1 union select * from t2; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 -2 UNION t2 system NULL NULL NULL NULL 1 -NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY t1 NULL ALL NULL NULL NULL NULL 5 +2 UNION t2 NULL system NULL NULL NULL NULL 1 +NULL UNION RESULT <union1,2> NULL ALL NULL NULL NULL NULL NULL # select_type=DERIVED, type=system set @tmp_optimizer_switch=@@optimizer_switch; set optimizer_switch='derived_merge=off,derived_with_keys=off'; @@ -99,9 +99,9 @@ a b c 3 -3 -3 NULL NULL NULL explain select * from (select a,b,c from t1) as t11; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5 -2 DERIVED t1 ALL NULL NULL NULL NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 5 +2 DERIVED t1 NULL ALL NULL NULL NULL NULL 5 set optimizer_switch=@tmp_optimizer_switch; ### ### Using aggregate functions with/without DISTINCT @@ -111,29 +111,29 @@ select count(*) from t1; count(*) 5 explain select count(*) from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Select tables optimized away # SELECT COUNT(DISTINCT <non-vcol>) FROM tbl_name select count(distinct a) from t1; count(distinct a) 3 explain select count(distinct a) from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 # SELECT COUNT(DISTINCT <non-stored vcol>) FROM tbl_name select count(distinct b) from t1; count(distinct b) 3 explain select count(distinct b) from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 # SELECT COUNT(DISTINCT <stored vcol>) FROM tbl_name select count(distinct c) from t1; count(distinct c) 3 explain select count(distinct c) from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL range NULL c 5 NULL 6 Using index for group-by ### ### filesort & range-based utils ### @@ -143,88 +143,88 @@ a b c 2 -2 -2 1 -1 -1 explain select * from t3 where c >= -2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition # SELECT * FROM tbl_name WHERE <non-vcol expr> select * from t3 where a between 1 and 2; a b c 1 -1 -1 2 -2 -2 explain select * from t3 where a between 1 and 2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range PRIMARY PRIMARY 4 NULL 2 Using index condition # SELECT * FROM tbl_name WHERE <non-indexed vcol expr> select * from t3 where b between -2 and -1; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where b between -2 and -1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL ALL NULL NULL NULL NULL 6 Using where # SELECT * FROM tbl_name WHERE <indexed vcol expr> select * from t3 where c between -2 and -1; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where c between -2 and -1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition # SELECT * FROM tbl_name WHERE <non-vcol expr> ORDER BY <indexed vcol> select * from t3 where a between 1 and 2 order by c; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where a between 1 and 2 order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range PRIMARY PRIMARY 4 NULL 2 Using index condition; Using filesort # SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <non-vcol> select * from t3 where b between -2 and -1 order by a; a b c 1 -1 -1 2 -2 -2 explain select * from t3 where b between -2 and -1 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL ALL NULL NULL NULL NULL 6 Using where; Using filesort # SELECT * FROM tbl_name WHERE <indexed vcol expr> ORDER BY <non-vcol> select * from t3 where c between -2 and -1 order by a; a b c 1 -1 -1 2 -2 -2 explain select * from t3 where c between -2 and -1 order by a; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition; Using filesort # SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <non-indexed vcol> select * from t3 where b between -2 and -1 order by b; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where b between -2 and -1 order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL ALL NULL NULL NULL NULL 6 Using where; Using filesort # SELECT * FROM tbl_name WHERE <indexed vcol expr> ORDER BY <non-indexed vcol> select * from t3 where c between -2 and -1 order by b; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where c between -2 and -1 order by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition; Using filesort # SELECT * FROM tbl_name WHERE <non-indexed vcol expr> ORDER BY <indexed vcol> select * from t3 where b between -2 and -1 order by c; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where b between -2 and -1 order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL ALL NULL NULL NULL NULL 6 Using where; Using filesort # SELECT * FROM tbl_name WHERE <indexed vcol expr> ORDER BY <indexed vcol> select * from t3 where c between -2 and -1 order by c; a b c 2 -2 -2 1 -1 -1 explain select * from t3 where c between -2 and -1 order by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range c c 5 NULL 2 Using index condition +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t3 NULL range c c 5 NULL 2 Using index condition # SELECT sum(<non-indexed vcol>) FROM tbl_name GROUP BY <non-indexed vcol> select sum(b) from t1 group by b; sum(b) @@ -233,8 +233,8 @@ NULL -2 -2 explain select sum(b) from t1 group by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using temporary; Using filesort # SELECT sum(<indexed vcol>) FROM tbl_name GROUP BY <indexed vcol> select sum(c) from t1 group by c; sum(c) @@ -243,8 +243,8 @@ NULL -2 -2 explain select sum(c) from t1 group by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL c 5 NULL 5 Using index +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL index NULL c 5 NULL 5 Using index # SELECT sum(<non-indexed vcol>) FROM tbl_name GROUP BY <indexed vcol> select sum(b) from t1 group by c; sum(b) @@ -253,8 +253,8 @@ NULL -2 -2 explain select sum(b) from t1 group by c; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using temporary; Using filesort # SELECT sum(<indexed vcol>) FROM tbl_name GROUP BY <non-indexed vcol> select sum(c) from t1 group by b; sum(c) @@ -263,8 +263,8 @@ NULL -2 -2 explain select sum(c) from t1 group by b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 Using temporary; Using filesort # # Bug #806057: join with USING over a virtual column # @@ -278,18 +278,18 @@ Warning 1906 The value specified for generated column 'b' in table 't2' has been Warning 1906 The value specified for generated column 'b' in table 't2' has been ignored EXPLAIN EXTENDED SELECT * FROM t1 JOIN t2 USING (b); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 3 100.00 +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) Warnings: Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`b` = `test`.`t2`.`b` SELECT * FROM t1 JOIN t2 USING (b); b a EXPLAIN EXTENDED SELECT * FROM t1 NATURAL JOIN t2; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 3 100.00 +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) Warnings: Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`b` = `test`.`t2`.`b` SELECT * FROM t1 NATURAL JOIN t2; @@ -315,10 +315,10 @@ key (vi, vc)); insert t2 (bi, bc) values (1, 'c'), (8, 'm'), (9, 'd'), (6, 'y'), (1, 't'), (6, 'd'), (2, 's'), (4, 'r'), (8, 'm'), (4, 'b'), (4, 'x'), (7, 'g'), (4, 'p'), (1, 'q'), (9, 'w'), (4, 'd'), (8, 'e'), (4, 'b'), (8, 'y'); explain # should be using join buffer select t2.vi from (t2 as t3 right join (t2 left join t1 on (t1.bi = t2.vi)) on (t1.vc = t2.vc)); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL vi 10 NULL 19 Using index -1 SIMPLE t1 ALL NULL NULL NULL NULL 19 Using where; Using join buffer (flat, BNL join) -1 SIMPLE t3 index NULL PRIMARY 4 NULL 19 Using where; Using index; Using join buffer (incremental, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL index NULL vi 10 NULL 19 Using index +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 19 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t3 NULL index NULL PRIMARY 4 NULL 19 Using where; Using index; Using join buffer (incremental, BNL join) select t2.vi from (t2 as t3 right join (t2 left join t1 on (t1.bi = t2.vi)) on (t1.vc = t2.vc)); vi 1 @@ -424,10 +424,10 @@ key (vi, vc)); insert t2 (bi, bc) values (1, 'c'), (8, 'm'), (9, 'd'), (6, 'y'), (1, 't'), (6, 'd'), (2, 's'), (4, 'r'), (8, 'm'), (4, 'b'), (4, 'x'), (7, 'g'), (4, 'p'), (1, 'q'), (9, 'w'), (4, 'd'), (8, 'e'), (4, 'b'), (8, 'y'); explain # should be using join buffer select t2.vi from (t2 as t3 right join (t2 left join t1 on (t1.bi = t2.vi)) on (t1.vc = t2.vc)); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL vi 10 NULL 19 Using index -1 SIMPLE t1 ALL NULL NULL NULL NULL 19 Using where; Using join buffer (flat, BNL join) -1 SIMPLE t3 index NULL PRIMARY 4 NULL 19 Using where; Using index; Using join buffer (incremental, BNL join) +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t2 NULL index NULL vi 10 NULL 19 Using index +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 19 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t3 NULL index NULL PRIMARY 4 NULL 19 Using where; Using index; Using join buffer (incremental, BNL join) select t2.vi from (t2 as t3 right join (t2 left join t1 on (t1.bi = t2.vi)) on (t1.vc = t2.vc)); vi 1 diff --git a/mysql-test/suite/vcol/r/vcol_view_innodb.result b/mysql-test/suite/vcol/r/vcol_view_innodb.result index 53ef6e0709c..f327058452f 100644 --- a/mysql-test/suite/vcol/r/vcol_view_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_view_innodb.result @@ -17,8 +17,8 @@ select is_updatable from information_schema.views where table_name='v1'; is_updatable NO explain extended select d,e from v1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 100.00 Warnings: Note 1003 select abs(`test`.`t1`.`b`) AS `d`,abs(`test`.`t1`.`c`) AS `e` from `test`.`t1` create algorithm=temptable view v2 (d,e) as select abs(b), abs(c) from t1; @@ -33,9 +33,9 @@ d e 2 2 3 3 explain extended select d,e from v2; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5 100.00 -2 DERIVED t1 ALL NULL NULL NULL NULL 5 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 5 100.00 +2 DERIVED t1 NULL ALL NULL NULL NULL NULL 5 100.00 Warnings: Note 1003 /* select#1 */ select `v2`.`d` AS `d`,`v2`.`e` AS `e` from `test`.`v2` create view v3 (d,e) as select d*2, e*2 from v1; @@ -47,8 +47,8 @@ d e 4 4 6 6 explain extended select * from v3; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 100.00 Warnings: Note 1003 select abs(`test`.`t1`.`b`) * 2 AS `d`,abs(`test`.`t1`.`c`) * 2 AS `e` from `test`.`t1` drop view v1,v2,v3; @@ -64,9 +64,9 @@ b -2 -3 explain select * from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6 -2 DERIVED t1 ALL NULL NULL NULL NULL 6 Using temporary +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 6 +2 DERIVED t1 NULL ALL NULL NULL NULL NULL 6 Using temporary select * from t1; a b c 1 -1 -1 @@ -83,9 +83,9 @@ c -2 -3 explain select * from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6 -2 DERIVED t1 ALL NULL NULL NULL NULL 6 Using temporary +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 6 +2 DERIVED t1 NULL ALL NULL NULL NULL NULL 6 Using temporary select * from t1; a b c 1 -1 -1 @@ -108,9 +108,9 @@ b+1 MariaDB-5.3: the following EXPLAIN produces incorrect #rows for table t1. MariaDB-5.3: this is expected to go away when FROM subquery optimizations are pushed explain select * from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 -2 DERIVED t1 ALL NULL NULL NULL NULL 4 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 2 +2 DERIVED t1 NULL ALL NULL NULL NULL NULL 4 Using filesort drop view v1; create view v1 as select c+1 from t1 order by 1 desc limit 2; select * from v1; @@ -120,9 +120,9 @@ c+1 MariaDB-5.3: the following EXPLAIN produces incorrect #rows for table t1. MariaDB-5.3: this is expected to go away when FROM subquery optimizations are pushed explain select * from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 -2 DERIVED t1 ALL NULL NULL NULL NULL 4 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 2 +2 DERIVED t1 NULL ALL NULL NULL NULL NULL 4 Using filesort drop view v1; drop table t1; create table t1 (a int, diff --git a/mysql-test/suite/vcol/r/vcol_view_myisam.result b/mysql-test/suite/vcol/r/vcol_view_myisam.result index 9c0dcba2128..5c98de80e4a 100644 --- a/mysql-test/suite/vcol/r/vcol_view_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_view_myisam.result @@ -15,8 +15,8 @@ select is_updatable from information_schema.views where table_name='v1'; is_updatable NO explain extended select d,e from v1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 100.00 Warnings: Note 1003 select abs(`test`.`t1`.`b`) AS `d`,abs(`test`.`t1`.`c`) AS `e` from `test`.`t1` create algorithm=temptable view v2 (d,e) as select abs(b), abs(c) from t1; @@ -31,9 +31,9 @@ d e 2 2 3 3 explain extended select d,e from v2; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5 100.00 -2 DERIVED t1 ALL NULL NULL NULL NULL 5 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 5 100.00 +2 DERIVED t1 NULL ALL NULL NULL NULL NULL 5 100.00 Warnings: Note 1003 /* select#1 */ select `v2`.`d` AS `d`,`v2`.`e` AS `e` from `test`.`v2` create view v3 (d,e) as select d*2, e*2 from v1; @@ -45,8 +45,8 @@ d e 4 4 6 6 explain extended select * from v3; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 100.00 Warnings: Note 1003 select abs(`test`.`t1`.`b`) * 2 AS `d`,abs(`test`.`t1`.`c`) * 2 AS `e` from `test`.`t1` drop view v1,v2,v3; @@ -62,9 +62,9 @@ b -2 -3 explain select * from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6 -2 DERIVED t1 ALL NULL NULL NULL NULL 6 Using temporary +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 6 +2 DERIVED t1 NULL ALL NULL NULL NULL NULL 6 Using temporary select * from t1; a b c 1 -1 -1 @@ -81,9 +81,9 @@ c -2 -3 explain select * from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 6 -2 DERIVED t1 ALL NULL NULL NULL NULL 6 Using temporary +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 6 +2 DERIVED t1 NULL ALL NULL NULL NULL NULL 6 Using temporary select * from t1; a b c 1 -1 -1 @@ -106,9 +106,9 @@ b+1 MariaDB-5.3: the following EXPLAIN produces incorrect #rows for table t1. MariaDB-5.3: this is expected to go away when FROM subquery optimizations are pushed explain select * from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 -2 DERIVED t1 ALL NULL NULL NULL NULL 4 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 2 +2 DERIVED t1 NULL ALL NULL NULL NULL NULL 4 Using filesort drop view v1; create view v1 as select c+1 from t1 order by 1 desc limit 2; select * from v1; @@ -118,9 +118,9 @@ c+1 MariaDB-5.3: the following EXPLAIN produces incorrect #rows for table t1. MariaDB-5.3: this is expected to go away when FROM subquery optimizations are pushed explain select * from v1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 -2 DERIVED t1 ALL NULL NULL NULL NULL 4 Using filesort +id select_type table partitions type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 2 +2 DERIVED t1 NULL ALL NULL NULL NULL NULL 4 Using filesort drop view v1; drop table t1; create table t1 (a int, diff --git a/mysql-test/suite/versioning/r/cte.result b/mysql-test/suite/versioning/r/cte.result index 6ca9c238d45..c1a6285e085 100644 --- a/mysql-test/suite/versioning/r/cte.result +++ b/mysql-test/suite/versioning/r/cte.result @@ -34,11 +34,11 @@ select e.emp_id, e.name, e.mgr, e.salary from emp as e where name = 'bill' union select e.emp_id, e.name, e.mgr, e.salary from emp as e ) select * from ancestors for system_time as of @ts_1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 8 100.00 -2 DERIVED e ALL NULL NULL NULL NULL 4 100.00 Using where -3 UNION e ALL NULL NULL NULL NULL 4 100.00 Using where -NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 8 100.00 +2 DERIVED e NULL ALL NULL NULL NULL NULL 4 100.00 Using where +3 UNION e NULL ALL NULL NULL NULL NULL 4 100.00 Using where +NULL UNION RESULT <union2,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 with ancestors as (/* select#2 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` where `test`.`e`.`name` = 'bill' and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1` union /* select#3 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` where `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1`)/* select#1 */ select `ancestors`.`emp_id` AS `emp_id`,`ancestors`.`name` AS `name`,`ancestors`.`mgr` AS `mgr`,`ancestors`.`salary` AS `salary` from `ancestors` select row_start into @ts_2 from emp where name="john"; @@ -57,12 +57,12 @@ ancestors as a where e.mgr = a.emp_id ) select * from ancestors; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 4 100.00 -2 DERIVED e ALL NULL NULL NULL NULL 4 100.00 Using where -3 RECURSIVE UNION e ALL mgr-fk NULL NULL NULL 4 100.00 Using where -3 RECURSIVE UNION <derived2> ref key0 key0 5 test.e.mgr 2 100.00 -NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 4 100.00 +2 DERIVED e NULL ALL NULL NULL NULL NULL 4 100.00 Using where +3 RECURSIVE UNION e NULL ALL mgr-fk NULL NULL NULL 4 100.00 Using where +3 RECURSIVE UNION <derived2> NULL ref key0 key0 5 test.e.mgr 2 100.00 +NULL UNION RESULT <union2,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 with recursive ancestors as (/* select#2 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` where `test`.`e`.`name` = 'bill' and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1` union /* select#3 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` join `ancestors` `a` where `a`.`emp_id` = `test`.`e`.`mgr` and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1`)/* select#1 */ select `ancestors`.`emp_id` AS `emp_id`,`ancestors`.`name` AS `name`,`ancestors`.`mgr` AS `mgr`,`ancestors`.`salary` AS `salary` from `ancestors` /* All report to 'Bill' */ @@ -98,12 +98,12 @@ ancestors as a where e.mgr = a.emp_id ) select * from ancestors for system_time as of timestamp @ts_1; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 4 100.00 -2 DERIVED e ALL NULL NULL NULL NULL 4 100.00 Using where -3 RECURSIVE UNION e ALL mgr-fk NULL NULL NULL 4 100.00 Using where -3 RECURSIVE UNION <derived2> ref key0 key0 5 test.e.mgr 2 100.00 -NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 4 100.00 +2 DERIVED e NULL ALL NULL NULL NULL NULL 4 100.00 Using where +3 RECURSIVE UNION e NULL ALL mgr-fk NULL NULL NULL 4 100.00 Using where +3 RECURSIVE UNION <derived2> NULL ref key0 key0 5 test.e.mgr 2 100.00 +NULL UNION RESULT <union2,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 with recursive ancestors as (/* select#2 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` where `test`.`e`.`name` = 'bill' and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1` union /* select#3 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` join `ancestors` `a` where `a`.`emp_id` = `test`.`e`.`mgr` and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1`)/* select#1 */ select `ancestors`.`emp_id` AS `emp_id`,`ancestors`.`name` AS `name`,`ancestors`.`mgr` AS `mgr`,`ancestors`.`salary` AS `salary` from `ancestors` with recursive @@ -138,13 +138,13 @@ ancestors as a where e.mgr = a.emp_id ) select name from emp where emp_id in (select emp_id from ancestors for system_time as of timestamp @ts_1); -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY emp ALL PRIMARY NULL NULL NULL 4 100.00 Using where -1 PRIMARY <derived2> ref key0 key0 5 test.emp.emp_id 2 100.00 FirstMatch(emp) -2 DERIVED e ALL NULL NULL NULL NULL 4 100.00 Using where -3 RECURSIVE UNION e ALL mgr-fk NULL NULL NULL 4 100.00 Using where -3 RECURSIVE UNION <derived2> ref key0 key0 5 test.e.mgr 2 100.00 -NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 PRIMARY emp NULL ALL PRIMARY NULL NULL NULL 4 100.00 Using where +1 PRIMARY <derived2> NULL ref key0 key0 5 test.emp.emp_id 2 100.00 FirstMatch(emp) +2 DERIVED e NULL ALL NULL NULL NULL NULL 4 100.00 Using where +3 RECURSIVE UNION e NULL ALL mgr-fk NULL NULL NULL 4 100.00 Using where +3 RECURSIVE UNION <derived2> NULL ref key0 key0 5 test.e.mgr 2 100.00 +NULL UNION RESULT <union2,3> NULL ALL NULL NULL NULL NULL NULL NULL Warnings: Note 1003 with recursive ancestors as (/* select#2 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` where `test`.`e`.`name` = 'bill' and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1` union /* select#3 */ select `test`.`e`.`emp_id` AS `emp_id`,`test`.`e`.`name` AS `name`,`test`.`e`.`mgr` AS `mgr`,`test`.`e`.`salary` AS `salary` from `test`.`emp` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts_1` `e` join `ancestors` `a` where `a`.`emp_id` = `test`.`e`.`mgr` and `test`.`e`.`row_end` > @`ts_1` and `test`.`e`.`row_start` <= @`ts_1`)/* select#1 */ select `test`.`emp`.`name` AS `name` from `test`.`emp` semi join (`ancestors`) where `ancestors`.`emp_id` = `test`.`emp`.`emp_id` and `test`.`emp`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999' with recursive diff --git a/mysql-test/suite/versioning/r/derived.result b/mysql-test/suite/versioning/r/derived.result index 700c92a8d5c..80846b50bf4 100644 --- a/mysql-test/suite/versioning/r/derived.result +++ b/mysql-test/suite/versioning/r/derived.result @@ -207,14 +207,14 @@ create or replace table t2 (x int, y int) with system versioning; insert into t1 values (1, 1), (1, 2), (1, 3), (4, 4), (5, 5); insert into t2 values (1, 2), (2, 1), (3, 1); ## Outer or inner SYSTEM_TIME produces same expression -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) Query A: Note 1003 select `test`.`t1`.`x` AS `x`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t1` FOR SYSTEM_TIME AS OF TIMESTAMP current_timestamp(6) join `test`.`t2` FOR SYSTEM_TIME AS OF TIMESTAMP current_timestamp(6) where `test`.`t1`.`x` = `test`.`t2`.`x` and `test`.`t2`.`row_end` > <cache>(current_timestamp(6)) and `test`.`t2`.`row_start` <= <cache>(current_timestamp(6)) and `test`.`t1`.`row_end` > <cache>(current_timestamp(6)) and `test`.`t1`.`row_start` <= <cache>(current_timestamp(6)) -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where -1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) Query B: Note 1003 select `test`.`t1`.`x` AS `x`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t1` FOR SYSTEM_TIME AS OF TIMESTAMP current_timestamp(6) join `test`.`t2` FOR SYSTEM_TIME AS OF TIMESTAMP current_timestamp(6) where `test`.`t1`.`x` = `test`.`t2`.`x` and `test`.`t2`.`row_end` > <cache>(current_timestamp(6)) and `test`.`t2`.`row_start` <= <cache>(current_timestamp(6)) and `test`.`t1`.`row_end` > <cache>(current_timestamp(6)) and `test`.`t1`.`row_start` <= <cache>(current_timestamp(6)) Fine result: queries A and B are equal. diff --git a/mysql-test/suite/versioning/r/trx_id.result b/mysql-test/suite/versioning/r/trx_id.result index 6c337863790..e58d19d1c54 100644 --- a/mysql-test/suite/versioning/r/trx_id.result +++ b/mysql-test/suite/versioning/r/trx_id.result @@ -296,18 +296,18 @@ PERIOD FOR SYSTEM_TIME (sys_trx_start, sys_trx_end) INSERT INTO t1 (x) VALUES (1); SET @ts= DATE_ADD(NOW(), INTERVAL 1 YEAR); EXPLAIN EXTENDED SELECT x FROM t1 FOR SYSTEM_TIME AS OF TRANSACTION @ts; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 1 100.00 Using where +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 1 100.00 Using where Warnings: Note 1003 select `test`.`t1`.`x` AS `x` from `test`.`t1` FOR SYSTEM_TIME AS OF TRANSACTION @`ts` where trt_trx_sees(`test`.`t1`.`sys_trx_end`,@`ts`) and trt_trx_sees_eq(@`ts`,`test`.`t1`.`sys_trx_start`) EXPLAIN EXTENDED SELECT x FROM t1 FOR SYSTEM_TIME AS OF TIMESTAMP @ts; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 1 100.00 Using where +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 1 100.00 Using where Warnings: Note 1003 select `test`.`t1`.`x` AS `x` from `test`.`t1` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts` where trt_trx_sees(`test`.`t1`.`sys_trx_end`,<cache>(trt_trx_id(@`ts`))) and trt_trx_sees_eq(<cache>(trt_trx_id(@`ts`)),`test`.`t1`.`sys_trx_start`) EXPLAIN EXTENDED SELECT x FROM t1 FOR SYSTEM_TIME AS OF @ts; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 1 100.00 Using where +id select_type table partitions type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 1 100.00 Using where Warnings: Note 1003 select `test`.`t1`.`x` AS `x` from `test`.`t1` FOR SYSTEM_TIME AS OF TIMESTAMP @`ts` where trt_trx_sees(`test`.`t1`.`sys_trx_end`,<cache>(trt_trx_id(@`ts`))) and trt_trx_sees_eq(<cache>(trt_trx_id(@`ts`)),`test`.`t1`.`sys_trx_start`) DROP TABLE t1;
participants (1)
-
psergey