From 809e23797cc230bb108d686617d8d050db70f996 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 27 Apr 2007 01:12:09 +0300 Subject: Added sql_mode PAD_CHAR_TO_FULL_LENGTH (WL#921) This pads the value of CHAR columns with spaces up to full column length (according to ANSI) It's not makde part of oracle or ansi mode yet, as this would cause a notable behaviour change. Added uuid_short(), a generator for increasing 'unique' longlong integers (8 bytes) mysql-test/r/func_misc.result: Update results mysql-test/r/sql_mode.result: Update results mysql-test/t/func_misc.test: Added test for uuid_short() mysql-test/t/sql_mode.test: Added test for sql_mode=PAD_CHAR_TO_FULL_LENGTH (#WL921) sql/field.cc: Added sql_mode PAD_CHAR_TO_FULL_LENGTH sql/item.cc: Initialize uuid_short() sql/item_create.cc: Added creation of uuid_short() sql/item_func.cc: Added uuid_short() sql/item_func.h: Added uuid_short() sql/mysql_priv.h: Added sql_mode PAD_CHAR_TO_FULL_LENGTH sql/mysqld.cc: Added sql_mode PAD_CHAR_TO_FULL_LENGTH --- mysql-test/r/func_misc.result | 3 +++ mysql-test/r/sql_mode.result | 19 +++++++++++++++++-- mysql-test/t/func_misc.test | 4 ++++ mysql-test/t/sql_mode.test | 13 ++++++++++++- 4 files changed, 36 insertions(+), 3 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index b4c6f0f6699..7526134c476 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -22,6 +22,9 @@ hex(inet_aton('127.1.1')) select length(uuid()), charset(uuid()), length(unhex(replace(uuid(),_utf8'-',_utf8''))); length(uuid()) charset(uuid()) length(unhex(replace(uuid(),_utf8'-',_utf8''))) 36 utf8 16 +select cast(uuid_short()-uuid_short() as signed); +cast(uuid_short()-uuid_short() as signed) +-1 select length(format('nan', 2)) > 0; length(format('nan', 2)) > 0 1 diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result index c7be653ca2e..9998a51fdc8 100644 --- a/mysql-test/r/sql_mode.result +++ b/mysql-test/r/sql_mode.result @@ -475,9 +475,24 @@ set sql_mode=16384+(65536*4); select @@sql_mode; @@sql_mode REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_TABLE_OPTIONS,ANSI -set sql_mode=2147483648; -ERROR 42000: Variable 'sql_mode' can't be set to the value of '2147483648' +set sql_mode=2147483648*2; +ERROR 42000: Variable 'sql_mode' can't be set to the value of '4294967296' select @@sql_mode; @@sql_mode REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,NO_TABLE_OPTIONS,ANSI +set sql_mode=PAD_CHAR_TO_FULL_LENGTH; +create table t1 (a int auto_increment primary key, b char(5)); +insert into t1 (b) values('a'),('b\t'),('c '); +select concat('x',b,'x') from t1; +concat('x',b,'x') +xa x +xb x +xc x +set sql_mode=0; +select concat('x',b,'x') from t1; +concat('x',b,'x') +xax +xb x +xcx +drop table t1; SET @@SQL_MODE=@OLD_SQL_MODE; diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index 8ff62f68e45..7437b0008e4 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -14,6 +14,10 @@ select hex(inet_aton('127.1.1')); select length(uuid()), charset(uuid()), length(unhex(replace(uuid(),_utf8'-',_utf8''))); +# As we can assume we are the only user for the mysqld server, the difference +# between two calls should be -1 +select cast(uuid_short()-uuid_short() as signed); + # # Test for core dump with nan # diff --git a/mysql-test/t/sql_mode.test b/mysql-test/t/sql_mode.test index 8542c2b7927..7a9036c8621 100644 --- a/mysql-test/t/sql_mode.test +++ b/mysql-test/t/sql_mode.test @@ -264,7 +264,18 @@ select @@sql_mode; set sql_mode=16384+(65536*4); select @@sql_mode; --error 1231 -set sql_mode=2147483648; # that mode does not exist +set sql_mode=2147483648*2; # that mode does not exist select @@sql_mode; +# +# Test WL921: Retain spaces when retrieving CHAR column values + +set sql_mode=PAD_CHAR_TO_FULL_LENGTH; +create table t1 (a int auto_increment primary key, b char(5)); +insert into t1 (b) values('a'),('b\t'),('c '); +select concat('x',b,'x') from t1; +set sql_mode=0; +select concat('x',b,'x') from t1; +drop table t1; + SET @@SQL_MODE=@OLD_SQL_MODE; -- cgit v1.2.1 From a9760355dc8b22e2a9fc2066bf67c64c14205a9e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 May 2007 19:38:34 +0300 Subject: Bug#22855: Conversion errors when constructing the condition for an IN predicates were treated as if the affected column contains NULL. If such a IN predicate is inside NOT we get wrong results. Corrected the handling of conversion errors in an IN predicate that is resolved by unique_subquery (through subselect_uniquesubquery_engine). mysql-test/r/subselect3.result: Bug#22855: test case mysql-test/t/subselect3.test: Bug#22855: test case sql/item_subselect.cc: Bug#22855: corrected the handling of conversion errors and NULL key values in IN predicate that is resolved by index lookup. --- mysql-test/r/bdb_notembedded.result | 35 ++++++++++++++++++++++++++++++++++ mysql-test/r/subselect3.result | 18 ++++++++++++++++++ mysql-test/t/bdb_notembedded.test | 38 +++++++++++++++++++++++++++++++++++++ mysql-test/t/subselect3.test | 18 ++++++++++++++++++ 4 files changed, 109 insertions(+) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test (limited to 'mysql-test') diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result index 96a3ee00a59..65637a2d0db 100644 --- a/mysql-test/r/subselect3.result +++ b/mysql-test/r/subselect3.result @@ -692,3 +692,21 @@ a MAX(b) test 2 3 h 3 4 i DROP TABLE t1, t2; +CREATE TABLE t1 (a INT NOT NULL); +INSERT INTO t1 VALUES (1),(-1), (65),(66); +CREATE TABLE t2 (a INT UNSIGNED NOT NULL PRIMARY KEY); +INSERT INTO t2 VALUES (65),(66); +SELECT a FROM t1 WHERE a NOT IN (65,66); +a +1 +-1 +SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2); +a +1 +-1 +EXPLAIN SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where +2 DEPENDENT SUBQUERY t2 unique_subquery PRIMARY PRIMARY 4 func 1 Using index +DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/mysql-test/t/subselect3.test b/mysql-test/t/subselect3.test index e8eae3e2452..178d95dfff9 100644 --- a/mysql-test/t/subselect3.test +++ b/mysql-test/t/subselect3.test @@ -531,3 +531,21 @@ SELECT a, MAX(b), DROP TABLE t1, t2; + +# +# Bug #22855: Optimizer doesn't rewrite NOT IN subselects to a correlated +# subquery +# +CREATE TABLE t1 (a INT NOT NULL); +INSERT INTO t1 VALUES (1),(-1), (65),(66); + +CREATE TABLE t2 (a INT UNSIGNED NOT NULL PRIMARY KEY); +INSERT INTO t2 VALUES (65),(66); + +SELECT a FROM t1 WHERE a NOT IN (65,66); +SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2); +EXPLAIN SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2); + +DROP TABLE t1; + +--echo End of 5.0 tests -- cgit v1.2.1 From 193b7327ec8c76fdfd339ddb1af54a002dd7de70 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 20 May 2007 21:22:57 +0500 Subject: bug #28361 Buffer overflow in DECIMAL code on Windows my_decimal in some cases can contain more decimal digits than is officially supported (DECIMAL_MAX_PRECISION), so we need to prepare bigger buffer for the resulting string. mysql-test/r/type_newdecimal.result: bug #28361 Buffer overflow in DECIMAL code on Windows test result mysql-test/t/type_newdecimal.test: bug #28361 Buffer overflow in DECIMAL code on Windows test case This test case doesn't fall in most cases even without the fix Still valgrind shows the problemn sql/my_decimal.h: bug #28361 Buffer overflow in DECIMAL code on Windows DECIMAL_MAX_POSSIBLE_PRECISION introduced to be used in places, when we need to check for the number of digits technicaly possible in my_decimal. DECIMAL_MAX_STR_LENGTH fixed as it has to fit for the MAX_POSSIBLE_PRECISION --- mysql-test/r/type_newdecimal.result | 3 +++ mysql-test/t/type_newdecimal.test | 8 ++++++++ 2 files changed, 11 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index cbcab126439..d91baaa0394 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -1465,4 +1465,7 @@ Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at r Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 +create table t1 (s varchar(100)); +insert into t1 values (0.00000000010000000000000000364321973154977415791655470655996396089904010295867919921875); +drop table t1; End of 5.0 tests diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test index a7906be79d4..09b20fb14d3 100644 --- a/mysql-test/t/type_newdecimal.test +++ b/mysql-test/t/type_newdecimal.test @@ -1149,4 +1149,12 @@ select cast(a as DECIMAL(3,2)), count(*) UNION select 12.1234 ) t group by 1; +# +# Bug #28361 Buffer overflow in DECIMAL code on Windows +# + +create table t1 (s varchar(100)); +insert into t1 values (0.00000000010000000000000000364321973154977415791655470655996396089904010295867919921875); +drop table t1; + --echo End of 5.0 tests -- cgit v1.2.1 From e87a37fb67db89d2bfbdd9a89da87ef4adad456a Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 21 May 2007 13:02:03 +0500 Subject: Bug #28361 Buffer overflow in DECIMAL code on Windows result max length changed for the 'decimal' fields so test results have to be fixed mysql-test/r/ps_2myisam.result: Bug #28361 Buffer overflow in DECIMAL code on Windows test result fixed mysql-test/r/ps_3innodb.result: Bug #28361 Buffer overflow in DECIMAL code on Windows test result fixed mysql-test/r/ps_4heap.result: Bug #28361 Buffer overflow in DECIMAL code on Windows test result fixed mysql-test/r/ps_5merge.result: Bug #28361 Buffer overflow in DECIMAL code on Windows test result fixed mysql-test/r/ps_7ndb.result: Bug #28361 Buffer overflow in DECIMAL code on Windows test result fixed --- mysql-test/r/ps_2myisam.result | 32 ++++++++++----------- mysql-test/r/ps_3innodb.result | 32 ++++++++++----------- mysql-test/r/ps_4heap.result | 32 ++++++++++----------- mysql-test/r/ps_5merge.result | 64 +++++++++++++++++++++--------------------- mysql-test/r/ps_7ndb.result | 32 ++++++++++----------- 5 files changed, 96 insertions(+), 96 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index 2b2a29b2122..a2f0fff086e 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.result @@ -1927,8 +1927,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -1974,8 +1974,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2024,8 +2024,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2064,8 +2064,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2112,8 +2112,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2156,8 +2156,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2202,8 +2202,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2240,8 +2240,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index f30262ef219..17c83bdc87a 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -1910,8 +1910,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -1957,8 +1957,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2007,8 +2007,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2047,8 +2047,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2095,8 +2095,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2139,8 +2139,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2185,8 +2185,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2223,8 +2223,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index a012e516404..114891f1145 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -1911,8 +1911,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -1958,8 +1958,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2008,8 +2008,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2048,8 +2048,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2096,8 +2096,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2140,8 +2140,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2186,8 +2186,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2224,8 +2224,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index ac9c8ae55ff..245d5766efd 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -1847,8 +1847,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -1894,8 +1894,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -1944,8 +1944,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -1984,8 +1984,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2032,8 +2032,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2076,8 +2076,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2122,8 +2122,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2160,8 +2160,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -4861,8 +4861,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -4908,8 +4908,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -4958,8 +4958,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -4998,8 +4998,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -5046,8 +5046,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -5090,8 +5090,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -5136,8 +5136,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -5174,8 +5174,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result index 2673448489a..65e9121a35e 100644 --- a/mysql-test/r/ps_7ndb.result +++ b/mysql-test/r/ps_7ndb.result @@ -1910,8 +1910,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -1957,8 +1957,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2007,8 +2007,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2047,8 +2047,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2095,8 +2095,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2139,8 +2139,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2185,8 +2185,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2223,8 +2223,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 -- cgit v1.2.1 From 68f0d56d7c049d3dc99cfc844fa9d5c485af5a16 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 21 May 2007 10:27:33 +0200 Subject: bug#23856 --- mysql-test/r/func_gconcat.result | 47 ++++++++++++++++++++++++++++++++++++++++ mysql-test/t/func_gconcat.test | 32 +++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index 71419b5b2c3..0f41db3fa84 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -737,4 +737,51 @@ SELECT GROUP_CONCAT(DISTINCT UCASE(b)) FROM t1; GROUP_CONCAT(DISTINCT UCASE(b)) ONE.1,TWO.2,ONE.3 DROP TABLE t1; +SET group_concat_max_len= 65535; +CREATE TABLE t1( a TEXT, b INTEGER ); +INSERT INTO t1 VALUES ( 'a', 0 ), ( 'b', 1 ); +SELECT GROUP_CONCAT( a ORDER BY b ) FROM t1; +GROUP_CONCAT( a ORDER BY b ) +a,b +SELECT GROUP_CONCAT(DISTINCT a ORDER BY b) FROM t1; +GROUP_CONCAT(DISTINCT a ORDER BY b) +a,b +SELECT GROUP_CONCAT(DISTINCT a) FROM t1; +GROUP_CONCAT(DISTINCT a) +a,b +SET group_concat_max_len= 10; +SELECT GROUP_CONCAT(a ORDER BY b) FROM t1; +GROUP_CONCAT(a ORDER BY b) +a,b +SELECT GROUP_CONCAT(DISTINCT a ORDER BY b) FROM t1; +GROUP_CONCAT(DISTINCT a ORDER BY b) +a,b +SELECT GROUP_CONCAT(DISTINCT a) FROM t1; +GROUP_CONCAT(DISTINCT a) +a,b +SET group_concat_max_len= 65535; +CREATE TABLE t2( a TEXT ); +INSERT INTO t2 VALUES( REPEAT( 'a', 5000 ) ); +INSERT INTO t2 VALUES( REPEAT( 'b', 5000 ) ); +INSERT INTO t2 VALUES( REPEAT( 'a', 5000 ) ); +SELECT LENGTH( GROUP_CONCAT( DISTINCT a ) ) FROM t2; +LENGTH( GROUP_CONCAT( DISTINCT a ) ) +10001 +CREATE TABLE t3( a TEXT, b INT ); +INSERT INTO t3 VALUES( REPEAT( 'a', 65534 ), 1 ); +INSERT INTO t3 VALUES( REPEAT( 'a', 65535 ), 2 ); +INSERT INTO t3 VALUES( REPEAT( 'a', 65536 ), 3 ); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 1; +LENGTH( GROUP_CONCAT( a ) ) +65534 +SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 2; +LENGTH( GROUP_CONCAT( a ) ) +65535 +SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 3; +LENGTH( GROUP_CONCAT( a ) ) +65535 +SET group_concat_max_len= DEFAULT; +DROP TABLE t1, t2, t3; End of 5.0 tests diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index 0dd82864520..983797f9c4d 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -507,4 +507,36 @@ SELECT GROUP_CONCAT(DISTINCT UCASE(a)) FROM t1; SELECT GROUP_CONCAT(DISTINCT UCASE(b)) FROM t1; DROP TABLE t1; +# +# Bug #23856:GROUP_CONCAT and ORDER BY: junk from previous rows for query on I_S +# +SET group_concat_max_len= 65535; +CREATE TABLE t1( a TEXT, b INTEGER ); +INSERT INTO t1 VALUES ( 'a', 0 ), ( 'b', 1 ); +SELECT GROUP_CONCAT( a ORDER BY b ) FROM t1; +SELECT GROUP_CONCAT(DISTINCT a ORDER BY b) FROM t1; +SELECT GROUP_CONCAT(DISTINCT a) FROM t1; +SET group_concat_max_len= 10; +SELECT GROUP_CONCAT(a ORDER BY b) FROM t1; +SELECT GROUP_CONCAT(DISTINCT a ORDER BY b) FROM t1; +SELECT GROUP_CONCAT(DISTINCT a) FROM t1; + +SET group_concat_max_len= 65535; +CREATE TABLE t2( a TEXT ); +INSERT INTO t2 VALUES( REPEAT( 'a', 5000 ) ); +INSERT INTO t2 VALUES( REPEAT( 'b', 5000 ) ); +INSERT INTO t2 VALUES( REPEAT( 'a', 5000 ) ); +SELECT LENGTH( GROUP_CONCAT( DISTINCT a ) ) FROM t2; + +CREATE TABLE t3( a TEXT, b INT ); +INSERT INTO t3 VALUES( REPEAT( 'a', 65534 ), 1 ); +INSERT INTO t3 VALUES( REPEAT( 'a', 65535 ), 2 ); +INSERT INTO t3 VALUES( REPEAT( 'a', 65536 ), 3 ); +SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 1; +SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 2; +SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 3; + +SET group_concat_max_len= DEFAULT; +DROP TABLE t1, t2, t3; + --echo End of 5.0 tests -- cgit v1.2.1 From 2d77cd809a20828970057976dcd6cc8dcfd2f009 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 21 May 2007 17:53:55 +0500 Subject: test result fixed --- mysql-test/r/ps_6bdb.result | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result index 407dddb6f53..6f6ecbb20b8 100644 --- a/mysql-test/r/ps_6bdb.result +++ b/mysql-test/r/ps_6bdb.result @@ -1910,8 +1910,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -1957,8 +1957,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2007,8 +2007,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2047,8 +2047,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2095,8 +2095,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2139,8 +2139,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2185,8 +2185,8 @@ def @arg07 253 23 1 Y 128 31 63 def @arg08 253 23 1 Y 128 31 63 def @arg09 253 23 1 Y 128 31 63 def @arg10 253 23 1 Y 128 31 63 -def @arg11 253 67 6 Y 128 30 63 -def @arg12 253 67 6 Y 128 30 63 +def @arg11 253 83 6 Y 128 30 63 +def @arg12 253 83 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2223,8 +2223,8 @@ def @arg07 253 23 0 Y 128 31 63 def @arg08 253 23 0 Y 128 31 63 def @arg09 253 23 0 Y 128 31 63 def @arg10 253 23 0 Y 128 31 63 -def @arg11 253 67 0 Y 128 30 63 -def @arg12 253 67 0 Y 128 30 63 +def @arg11 253 83 0 Y 128 30 63 +def @arg12 253 83 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 -- cgit v1.2.1 From 6fe492d47913075ee9c284dc4be685b14cd5e67a Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 21 May 2007 22:22:47 +0500 Subject: Bug #27984 Long Decimal Maths produces truncated results. decimal_round failed to perform a correct rounding of a decimal number if its first nine digits were '9'. It just sets those digits to 0. mysql-test/r/type_newdecimal.result: Bug #27984 Long Decimal Maths produces truncated results. test result mysql-test/t/type_newdecimal.test: Bug #27984 Long Decimal Maths produces truncated results. test case strings/decimal.c: Bug #27984 Long Decimal Maths produces truncated results. when to == from we break the data if we do to->buf[0]=0 So now doing this after the data is moved and only if we really need to set to->buf[0] to zero --- mysql-test/r/type_newdecimal.result | 3 +++ mysql-test/t/type_newdecimal.test | 5 +++++ 2 files changed, 8 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index cbcab126439..92a5e4fc39c 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -1465,4 +1465,7 @@ Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at r Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 +SELECT 1.000000000000 * 99.999999999998 / 100 a,1.000000000000 * (99.999999999998 / 100) b; +a b +0.9999999999999800000000000000 0.9999999999999800000000000000 End of 5.0 tests diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test index a7906be79d4..3a62db1bfd7 100644 --- a/mysql-test/t/type_newdecimal.test +++ b/mysql-test/t/type_newdecimal.test @@ -1149,4 +1149,9 @@ select cast(a as DECIMAL(3,2)), count(*) UNION select 12.1234 ) t group by 1; +# +# Bug #27984 Long Decimal Maths produces truncated results +# + +SELECT 1.000000000000 * 99.999999999998 / 100 a,1.000000000000 * (99.999999999998 / 100) b; --echo End of 5.0 tests -- cgit v1.2.1 From a9b0bdabc6b46b3363fefbb0d9b8a999012895c4 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 22 May 2007 00:22:53 +0400 Subject: Bug#27507: Wrong DATETIME value was allowed by ALTER TABLE in the NO_ZERO_DATE mode. When a new DATE/DATETIME field without default value is being added by the ALTER TABLE the '0000-00-00' value is used as the default one. But it wasn't checked whether such value was allowed by the set sql mode. Due to this '0000-00-00' values was allowed for DATE/DATETIME fields even in the NO_ZERO_DATE mode. Now the mysql_alter_table() function checks whether the '0000-00-00' value is allowed for DATE/DATETIME fields by the set sql mode. The new error_if_not_empty flag is used in the mysql_alter_table() function to indicate that it should abort if the table being altered isn't empty. The new new_datetime_field field is used in the mysql_alter_table() function for error throwing purposes. The new error_if_not_empty parameter is added to the copy_data_between_tables() function to indicate the it should return error if the source table isn't empty. mysql-test/t/alter_table.test: Added a test case for the bug#27507: Wrong DATETIME value was allowed by ALTER TABLE in the NO_ZERO_DATE mode. mysql-test/r/alter_table.result: Added a test case for the bug#27507: Wrong DATETIME value was allowed by ALTER TABLE in the NO_ZERO_DATE mode. sql/sql_table.cc: Bug#27507: Wrong DATETIME value was allowed by ALTER TABLE in the NO_ZERO_DATE mode. Now the mysql_alter_table() function checks whether the '0000-00-00' value is allowed for DATE/DATETIME fields by the set sql mode. The new error_if_not_empty flag is used in the mysql_alter_table() function to indicate that it should abort if the table being altered isn't empty. The new new_datetime_field field is used in the mysql_alter_table() function for error throwing purposes. The new error_if_not_empty parameter is added to the copy_data_between_tables() function to indicate the it should return error if the source table isn't empty. --- mysql-test/r/alter_table.result | 19 +++++++++++++++++++ mysql-test/t/alter_table.test | 22 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 280cedb8b89..4eace9ac628 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -884,3 +884,22 @@ id 50 51 drop table t1; +set @orig_sql_mode = @@sql_mode; +set sql_mode="no_zero_date"; +create table t1(f1 int); +alter table t1 add column f2 datetime not null, add column f21 date not null; +insert into t1 values(1,'2000-01-01','2000-01-01'); +alter table t1 add column f3 datetime not null; +ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'f3' at row 1 +alter table t1 add column f3 date not null; +ERROR 22007: Incorrect date value: '0000-00-00' for column 'f3' at row 1 +alter table t1 add column f4 datetime not null default '2002-02-02', +add column f41 date not null; +ERROR 22007: Incorrect date value: '0000-00-00' for column 'f41' at row 1 +alter table t1 add column f4 datetime not null default '2002-02-02', +add column f41 date not null default '2002-02-02'; +select * from t1; +f1 f2 f21 f4 f41 +1 2000-01-01 00:00:00 2000-01-01 2002-02-02 00:00:00 2002-02-02 +drop table t1; +set sql_mode= @orig_sql_mode; diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 83686f31e9e..3ced1087757 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -662,3 +662,25 @@ insert into t1 values (null); select * from t1; drop table t1; + +# +# Bug#27507: Wrong DATETIME value was allowed by ALTER TABLE in the +# NO_ZERO_DATE mode. +# +set @orig_sql_mode = @@sql_mode; +set sql_mode="no_zero_date"; +create table t1(f1 int); +alter table t1 add column f2 datetime not null, add column f21 date not null; +insert into t1 values(1,'2000-01-01','2000-01-01'); +--error 1292 +alter table t1 add column f3 datetime not null; +--error 1292 +alter table t1 add column f3 date not null; +--error 1292 +alter table t1 add column f4 datetime not null default '2002-02-02', + add column f41 date not null; +alter table t1 add column f4 datetime not null default '2002-02-02', + add column f41 date not null default '2002-02-02'; +select * from t1; +drop table t1; +set sql_mode= @orig_sql_mode; -- cgit v1.2.1 From 0174c9f1f80aa12883481bdada5d244f6d8ff7f6 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 22 May 2007 15:58:30 +0300 Subject: Bug #28476: force index on a disabled myisam index gives error 124 When processing the USE/FORCE index hints the optimizer was not checking if the indexes specified are enabled (see ALTER TABLE). Fixed by: Backporting the fix for bug 20604 to 5.0 mysql-test/r/key.result: Test for BUG 20604. The important part of the test is the explain output that tests what indexes are used. mysql-test/r/myisam.result: Bug #28476: test cases mysql-test/t/key.test: Bug 20604: The minimal test case that reveals the bug. The optimizer for aggregates relies on keys disabled with ALTER TABLE ... DISABLE KEYS not being in the set TABLE::keys_in_use_for_query. When the execution engine tries to use a disabled index, MyISAM returns an error. mysql-test/t/myisam.test: Bug #28476: test cases sql/sql_base.cc: Bug #28476: - Ignore disabled indexes in USE/FORCE index sql/sql_select.cc: Bug 20604 : The intersection operation between table->s->keys_in_use and table->keys_in_use_for_query is no longer necessary. We can trust that the latter is a subset of the former. sql/table.h: Bug 20604: Added comments to TABLE_SHARE::keys_in_use and TABLE::keys_in_use_for_query. --- mysql-test/r/key.result | 8 ++++++++ mysql-test/r/myisam.result | 26 ++++++++++++++++++++++++++ mysql-test/t/key.test | 12 ++++++++++++ mysql-test/t/myisam.test | 16 ++++++++++++++++ 4 files changed, 62 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result index ec15eaa97f5..3abc95ec3bf 100644 --- a/mysql-test/r/key.result +++ b/mysql-test/r/key.result @@ -455,3 +455,11 @@ ORDER BY c.b, c.d a b c d e f g h i j a b c d 2 2 1 2004-11-30 12:00:00 1 0 0 0 0 0 2 3388000 -553000 NULL DROP TABLE t1, t2; +CREATE TABLE t1( a TINYINT, KEY(a) ) ENGINE=MyISAM; +INSERT INTO t1 VALUES( 1 ); +ALTER TABLE t1 DISABLE KEYS; +EXPLAIN SELECT MAX(a) FROM t1 FORCE INDEX(a); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +DROP TABLE t1; +End of 5.0 tests. diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 94f2f1f72b3..7fc29cd13ca 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1780,4 +1780,30 @@ create table t3 (c1 int) engine=myisam pack_keys=default; create table t4 (c1 int) engine=myisam pack_keys=2; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2' at line 1 drop table t1, t2, t3; +CREATE TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM; +INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5); +SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1; +a +1 +ALTER TABLE t1 DISABLE KEYS; +SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1; +a +1 +SELECT a FROM t1 USE INDEX (inx) WHERE a=1; +a +1 +SELECT b FROM t1 FORCE INDEX (uinx) WHERE b=1; +b +1 +SELECT b FROM t1 USE INDEX (uinx) WHERE b=1; +b +1 +SELECT a FROM t1 FORCE INDEX (inx,uinx) WHERE a=1; +a +1 +ALTER TABLE t1 ENABLE KEYS; +SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1; +a +1 +DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test index e84b2071ab1..3d0e68dc0f3 100644 --- a/mysql-test/t/key.test +++ b/mysql-test/t/key.test @@ -432,3 +432,15 @@ ORDER BY c.b, c.d ; DROP TABLE t1, t2; + + +# +# Bug #20604: Test for disabled keys with aggregate functions and FORCE INDEX. +# +CREATE TABLE t1( a TINYINT, KEY(a) ) ENGINE=MyISAM; +INSERT INTO t1 VALUES( 1 ); +ALTER TABLE t1 DISABLE KEYS; +EXPLAIN SELECT MAX(a) FROM t1 FORCE INDEX(a); +DROP TABLE t1; + +--echo End of 5.0 tests. diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 82d10059c65..12b9423be21 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -1145,4 +1145,20 @@ create table t3 (c1 int) engine=myisam pack_keys=default; create table t4 (c1 int) engine=myisam pack_keys=2; drop table t1, t2, t3; +# +# Bug#28476: force index on a disabled myisam index gives error 124 +# +CREATE TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM; +INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5); +SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1; +ALTER TABLE t1 DISABLE KEYS; +SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1; +SELECT a FROM t1 USE INDEX (inx) WHERE a=1; +SELECT b FROM t1 FORCE INDEX (uinx) WHERE b=1; +SELECT b FROM t1 USE INDEX (uinx) WHERE b=1; +SELECT a FROM t1 FORCE INDEX (inx,uinx) WHERE a=1; +ALTER TABLE t1 ENABLE KEYS; +SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1; +DROP TABLE t1; + --echo End of 5.0 tests -- cgit v1.2.1 From ce8a8e08da649a670bdd8e5c9ccdca1e9ba2e063 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 May 2007 14:43:06 +0200 Subject: Bug #28250: Run-Time Check Failure #3 - The variable 'value' is being used without being def Inside method Item_func_unsigned::val_int, the variable value can be returned without being initialized when the CAST argument is of type DECIMAL and has a NULL value. This gives a run-time error when building debug binaries using Visual C++ 2005. Solution: Initialize value to 0 mysql-test/t/cast.test: bug#28250: There is no need for an extra test case, but we recognize that this one catches the bug. sql/item_func.cc: bug#28250: initialization of value. --- mysql-test/t/cast.test | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test index 004ef69182d..b665eb86656 100644 --- a/mysql-test/t/cast.test +++ b/mysql-test/t/cast.test @@ -10,7 +10,13 @@ select cast(-5 as unsigned) -1, cast(-5 as unsigned) + 1; select ~5, cast(~5 as signed); explain extended select ~5, cast(~5 as signed); select cast(5 as unsigned) -6.0; -select cast(NULL as signed), cast(1/0 as signed); +select cast(NULL as signed), cast(1/0 as signed); +# +# Bug #28250: Run-Time Check Failure #3 - The variable 'value' is being used +# without being def +# +# The following line causes Run-Time Check Failure on +# binaries built with Visual C++ 2005 select cast(NULL as unsigned), cast(1/0 as unsigned); select cast("A" as binary) = "a", cast(BINARY "a" as CHAR) = "A"; select cast("2001-1-1" as DATE), cast("2001-1-1" as DATETIME); -- cgit v1.2.1 From 19b0aa5c5a03a78a984227461a2a0cd5b867305d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 May 2007 23:24:16 +0400 Subject: Bug#27563: Stored functions and triggers wasn't throwing an error when killed. If a stored function or a trigger was killed it had aborted but no error was thrown. This allows the caller statement to continue without a notice. This may lead to a wrong data being inserted/updated to/deleted as in such cases the correct result of a stored function isn't guaranteed. In the case of triggers it allows the caller statement to ignore kill signal and to waste time because of re-evaluation of triggers that always will fail because thd->killed flag is still on. Now the Item_func_sp::execute() and the sp_head::execute_trigger() functions check whether a function or a trigger were killed during execution and throws an appropriate error if so. Now the fill_record() function stops filling record if an error was reported through thd->net.report_error. sql/item_func.cc: Bug#27563: Stored functions and triggers wasn't throwing an error when killed. Now the Item_func_sp::execute() function checks whether a trigger was killed during execution and throws an appropriate error if so. sql/sp_head.cc: Bug#27563: Stored functions and triggers wasn't throwing an error when killed. Now the sp_head::execute_trigger() function checks whether a function was killed during execution and throws an appropriate error if so. sql/sql_base.cc: Bug#27563: Stored functions and triggers wasn't throwing an error when killed. Now the fill_record() function stops filling record if an error was reported through thd->net.report_error. mysql-test/r/kill.result: Added a test case for the bug#27563: Stored functions and triggers wasn't throwing an error when killed. mysql-test/t/kill.test: Added a test case for the bug#27563: Stored functions and triggers wasn't throwing an error when killed. --- mysql-test/r/kill.result | 82 +++++++++++++++++++++++++++++ mysql-test/t/kill.test | 132 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 214 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/kill.result b/mysql-test/r/kill.result index cf5486d1091..4bc04c6de3c 100644 --- a/mysql-test/r/kill.result +++ b/mysql-test/r/kill.result @@ -41,3 +41,85 @@ select 1; select RELEASE_LOCK("a"); RELEASE_LOCK("a") 1 +create table t1(f1 int); +create function bug27563() returns int(11) +deterministic +begin +declare continue handler for sqlstate '70100' set @a:= 'killed'; +declare continue handler for sqlexception set @a:= 'exception'; +set @a= get_lock("lock27563", 10); +return 1; +end| +select get_lock("lock27563",10); +get_lock("lock27563",10) +1 +insert into t1 values (bug27563()); +ERROR 70100: Query execution was interrupted +select @a; +@a +NULL +select * from t1; +f1 +insert into t1 values(0); +update t1 set f1= bug27563(); +ERROR 70100: Query execution was interrupted +select @a; +@a +NULL +select * from t1; +f1 +0 +insert into t1 values(1); +delete from t1 where bug27563() is null; +ERROR 70100: Query execution was interrupted +select @a; +@a +NULL +select * from t1; +f1 +0 +1 +select * from t1 where f1= bug27563(); +ERROR 70100: Query execution was interrupted +select @a; +@a +NULL +create procedure proc27563() +begin +declare continue handler for sqlstate '70100' set @a:= 'killed'; +declare continue handler for sqlexception set @a:= 'exception'; +select get_lock("lock27563",10); +select "shouldn't be selected"; +end| +call proc27563(); +get_lock("lock27563",10) +NULL +ERROR 70100: Query execution was interrupted +select @a; +@a +NULL +create table t2 (f2 int); +create trigger trg27563 before insert on t1 for each row +begin +declare continue handler for sqlstate '70100' set @a:= 'killed'; +declare continue handler for sqlexception set @a:= 'exception'; +set @a:= get_lock("lock27563",10); +insert into t2 values(1); +end| +insert into t1 values(2),(3); +ERROR 70100: Query execution was interrupted +select @a; +@a +NULL +select * from t1; +f1 +0 +1 +select * from t2; +f2 +select release_lock("lock27563"); +release_lock("lock27563") +1 +drop table t1, t2; +drop function bug27563; +drop procedure proc27563; diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test index 1e99911a7e3..83194e214fb 100644 --- a/mysql-test/t/kill.test +++ b/mysql-test/t/kill.test @@ -117,3 +117,135 @@ reap; select 1; connection con1; select RELEASE_LOCK("a"); + +# +# Bug#27563: Stored functions and triggers wasn't throwing an error when killed. +# +create table t1(f1 int); +delimiter |; +create function bug27563() returns int(11) +deterministic +begin + declare continue handler for sqlstate '70100' set @a:= 'killed'; + declare continue handler for sqlexception set @a:= 'exception'; + set @a= get_lock("lock27563", 10); + return 1; +end| +delimiter ;| +# Test stored functions +# Test INSERT +connection con1; +select get_lock("lock27563",10); +connection con2; +let $ID= `select connection_id()`; +send insert into t1 values (bug27563()); +real_sleep 2; +connection con1; +disable_query_log; +eval kill query $ID; +enable_query_log; +connection con2; +--error 1317 +reap; +select @a; +connection con1; +select * from t1; + +# Test UPDATE +insert into t1 values(0); +connection con2; +send update t1 set f1= bug27563(); +real_sleep 2; +connection con1; +disable_query_log; +eval kill query $ID; +enable_query_log; +connection con2; +--error 1317 +reap; +select @a; +connection con1; +select * from t1; + +# Test DELETE +insert into t1 values(1); +connection con2; +send delete from t1 where bug27563() is null; +real_sleep 2; +connection con1; +disable_query_log; +eval kill query $ID; +enable_query_log; +connection con2; +--error 1317 +reap; +select @a; +connection con1; +select * from t1; + +# Test SELECT +connection con2; +send select * from t1 where f1= bug27563(); +real_sleep 2; +connection con1; +disable_query_log; +eval kill query $ID; +enable_query_log; +connection con2; +--error 1317 +reap; +select @a; + +# Test PROCEDURE +connection con2; +delimiter |; +create procedure proc27563() +begin + declare continue handler for sqlstate '70100' set @a:= 'killed'; + declare continue handler for sqlexception set @a:= 'exception'; + select get_lock("lock27563",10); + select "shouldn't be selected"; +end| +delimiter ;| +send call proc27563(); +real_sleep 2; +connection con1; +disable_query_log; +eval kill query $ID; +enable_query_log; +connection con2; +--error 1317 +reap; +select @a; + +# Test TRIGGERS +connection con2; +create table t2 (f2 int); +delimiter |; +create trigger trg27563 before insert on t1 for each row +begin + declare continue handler for sqlstate '70100' set @a:= 'killed'; + declare continue handler for sqlexception set @a:= 'exception'; + set @a:= get_lock("lock27563",10); + insert into t2 values(1); +end| +delimiter ;| +send insert into t1 values(2),(3); +real_sleep 2; +connection con1; +disable_query_log; +eval kill query $ID; +enable_query_log; +connection con2; +--error 1317 +reap; +select @a; +connection con1; +select * from t1; +select * from t2; + +# Cleanup +select release_lock("lock27563"); +drop table t1, t2; +drop function bug27563; +drop procedure proc27563; -- cgit v1.2.1 From 3eab7c15634a715c4b706ca8c12e3f6378d3b0b0 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 May 2007 19:04:12 -0700 Subject: Fixed bug #28561: assertion abort for update on multi-table view with CHECK OPTION and a subquery in WHERE condition. The abort was triggered by setting the value of join->tables for subqueries in the function JOIN::cleanup. This function was called after an invocation of the JOIN::join_free method for subqueries used in WHERE condition. mysql-test/r/view.result: Added a test case for bug #28561. mysql-test/t/view.test: Added a test case for bug #28561. sql/sql_select.cc: Fixed bug #28561: assertion abort for update on multi-table view with CHECK OPTION and a subquery in WHERE condition. The abort was triggered by setting the value of join->tables for subqueries in the function JOIN::cleanup. This function was called after an invocation of the JOIN::join_free method for subqueries used in WHERE condition. Setting the value of join->tables to for a subquery created serious problems for checking WHERE condition after update of the multi-table view as this check is performed in the do_select function right after a call of the JOIN::join_free method. In fact setting join->tables to 0 in JOIN::cleanup is not needed anywhere in the current code. --- mysql-test/r/view.result | 10 ++++++++++ mysql-test/t/view.test | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 8d9d802949d..13239af41ad 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3367,4 +3367,14 @@ SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(1.23456789 as decimal(8,0)) AS `col` DROP VIEW v1; +CREATE TABLE t1 (id int); +CREATE TABLE t2 (id int, c int DEFAULT 0); +INSERT INTO t1 (id) VALUES (1); +INSERT INTO t2 (id) VALUES (1); +CREATE VIEW v1 AS +SELECT t2.c FROM t1, t2 +WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; +UPDATE v1 SET c=1; +DROP VIEW v1; +DROP TABLE t1,t2; End of 5.0 tests. diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 3275ba0a687..1f6bee8b142 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3233,4 +3233,23 @@ CREATE VIEW v1 AS SELECT CAST(1.23456789 AS DECIMAL(8,0)) AS col; SHOW CREATE VIEW v1; DROP VIEW v1; +# +# Bug #28561: update on multi-table view with CHECK OPTION and +# a subquery in WHERE condition +# + +CREATE TABLE t1 (id int); +CREATE TABLE t2 (id int, c int DEFAULT 0); +INSERT INTO t1 (id) VALUES (1); +INSERT INTO t2 (id) VALUES (1); + +CREATE VIEW v1 AS + SELECT t2.c FROM t1, t2 + WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; + +UPDATE v1 SET c=1; + +DROP VIEW v1; +DROP TABLE t1,t2; + --echo End of 5.0 tests. -- cgit v1.2.1 From 53eadeee6f581c0b526befa7b21c3e2d4ae470a6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 25 May 2007 17:24:17 +0500 Subject: Fixed bug #28522: sometimes `mysqldump --hex-blob' overruned output buffer by '\0' byte. The dump_table() function has been fixed to reserve 1 byte more for the last '\0' byte of dumped string. client/mysqldump.c: Fixed bug #28522. The dump_table() function has been fixed to reserve 1 byte more for the last '\0' byte of dumped string. mysql-test/t/mysqldump.test: Updated test case for bug #28522. mysql-test/r/mysqldump.result: Updated test case for bug #28522. --- mysql-test/r/mysqldump.result | 11 +++++++++++ mysql-test/t/mysqldump.test | 7 +++++++ 2 files changed, 18 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index d9198ffeb48..25c4199e7a3 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -3310,5 +3310,16 @@ drop user user1; drop user user2; drop database mysqldump_test_db; # +# Bug #28522: buffer overrun by '\0' byte using --hex-blob. +# +CREATE TABLE t1 (c1 INT, c2 LONGBLOB); +INSERT INTO t1 SET c1=11, c2=REPEAT('q',509); +CREATE TABLE `t1` ( + `c1` int(11) default NULL, + `c2` longblob +); +INSERT INTO `t1` VALUES (11,0x7171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171); +DROP TABLE t1; +# # End of 5.0 tests # diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 4c4690520c6..7df65f2b2e1 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1528,7 +1528,14 @@ drop user user2; drop database mysqldump_test_db; +--echo # +--echo # Bug #28522: buffer overrun by '\0' byte using --hex-blob. +--echo # +CREATE TABLE t1 (c1 INT, c2 LONGBLOB); +INSERT INTO t1 SET c1=11, c2=REPEAT('q',509); +--exec $MYSQL_DUMP --skip-create --compact --hex-blob test t1 +DROP TABLE t1; --echo # --echo # End of 5.0 tests -- cgit v1.2.1 From 62596d9a15ef58062c20c6269af7d5fefa789e00 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 26 May 2007 10:33:01 -0700 Subject: Fixed bug #28571. Outer join queries with ON conditions over constant outer tables did not return null complemented rows when conditions were evaluated to FALSE. Wrong results were returned because the conditions over constant outer tables, when being pushed down, were erroneously enclosed into the guard function used for WHERE conditions. mysql-test/r/join_outer.result: Added a test case for bug #28571. mysql-test/t/join_outer.test: Added a test case for bug #28571. sql/sql_select.cc: Fixed bug #28571. Outer join queries with ON conditions over constant outer tables did not return null complemented rows when conditions were evaluated to FALSE. Wrong results were returned because the conditions over constant outer tables, when being pushed down, were erroneously enclosed into the guard function used for WHERE conditions. The problem is fixed in the function make_join_select. Now the conditions over constant tables from ON expressions are pushed down after the conditions from WHERE has been pushed down. --- mysql-test/r/join_outer.result | 15 +++++++++++++++ mysql-test/t/join_outer.test | 16 ++++++++++++++++ 2 files changed, 31 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index c62601946c2..1366a8fe97a 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -1239,3 +1239,18 @@ Handler_read_prev 0 Handler_read_rnd 0 Handler_read_rnd_next 6 DROP TABLE t1,t2; +CREATE TABLE t1 (c int PRIMARY KEY, e int NOT NULL); +INSERT INTO t1 VALUES (1,0), (2,1); +CREATE TABLE t2 (d int PRIMARY KEY); +INSERT INTO t2 VALUES (1), (2), (3); +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON e<>0 WHERE c=1 AND d IS NULL; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 +1 SIMPLE t2 index NULL PRIMARY 4 NULL 3 Using where; Using index; Not exists +SELECT * FROM t1 LEFT JOIN t2 ON e<>0 WHERE c=1 AND d IS NULL; +c e d +1 0 NULL +SELECT * FROM t1 LEFT JOIN t2 ON e<>0 WHERE c=1 AND d<=>NULL; +c e d +1 0 NULL +DROP TABLE t1,t2; diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test index 51e79a20d65..1a59dbf8fc2 100644 --- a/mysql-test/t/join_outer.test +++ b/mysql-test/t/join_outer.test @@ -845,3 +845,19 @@ SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL; show status like 'Handler_read%'; DROP TABLE t1,t2; + +# +# Bug 28571: outer join with false on condition over constant tables +# + +CREATE TABLE t1 (c int PRIMARY KEY, e int NOT NULL); +INSERT INTO t1 VALUES (1,0), (2,1); +CREATE TABLE t2 (d int PRIMARY KEY); +INSERT INTO t2 VALUES (1), (2), (3); + +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON e<>0 WHERE c=1 AND d IS NULL; +SELECT * FROM t1 LEFT JOIN t2 ON e<>0 WHERE c=1 AND d IS NULL; +SELECT * FROM t1 LEFT JOIN t2 ON e<>0 WHERE c=1 AND d<=>NULL; + +DROP TABLE t1,t2; + -- cgit v1.2.1 From 343a1677dedaa262610e02d4f704b0db5d10d0bf Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 May 2007 01:08:35 +0500 Subject: view.result, mysqldump.result: Merge with 5.0-opt. mysql-test/r/view.result: Merge with 5.0-opt. mysql-test/r/mysqldump.result: Merge with 5.0-opt. --- mysql-test/r/mysqldump.result | 2 +- mysql-test/r/view.result | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index f4d30921cee..5d7145fa7b7 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -3314,7 +3314,7 @@ drop database mysqldump_test_db; CREATE TABLE t1 (c1 INT, c2 LONGBLOB); INSERT INTO t1 SET c1=11, c2=REPEAT('q',509); CREATE TABLE `t1` ( - `c1` int(11) default NULL, + `c1` int(11) DEFAULT NULL, `c2` longblob ); INSERT INTO `t1` VALUES (11,0x7171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171); diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 5a338b633cc..db488aa4876 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3139,6 +3139,16 @@ code COUNT(DISTINCT country) 100 2 DROP VIEW v1; DROP TABLE t1; +CREATE TABLE t1 (id int); +CREATE TABLE t2 (id int, c int DEFAULT 0); +INSERT INTO t1 (id) VALUES (1); +INSERT INTO t2 (id) VALUES (1); +CREATE VIEW v1 AS +SELECT t2.c FROM t1, t2 +WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; +UPDATE v1 SET c=1; +DROP VIEW v1; +DROP TABLE t1,t2; DROP VIEW IF EXISTS v1; SELECT * FROM (SELECT 1) AS t; 1 @@ -3359,16 +3369,6 @@ SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(1.23456789 as decimal(8,0)) AS `col` DROP VIEW v1; -CREATE TABLE t1 (id int); -CREATE TABLE t2 (id int, c int DEFAULT 0); -INSERT INTO t1 (id) VALUES (1); -INSERT INTO t2 (id) VALUES (1); -CREATE VIEW v1 AS -SELECT t2.c FROM t1, t2 -WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; -UPDATE v1 SET c=1; -DROP VIEW v1; -DROP TABLE t1,t2; End of 5.0 tests. DROP DATABASE IF EXISTS `d-1`; CREATE DATABASE `d-1`; -- cgit v1.2.1 From 0c08d2b2cb732b75f15a7548a4b67188d49e118c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 May 2007 14:45:30 +0300 Subject: Bug #28605: SHOW CREATE VIEW with views using stored_procedures no longer showing SP names. SHOW CREATE VIEW uses Item::print() methods to reconstruct the statement text from the parse tree. The print() method for stored procedure calls needs allocate space to print the function's quoted name. It was incorrectly calculating the length of the buffer needed (was too short). Fixed to reflect the actual space needed. mysql-test/r/sp.result: Bug #28605: test case mysql-test/t/sp.test: Bug #28605: test case sql/item_func.cc: Bug #28605: fixed the string length calculation --- mysql-test/r/sp.result | 11 +++++++++++ mysql-test/t/sp.test | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index b5b79af031e..5b7f32442ae 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -6152,3 +6152,14 @@ count(*) 3 drop table t1,t2; drop function bug27354; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2); +CREATE FUNCTION metered(a INT) RETURNS INT RETURN 12; +CREATE VIEW v1 AS SELECT test.metered(a) as metered FROM t1; +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`metered`(`t1`.`a`) AS `metered` from `t1` +DROP VIEW v1; +DROP FUNCTION metered; +DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index ff203a85ef7..88b8a46c48f 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -7112,3 +7112,23 @@ select count(*) from t1 /* must be 3 */; drop table t1,t2; drop function bug27354; + +# +# Bug #28605: SHOW CREATE VIEW with views using stored_procedures no longer +# showing SP names. +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2); + +CREATE FUNCTION metered(a INT) RETURNS INT RETURN 12; + +CREATE VIEW v1 AS SELECT test.metered(a) as metered FROM t1; + +SHOW CREATE VIEW v1; + +DROP VIEW v1; +DROP FUNCTION metered; +DROP TABLE t1; + + +--echo End of 5.0 tests -- cgit v1.2.1 From d89e1c3987c3be09b400236cb2952259d51a51a1 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 May 2007 15:58:18 +0300 Subject: Bug #27531: 5.1 part of the fix - Renamed "Using join cache" to "Using join buffer". - "Using join buffer" is now printed on the last table that "reads" from the join buffer cache. mysql-test/r/archive_gis.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/compress.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ctype_utf8.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/derived.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/distinct.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/func_group.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/func_group_innodb.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/gis.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/greedy_optimizer.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/group_by.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/group_min_max.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/index_merge_myisam.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/information_schema.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/innodb_gis.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/innodb_mysql.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/join.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/join_nested.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/key_diff.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/myisam.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ndb_condition_pushdown.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ndb_gis.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/range.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/row.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/select.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ssl.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ssl_compress.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/subselect.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/subselect3.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/union.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/view.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. sql/sql_select.cc: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. --- mysql-test/r/archive_gis.result | 4 +- mysql-test/r/compress.result | 4 +- mysql-test/r/ctype_utf8.result | 4 +- mysql-test/r/derived.result | 20 +- mysql-test/r/distinct.result | 20 +- mysql-test/r/func_group.result | 8 +- mysql-test/r/func_group_innodb.result | 8 +- mysql-test/r/gis.result | 4 +- mysql-test/r/greedy_optimizer.result | 440 ++++++++++++++--------------- mysql-test/r/group_by.result | 8 +- mysql-test/r/group_min_max.result | 4 +- mysql-test/r/index_merge_myisam.result | 16 +- mysql-test/r/information_schema.result | 4 +- mysql-test/r/innodb_gis.result | 4 +- mysql-test/r/innodb_mysql.result | 8 +- mysql-test/r/join.result | 4 +- mysql-test/r/join_nested.result | 52 ++-- mysql-test/r/key_diff.result | 4 +- mysql-test/r/myisam.result | 12 +- mysql-test/r/ndb_condition_pushdown.result | 8 +- mysql-test/r/ndb_gis.result | 8 +- mysql-test/r/range.result | 32 +-- mysql-test/r/row.result | 4 +- mysql-test/r/select.result | 32 +-- mysql-test/r/ssl.result | 4 +- mysql-test/r/ssl_compress.result | 4 +- mysql-test/r/subselect.result | 8 +- mysql-test/r/subselect3.result | 4 +- mysql-test/r/union.result | 4 +- mysql-test/r/view.result | 4 +- 30 files changed, 370 insertions(+), 370 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/archive_gis.result b/mysql-test/r/archive_gis.result index 71eeb063d59..901f8a9acc2 100644 --- a/mysql-test/r/archive_gis.result +++ b/mysql-test/r/archive_gis.result @@ -402,8 +402,8 @@ 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; Using join cache -1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 +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 Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,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/r/compress.result b/mysql-test/r/compress.result index e46b56f4215..68206c0dc0e 100644 --- a/mysql-test/r/compress.result +++ b/mysql-test/r/compress.result @@ -1434,8 +1434,8 @@ companynr companynr 41 40 explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary; Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary +1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008; fld1 companynr fld3 period 038008 37 reporters 1008 diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 3abba528164..8601e6890de 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -1454,8 +1454,8 @@ insert into t1 values ('123'), ('456'); explain select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE Y ALL NULL NULL NULL NULL 2 Using temporary; Using filesort; Using join cache -1 SIMPLE Z ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE Y ALL NULL NULL NULL NULL 2 Using temporary; Using filesort +1 SIMPLE Z ALL NULL NULL NULL NULL 2 Using where; Using join buffer select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1; substr(Z.a,-1) a 3 123 diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 750d542d14d..7da82ada121 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -57,8 +57,8 @@ a b a b 3 c 3 c explain select * from t1 as x1, (select * from t1) as x2; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY x1 ALL NULL NULL NULL NULL 4 Using join cache -1 PRIMARY ALL NULL NULL NULL NULL 4 +1 PRIMARY x1 ALL NULL NULL NULL NULL 4 +1 PRIMARY ALL NULL NULL NULL NULL 4 Using join buffer 2 DERIVED t1 ALL NULL NULL NULL NULL 4 drop table if exists t2,t3; select * from (select 1) as a; @@ -188,14 +188,14 @@ pla_id test 105 3 explain SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY m2 ALL NULL NULL NULL NULL 9 Using join cache -1 PRIMARY ALL NULL NULL NULL NULL 6 Using where +1 PRIMARY m2 ALL NULL NULL NULL NULL 9 +1 PRIMARY ALL NULL NULL NULL NULL 6 Using where; Using join buffer 2 DERIVED mp ALL NULL NULL NULL NULL 9 Using temporary; Using filesort 2 DERIVED m1 eq_ref PRIMARY PRIMARY 3 test.mp.mat_id 1 explain SELECT STRAIGHT_JOIN d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY m2 ALL NULL NULL NULL NULL 9 Using join cache -1 PRIMARY ALL NULL NULL NULL NULL 6 Using where +1 PRIMARY m2 ALL NULL NULL NULL NULL 9 +1 PRIMARY ALL NULL NULL NULL NULL 6 Using where; Using join buffer 2 DERIVED mp ALL NULL NULL NULL NULL 9 Using temporary; Using filesort 2 DERIVED m1 eq_ref PRIMARY PRIMARY 3 test.mp.mat_id 1 drop table t1,t2; @@ -245,8 +245,8 @@ a a 2 2 explain select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY ALL NULL NULL NULL NULL 2 Using join cache -1 PRIMARY ALL NULL NULL NULL NULL 2 +1 PRIMARY ALL NULL NULL NULL NULL 2 +1 PRIMARY ALL NULL NULL NULL NULL 2 Using join buffer 4 DERIVED t1 ALL NULL NULL NULL NULL 2 5 UNION t1 ALL NULL NULL NULL NULL 2 NULL UNION RESULT ALL NULL NULL NULL NULL NULL @@ -312,8 +312,8 @@ b 3.5000 explain SELECT s.name, AVG(s.val) AS median FROM (SELECT x.name, x.val FROM t1 x, t1 y WHERE x.name=y.name GROUP BY x.name, x.val HAVING SUM(y.val <= x.val) >= COUNT(*)/2 AND SUM(y.val >= x.val) >= COUNT(*)/2) AS s GROUP BY s.name; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY ALL NULL NULL NULL NULL 3 Using temporary; Using filesort -2 DERIVED x ALL NULL NULL NULL NULL 17 Using temporary; Using filesort; Using join cache -2 DERIVED y ALL NULL NULL NULL NULL 17 Using where +2 DERIVED x ALL NULL NULL NULL NULL 17 Using temporary; Using filesort +2 DERIVED y ALL NULL NULL NULL NULL 17 Using where; Using join buffer drop table t1; create table t2 (a int, b int, primary key (a)); insert into t2 values (1,7),(2,7); diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index 3419ce150eb..002dbc6ccb5 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -174,8 +174,8 @@ INSERT INTO t3 VALUES (1,'1'),(2,'2'),(1,'1'),(2,'2'); explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4 Using temporary -1 SIMPLE t3 ref a a 5 test.t1.b 2 Using where; Using index; Using join cache -1 SIMPLE t2 index a a 4 NULL 5 Using where; Using index; Distinct +1 SIMPLE t3 ref a a 5 test.t1.b 2 Using where; Using index +1 SIMPLE t2 index a a 4 NULL 5 Using where; Using index; Distinct; Using join buffer SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a; a 1 @@ -299,12 +299,12 @@ WHERE ((t1.id=j_lj_t2.id AND t2_lj.id IS NULL) OR (t1.id=t2.id AND t2.idx=2)) AND ((t1.id=j_lj_t3.id AND t3_lj.id IS NULL) OR (t1.id=t3.id AND t3.idx=2)); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index id id 4 NULL 2 Using index; Using temporary; Using join cache -1 SIMPLE t2 index id id 8 NULL 1 Using index; Distinct; Using join cache -1 SIMPLE t3 index id id 8 NULL 1 Using index; Distinct; Using join cache -1 SIMPLE j_lj_t2 index id id 4 NULL 2 Using where; Using index; Distinct -1 SIMPLE t2_lj ref id id 4 test.j_lj_t2.id 1 Using where; Using index; Distinct; Using join cache -1 SIMPLE j_lj_t3 index id id 4 NULL 2 Using where; Using index; Distinct +1 SIMPLE t1 index id id 4 NULL 2 Using index; Using temporary +1 SIMPLE t2 index id id 8 NULL 1 Using index; Distinct; Using join buffer +1 SIMPLE t3 index id id 8 NULL 1 Using index; Distinct; Using join buffer +1 SIMPLE j_lj_t2 index id id 4 NULL 2 Using where; Using index; Distinct; Using join buffer +1 SIMPLE t2_lj ref id id 4 test.j_lj_t2.id 1 Using where; Using index; Distinct +1 SIMPLE j_lj_t3 index id id 4 NULL 2 Using where; Using index; Distinct; Using join buffer 1 SIMPLE t3_lj ref id id 4 test.j_lj_t3.id 1 Using where; Using index; Distinct SELECT DISTINCT t1.id @@ -514,8 +514,8 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 EXPLAIN SELECT DISTINCT t1_1.a, t1_1.b FROM t1 t1_1, t1 t1_2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1_1 ALL NULL NULL NULL NULL 3 Using temporary; Using join cache -1 SIMPLE t1_2 index NULL PRIMARY 4 NULL 3 Using index; Distinct +1 SIMPLE t1_1 ALL NULL NULL NULL NULL 3 Using temporary +1 SIMPLE t1_2 index NULL PRIMARY 4 NULL 3 Using index; Distinct; Using join buffer EXPLAIN SELECT DISTINCT t1_1.a, t1_1.b FROM t1 t1_1, t1 t1_2 WHERE t1_1.a = t1_2.a; id select_type table type possible_keys key key_len ref rows Extra diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index 1f640dec0a4..fce01ffd171 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -613,8 +613,8 @@ id select_type table type possible_keys key key_len ref rows Extra explain select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'MIN' and t2.a3 > 'CA'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range k1 k1 7 NULL 1 Using where; Using index; Using join cache -1 SIMPLE t2 range k1 k1 3 NULL 4 Using where; Using index +1 SIMPLE t1 range k1 k1 7 NULL 1 Using where; Using index +1 SIMPLE t2 range k1 k1 3 NULL 4 Using where; Using index; Using join buffer explain select min(a4 - 0.01) from t1; id select_type table type possible_keys key key_len ref rows Extra @@ -650,8 +650,8 @@ id select_type table type possible_keys key key_len ref rows Extra explain select concat(min(t1.a1),min(t2.a4)) from t1, t2 where t2.a4 <> 'AME'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range k2 k2 4 NULL 6 Using where; Using index; Using join cache -1 SIMPLE t1 index NULL PRIMARY 3 NULL 15 Using index +1 SIMPLE t2 range k2 k2 4 NULL 6 Using where; Using index +1 SIMPLE t1 index NULL PRIMARY 3 NULL 15 Using index; Using join buffer drop table t1, t2; create table t1 (a char(10)); insert into t1 values ('a'),('b'),('c'); diff --git a/mysql-test/r/func_group_innodb.result b/mysql-test/r/func_group_innodb.result index dba546a72de..908e85c1652 100644 --- a/mysql-test/r/func_group_innodb.result +++ b/mysql-test/r/func_group_innodb.result @@ -78,8 +78,8 @@ min(7) 7 explain select min(7) from t2i join t1i; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join cache -1 SIMPLE t1i ALL NULL NULL NULL NULL 1 +1 SIMPLE t2i ALL NULL NULL NULL NULL 1 +1 SIMPLE t1i ALL NULL NULL NULL NULL 1 Using join buffer select min(7) from t2i join t1i; min(7) NULL @@ -94,8 +94,8 @@ max(7) 7 explain select max(7) from t2i join t1i; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join cache -1 SIMPLE t1i ALL NULL NULL NULL NULL 1 +1 SIMPLE t2i ALL NULL NULL NULL NULL 1 +1 SIMPLE t1i ALL NULL NULL NULL NULL 1 Using join buffer select max(7) from t2i join t1i; max(7) NULL diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index 62486936e02..b50eb40182d 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -394,8 +394,8 @@ 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; Using join cache -1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 +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 Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,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/r/greedy_optimizer.result b/mysql-test/r/greedy_optimizer.result index ebd2468c9af..9e8c66722e3 100644 --- a/mysql-test/r/greedy_optimizer.result +++ b/mysql-test/r/greedy_optimizer.result @@ -120,72 +120,72 @@ select @@optimizer_search_depth; 63 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; Variable_name Value @@ -200,72 +200,72 @@ select @@optimizer_search_depth; 0 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using join buffer 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 289.418727 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using join buffer 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 289.418727 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; Variable_name Value Last_query_cost 289.418727 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; Variable_name Value @@ -276,24 +276,24 @@ select @@optimizer_search_depth; 1 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; Variable_name Value @@ -303,10 +303,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index 1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index -1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index; Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 @@ -315,10 +315,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index 1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index -1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index; Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 @@ -327,10 +327,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where -1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where; Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 @@ -339,10 +339,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where -1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where; Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 @@ -352,72 +352,72 @@ select @@optimizer_search_depth; 62 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using join buffer 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 289.418727 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using join buffer 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 289.418727 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; Variable_name Value Last_query_cost 289.418727 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; Variable_name Value @@ -432,72 +432,72 @@ select @@optimizer_search_depth; 0 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; Variable_name Value @@ -508,24 +508,24 @@ select @@optimizer_search_depth; 1 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; Variable_name Value @@ -535,10 +535,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index 1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index -1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index; Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 @@ -547,10 +547,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index 1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index -1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index; Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 @@ -559,10 +559,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where -1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where; Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 @@ -571,10 +571,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where -1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where; Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 @@ -584,72 +584,72 @@ select @@optimizer_search_depth; 62 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join buffer +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join buffer +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where; Using join buffer 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; Variable_name Value diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 807986c5f4e..e3cd90b9b3d 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -536,12 +536,12 @@ a b 1 1 explain select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort; Using join cache -1 SIMPLE t2 ALL a NULL NULL NULL 4 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort +1 SIMPLE t2 ALL a NULL NULL NULL 4 Using where; Using join buffer explain select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b ORDER BY NULL; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using join cache -1 SIMPLE t2 ALL a NULL NULL NULL 4 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary +1 SIMPLE t2 ALL a NULL NULL NULL 4 Using where; Using join buffer drop table t1,t2; create table t1 (a int, b int); insert into t1 values (1, 4),(10, 40),(1, 4),(10, 43),(1, 4),(10, 41),(1, 4),(10, 43),(1, 4); diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result index bc07b933895..fcd6c92585e 100644 --- a/mysql-test/r/group_min_max.result +++ b/mysql-test/r/group_min_max.result @@ -2266,8 +2266,8 @@ EXPLAIN SELECT 1 FROM t1 AS t1_outer1 JOIN t1 AS t1_outer2 ON t1_outer1.a = (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) AND t1_outer1.b = t1_outer2.b; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1_outer1 ref a a 5 const 1 Using where; Using index; Using join cache -1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using where; Using index +1 PRIMARY t1_outer1 ref a a 5 const 1 Using where; Using index +1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using where; Using index; Using join buffer 2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by EXPLAIN SELECT (SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x FROM t1 AS t1_outer) x2 FROM t1 AS t1_outer2; diff --git a/mysql-test/r/index_merge_myisam.result b/mysql-test/r/index_merge_myisam.result index e8a37257782..f135d849f76 100644 --- a/mysql-test/r/index_merge_myisam.result +++ b/mysql-test/r/index_merge_myisam.result @@ -270,8 +270,8 @@ id select_type table type possible_keys key key_len ref rows Extra explain select * from t0,t1 where t0.key1 = 5 and (t1.key1 = t0.key1 or t1.key8 = t0.key1); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t0 ref i1 i1 4 const 1 Using join cache -1 SIMPLE t1 index_merge i1,i8 i1,i8 4,4 NULL 2 Using union(i1,i8); Using where +1 SIMPLE t0 ref i1 i1 4 const 1 +1 SIMPLE t1 index_merge i1,i8 i1,i8 4,4 NULL 2 Using union(i1,i8); Using where; Using join buffer explain select * from t0,t1 where t0.key1 < 3 and (t1.key1 = t0.key1 or t1.key8 = t0.key1); id select_type table type possible_keys key key_len ref rows Extra @@ -347,8 +347,8 @@ from t0 as A force index(i1,i2), t0 as B force index (i1,i2) where (A.key1 < 500000 or A.key2 < 3) and (B.key1 < 500000 or B.key2 < 3); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where; Using join cache -1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where +1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where +1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where; Using join buffer select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) from t0 as A force index(i1,i2), t0 as B force index (i1,i2) where (A.key1 < 500000 or A.key2 < 3) @@ -361,8 +361,8 @@ from t0 as A force index(i1,i2), t0 as B force index (i1,i2) where (A.key1 = 1 or A.key2 = 1) and (B.key1 = 1 or B.key2 = 1); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where; Using join cache -1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where +1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where +1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where; Using join buffer select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) from t0 as A force index(i1,i2), t0 as B force index (i1,i2) where (A.key1 = 1 or A.key2 = 1) @@ -376,8 +376,8 @@ from t0 as A, t0 as B where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7 = 1 or A.key8=1) and (B.key1 = 1 and B.key2 = 1 and B.key3 = 1 and B.key4=1 and B.key5=1 and B.key6=1 and B.key7 = 1 or B.key8=1); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE A index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL # Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where; Using join cache -1 SIMPLE B index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL # Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where +1 SIMPLE A index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL # Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where +1 SIMPLE B index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL # Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where; Using join buffer select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) from t0 as A, t0 as B where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7 = 1 or A.key8=1) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 709246edcf1..745ec2e2248 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -289,8 +289,8 @@ explain select a.ROUTINE_NAME from information_schema.ROUTINES a, information_schema.SCHEMATA b where a.ROUTINE_SCHEMA = b.SCHEMA_NAME; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE # ALL NULL NULL NULL NULL 2 Using join cache -1 SIMPLE # ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE # ALL NULL NULL NULL NULL 2 +1 SIMPLE # ALL NULL NULL NULL NULL 2 Using where; Using join buffer select a.ROUTINE_NAME, b.name from information_schema.ROUTINES a, mysql.proc b where a.ROUTINE_NAME = convert(b.name using utf8) order by 1; ROUTINE_NAME name diff --git a/mysql-test/r/innodb_gis.result b/mysql-test/r/innodb_gis.result index 945eca234bb..7f54a78087b 100644 --- a/mysql-test/r/innodb_gis.result +++ b/mysql-test/r/innodb_gis.result @@ -402,8 +402,8 @@ 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; Using join cache -1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 +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 Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,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/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index fb3bac44c61..f07f51dab18 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -184,8 +184,8 @@ min(7) 7 explain select min(7) from t2i join t1i; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join cache -1 SIMPLE t1i ALL NULL NULL NULL NULL 1 +1 SIMPLE t2i ALL NULL NULL NULL NULL 1 +1 SIMPLE t1i ALL NULL NULL NULL NULL 1 Using join buffer select min(7) from t2i join t1i; min(7) NULL @@ -200,8 +200,8 @@ max(7) 7 explain select max(7) from t2i join t1i; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join cache -1 SIMPLE t1i ALL NULL NULL NULL NULL 1 +1 SIMPLE t2i ALL NULL NULL NULL NULL 1 +1 SIMPLE t1i ALL NULL NULL NULL NULL 1 Using join buffer select max(7) from t2i join t1i; max(7) NULL diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result index 86c206195b1..fcb141a3510 100644 --- a/mysql-test/r/join.result +++ b/mysql-test/r/join.result @@ -403,8 +403,8 @@ EXPLAIN SELECT STRAIGHT_JOIN t2.e FROM t1,t2 WHERE t2.d=1 AND t1.b=t2.e ORDER BY t1.b, t1.c; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 32 Using temporary; Using filesort; Using join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 16 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 32 Using temporary; Using filesort +1 SIMPLE t2 ALL NULL NULL NULL NULL 16 Using where; Using join buffer SELECT STRAIGHT_JOIN t2.e FROM t1,t2 WHERE t2.d=1 AND t1.b=t2.e ORDER BY t1.b, t1.c; e diff --git a/mysql-test/r/join_nested.result b/mysql-test/r/join_nested.result index d080b1a2a46..2dd9af8719e 100644 --- a/mysql-test/r/join_nested.result +++ b/mysql-test/r/join_nested.result @@ -228,8 +228,8 @@ LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using join cache -1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 +1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 +1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using join buffer 1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Warnings: Note 1003 select `test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b` from `test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t7`.`b` = `test`.`t8`.`b`) and (`test`.`t6`.`b` < 10))) where 1 @@ -543,8 +543,8 @@ WHERE t0.a=1 AND t0.b=t1.b AND (t2.a >= 4 OR t2.c IS NULL); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 @@ -638,16 +638,16 @@ t0.b=t1.b AND (t8.b=t9.b OR t8.c IS NULL) AND (t9.a=1); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t5 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where -1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join cache -1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where +1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer Warnings: Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`))) SELECT t9.a,t9.b @@ -835,8 +835,8 @@ t2 ON t3.a=1 AND t2.b=t4.b WHERE t1.a <= 2; 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 join cache -1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using join buffer 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Warnings: @@ -849,8 +849,8 @@ LEFT JOIN (t1,t2) ON t3.a=1 AND t3.b=t2.b AND t2.b=t4.b; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using join cache -1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 +1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using join buffer 1 SIMPLE t2 ref idx_b idx_b 5 test.t3.b 2 100.00 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Warnings: @@ -905,16 +905,16 @@ t0.b=t1.b AND (t8.b=t9.b OR t8.c IS NULL) AND (t9.a=1); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t5 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where -1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join cache -1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where +1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer Warnings: Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`))) CREATE INDEX idx_b ON t4(b); @@ -955,16 +955,16 @@ t0.b=t1.b AND (t8.b=t9.b OR t8.c IS NULL) AND (t9.a=1); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 100.00 Using where 1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where 1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where -1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join cache -1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where +1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer Warnings: Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`))) CREATE INDEX idx_b ON t8(b); @@ -1004,16 +1004,16 @@ t0.b=t1.b AND (t8.b=t9.b OR t8.c IS NULL) AND (t9.a=1); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 100.00 Using where 1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where 1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where -1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where; Using join cache -1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where +1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer Warnings: Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`))) CREATE INDEX idx_b ON t1(b); @@ -1062,8 +1062,8 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where 1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where -1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where; Using join cache -1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where +1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer Warnings: Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`))) SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b, diff --git a/mysql-test/r/key_diff.result b/mysql-test/r/key_diff.result index 35aad39edbf..9d26bee4557 100644 --- a/mysql-test/r/key_diff.result +++ b/mysql-test/r/key_diff.result @@ -35,8 +35,8 @@ D E a a a a a a explain select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL a NULL NULL NULL 5 Using join cache -1 SIMPLE t2 ALL b NULL NULL NULL 5 Using where +1 SIMPLE t1 ALL a NULL NULL NULL 5 +1 SIMPLE t2 ALL b NULL NULL NULL 5 Using where; Using join buffer select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a; a b a b A B a a diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 06ed1430059..73661897ee1 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -345,12 +345,12 @@ t1 1 c_2 1 c A 5 NULL NULL YES BTREE t1 1 c_2 2 a A 5 NULL NULL BTREE 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 Using join cache -1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where +1 SIMPLE t2 ALL a NULL NULL NULL 2 +1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where; Using join buffer 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 Using join cache -1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where +1 SIMPLE t2 ALL a NULL NULL NULL 2 +1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where; Using join buffer 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 @@ -361,8 +361,8 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref b b 5 test.t2.b 1 Using where 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 Using join cache -1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 +1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where; Using join buffer 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 ALL a NULL NULL NULL 5 Using where diff --git a/mysql-test/r/ndb_condition_pushdown.result b/mysql-test/r/ndb_condition_pushdown.result index df281230c9e..8d1dcc4ef18 100644 --- a/mysql-test/r/ndb_condition_pushdown.result +++ b/mysql-test/r/ndb_condition_pushdown.result @@ -1730,8 +1730,8 @@ pk1 attr1 attr2 attr3 attr4 explain select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where with pushed condition; Using temporary; Using filesort; Using join cache -1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where with pushed condition +1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where with pushed condition; Using temporary; Using filesort +1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where with pushed condition; Using join buffer select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; pk1 attr1 attr2 attr3 pk1 attr1 attr2 attr3 attr4 0 0 0 a 0 0 0 0 a @@ -1746,8 +1746,8 @@ pk1 attr1 attr2 attr3 attr4 explain select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 range attr1 attr1 4 NULL # Using where with pushed condition; Using temporary; Using filesort; Using join cache -1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where +1 SIMPLE t4 range attr1 attr1 4 NULL # Using where with pushed condition; Using temporary; Using filesort +1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where; Using join buffer select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4 2 2 9223372036854775804 2 c 2 2 9223372036854775804 2 c diff --git a/mysql-test/r/ndb_gis.result b/mysql-test/r/ndb_gis.result index c01c1673e44..3af7b71d72d 100644 --- a/mysql-test/r/ndb_gis.result +++ b/mysql-test/r/ndb_gis.result @@ -402,8 +402,8 @@ 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; Using join cache -1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 +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 Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,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; @@ -952,8 +952,8 @@ 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; Using join cache -1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 +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 Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,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/r/range.result b/mysql-test/r/range.result index c2cb7426a74..108264b3bf2 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -220,28 +220,28 @@ insert into t1 (x) values (1),(2),(3),(4),(5),(6),(7),(8),(9); update t1 set y=x; explain select * from t1, t1 t2 where t1.y = 8 and t2.x between 7 and t1.y+0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref y y 5 const 1 Using where; Using join cache -1 SIMPLE t2 range x x 5 NULL 2 Using where +1 SIMPLE t1 ref y y 5 const 1 Using where +1 SIMPLE t2 range x x 5 NULL 2 Using where; Using join buffer explain select * from t1, t1 t2 where t1.y = 8 and t2.x >= 7 and t2.x <= t1.y+0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref y y 5 const 1 Using where; Using join cache -1 SIMPLE t2 range x x 5 NULL 2 Using where +1 SIMPLE t1 ref y y 5 const 1 Using where +1 SIMPLE t2 range x x 5 NULL 2 Using where; Using join buffer explain select * from t1, t1 t2 where t1.y = 2 and t2.x between t1.y-1 and t1.y+1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref y y 5 const 1 Using where; Using join cache -1 SIMPLE t2 range x x 5 NULL 3 Using where +1 SIMPLE t1 ref y y 5 const 1 Using where +1 SIMPLE t2 range x x 5 NULL 3 Using where; Using join buffer explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= t1.y-1 and t2.x <= t1.y+1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref y y 5 const 1 Using where; Using join cache -1 SIMPLE t2 range x x 5 NULL 3 Using where +1 SIMPLE t1 ref y y 5 const 1 Using where +1 SIMPLE t2 range x x 5 NULL 3 Using where; Using join buffer explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 0 and t1.y; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref y y 5 const 1 Using where; Using join cache -1 SIMPLE t2 range x x 5 NULL 2 Using where +1 SIMPLE t1 ref y y 5 const 1 Using where +1 SIMPLE t2 range x x 5 NULL 2 Using where; Using join buffer explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 0 and t2.x <= t1.y; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref y y 5 const 1 Using where; Using join cache -1 SIMPLE t2 range x x 5 NULL 2 Using where +1 SIMPLE t1 ref y y 5 const 1 Using where +1 SIMPLE t2 range x x 5 NULL 2 Using where; Using join buffer explain select count(*) from t1 where x in (1); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref x x 5 const 1 Using where; Using index @@ -255,13 +255,13 @@ CREATE TABLE t2 (keya int(11) NOT NULL default '0', KEY j1 (keya)); INSERT INTO t2 VALUES (0),(0),(1),(1),(2),(2); explain select * from t1, t2 where (t1.key1 (`test`.`t1`.`a`,(select 1 AS `Not_used` from `test`.`t2` join `test`.`t3` where ((`test`.`t3`.`a` = `test`.`t2`.`a`) and (((`test`.`t1`.`a`) = `test`.`t2`.`a`) or isnull(`test`.`t2`.`a`))) having (`test`.`t2`.`a`))) AS `t1.a in (select t2.a from t2,t3 where t3.a=t2.a)` from `test`.`t1` drop table t1,t2,t3; @@ -1354,8 +1354,8 @@ a explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index -2 DEPENDENT SUBQUERY t1 ref a a 5 func 1001 100.00 Using where; Using index; Using join cache -2 DEPENDENT SUBQUERY t3 index a a 5 NULL 3 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t1 ref a a 5 func 1001 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t3 index a a 5 NULL 3 100.00 Using where; Using index; Using join buffer Warnings: Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where (`test`.`t2`.`a`,(select 1 AS `Not_used` from `test`.`t1` join `test`.`t3` where ((`test`.`t3`.`a` = `test`.`t1`.`b`) and ((`test`.`t2`.`a`) = `test`.`t1`.`a`)))) insert into t1 values (3,31); diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result index 79ce5bbb3a7..2f3ea31a2a4 100644 --- a/mysql-test/r/subselect3.result +++ b/mysql-test/r/subselect3.result @@ -254,8 +254,8 @@ select a,b, oref, from t2; id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 -2 DEPENDENT SUBQUERY t1 ref_or_null a a 5 func 2 100.00 Using where; Full scan on NULL key; Using join cache -2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 100 100.00 Using where +2 DEPENDENT SUBQUERY t1 ref_or_null a a 5 func 2 100.00 Using where; Full scan on NULL key +2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 100 100.00 Using where; Using join buffer Warnings: Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1 Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`oref` AS `oref`,((`test`.`t2`.`a`,`test`.`t2`.`b`),(select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` join `test`.`t4` where ((`test`.`t1`.`c` = `test`.`t2`.`oref`) and trigcond((((`test`.`t2`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`))) and trigcond((((`test`.`t2`.`b`) = `test`.`t1`.`b`) or isnull(`test`.`t1`.`b`)))) having (trigcond((`test`.`t1`.`a`)) and trigcond((`test`.`t1`.`b`))))) AS `Z` from `test`.`t2` diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index acf237bf125..6fc630ec33c 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -499,8 +499,8 @@ a b explain (select * from t1 where a=1 and b=10) union (select straight_join t1.a,t2.a from t1,t2 where t1.a=t2.a); 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 UNION t1 index PRIMARY PRIMARY 4 NULL 4 Using index; Using join cache -2 UNION t2 index PRIMARY PRIMARY 4 NULL 4 Using where; Using index +2 UNION t1 index PRIMARY PRIMARY 4 NULL 4 Using index +2 UNION t2 index PRIMARY PRIMARY 4 NULL 4 Using where; Using index; Using join buffer NULL UNION RESULT ALL NULL NULL NULL NULL NULL explain (select * from t1 where a=1) union (select * from t1 where b=1); id select_type table type possible_keys key key_len ref rows Extra diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index db488aa4876..21dd5330945 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -2317,8 +2317,8 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref a a 10 const,test.t1.b 2 Using where; Using index EXPLAIN SELECT * FROM v2 WHERE a=1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 5 const 1 Using where; Using index; Using join cache -1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t1 ref a a 5 const 1 Using where; Using index +1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where; Using join buffer DROP VIEW v1,v2; DROP TABLE t1,t2,t3; create table t1 (f1 int); -- cgit v1.2.1 From 4979ed7af878d9d9835a42efec789025145dda92 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 May 2007 00:33:12 +0400 Subject: Bug#28450: The Item_date_add_interval in select list may fail the field type assertion. The bug was introduced by the patch for bug #16377. The "+ INTERVAL" (Item_date_add_interval) function detects its result type by the type of its first argument. But in some cases it returns STRING as the result type. This happens when, for example, the first argument is a DATE represented as string. All this makes the get_datetime_value() function misinterpret such result and return wrong DATE/DATETIME value. To avoid such cases in the fix for #16377 the code that detects correct result field type on the first execution was added to the Item_date_add_interval::get_date() function. Due to this the result field type of the Item_date_add_interval item stored by the send_fields() function differs from item's result field type at the moment when the item is actually sent. It causes an assertion failure. Now the get_datetime_value() detects that the DATE value is returned by some item not only by checking the result field type but also by comparing the returned value with the 100000000L constant - any DATE value should be less than this value. Removed result field type adjusting code from the Item_date_add_interval::get_date() function. sql/item_cmpfunc.cc: Bug#28450: The Item_date_add_interval in select list may fail the field type assertion. Now the get_datetime_value() detects that the DATE value is returned by some item not only by checking the result field type but also by comparing the returned value with the 100000000L constant - any DATE value should be less than this value. mysql-test/r/func_date_add.result: Added a test case for the bug#28450: The Item_date_add_interval in select list may fail the field type assertion. sql/item_timefunc.cc: Bug#28450: The Item_date_add_interval in select list may fail the field type assertion. Removed result field type adjusting code from the Item_date_add_interval::get_date() function. mysql-test/t/func_date_add.test: Added a test case for the bug#28450: The Item_date_add_interval in select list may fail the field type assertion. --- mysql-test/r/func_date_add.result | 11 +++++++++++ mysql-test/t/func_date_add.test | 10 ++++++++++ 2 files changed, 21 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/func_date_add.result b/mysql-test/r/func_date_add.result index ac5709260fd..a7f2383848d 100644 --- a/mysql-test/r/func_date_add.result +++ b/mysql-test/r/func_date_add.result @@ -84,4 +84,15 @@ CAST('2006-09-26' AS DATE) + INTERVAL 1 YEAR SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 WEEK; CAST('2006-09-26' AS DATE) + INTERVAL 1 WEEK 2006-10-03 +create table t1 (a int, b varchar(10)); +insert into t1 values (1, '2001-01-01'),(2, '2002-02-02'); +select '2007-01-01' + interval a day from t1; +'2007-01-01' + interval a day +2007-01-02 +2007-01-03 +select b + interval a day from t1; +b + interval a day +2001-01-02 +2002-02-04 +drop table t1; End of 5.0 tests diff --git a/mysql-test/t/func_date_add.test b/mysql-test/t/func_date_add.test index b575eeececa..fc5a5cb2823 100644 --- a/mysql-test/t/func_date_add.test +++ b/mysql-test/t/func_date_add.test @@ -77,4 +77,14 @@ SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 MONTH; SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 YEAR; SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 WEEK; +# +# Bug#28450: The Item_date_add_interval in select list may fail the field +# type assertion. +# +create table t1 (a int, b varchar(10)); +insert into t1 values (1, '2001-01-01'),(2, '2002-02-02'); +select '2007-01-01' + interval a day from t1; +select b + interval a day from t1; +drop table t1; + --echo End of 5.0 tests -- cgit v1.2.1 From a61d53eb60b1d26aeb0f88fdc77a3854bbae0be1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 May 2007 09:55:38 +0300 Subject: Bug #28492: subselect returns LONG in >5.0.24a and LONGLONG in <=5.0.24a Integer values with 10 digits may or may not fit into an int column (e.g. 2147483647 vs 6147483647). Thus when creating a temp table column for such an int we must use bigint instead. Fixed to use bigint. Also subsituted a "magic number" with a named constant. mysql-test/r/analyse.result: Bug #28492: Adjusted the results after having fixed the bug mysql-test/r/metadata.result: Bug #28492: test case mysql-test/r/olap.result: Bug #28492: Adjusted the results after having fixed the bug mysql-test/r/sp.result: Bug #28492: Adjusted the results after having fixed the bug mysql-test/r/view.result: Bug #28492: Adjusted the results after having fixed the bug mysql-test/t/metadata.test: Bug #28492: test case sql/field.h: Bug #28492: Replaced a magic number with a constant sql/sql_select.cc: Bug #28492: Treat integers with 10 and more digits as bigint. --- mysql-test/r/analyse.result | 24 ++++++++++++------------ mysql-test/r/metadata.result | 11 +++++++++++ mysql-test/r/olap.result | 4 ++-- mysql-test/r/sp.result | 2 +- mysql-test/r/view.result | 2 +- mysql-test/t/metadata.test | 11 +++++++++++ 6 files changed, 38 insertions(+), 16 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/analyse.result b/mysql-test/r/analyse.result index 0ecc462fb70..49722d5b0ab 100644 --- a/mysql-test/r/analyse.result +++ b/mysql-test/r/analyse.result @@ -39,10 +39,10 @@ t2 CREATE TABLE `t2` ( `Field_name` varbinary(255) NOT NULL default '', `Min_value` varbinary(255) default NULL, `Max_value` varbinary(255) default NULL, - `Min_length` int(11) NOT NULL default '0', - `Max_length` int(11) NOT NULL default '0', - `Empties_or_zeros` int(11) NOT NULL default '0', - `Nulls` int(11) NOT NULL default '0', + `Min_length` bigint(11) NOT NULL default '0', + `Max_length` bigint(11) NOT NULL default '0', + `Empties_or_zeros` bigint(11) NOT NULL default '0', + `Nulls` bigint(11) NOT NULL default '0', `Avg_value_or_avg_length` varbinary(255) NOT NULL default '', `Std` varbinary(255) default NULL, `Optimal_fieldtype` varbinary(64) NOT NULL default '' @@ -58,10 +58,10 @@ t2 CREATE TABLE `t2` ( `Field_name` varbinary(255) NOT NULL default '', `Min_value` varbinary(255) default NULL, `Max_value` varbinary(255) default NULL, - `Min_length` int(11) NOT NULL default '0', - `Max_length` int(11) NOT NULL default '0', - `Empties_or_zeros` int(11) NOT NULL default '0', - `Nulls` int(11) NOT NULL default '0', + `Min_length` bigint(11) NOT NULL default '0', + `Max_length` bigint(11) NOT NULL default '0', + `Empties_or_zeros` bigint(11) NOT NULL default '0', + `Nulls` bigint(11) NOT NULL default '0', `Avg_value_or_avg_length` varbinary(255) NOT NULL default '', `Std` varbinary(255) default NULL, `Optimal_fieldtype` varbinary(64) NOT NULL default '' @@ -81,10 +81,10 @@ t2 CREATE TABLE `t2` ( `Field_name` varbinary(255) NOT NULL default '', `Min_value` varbinary(255) default NULL, `Max_value` varbinary(255) default NULL, - `Min_length` int(11) NOT NULL default '0', - `Max_length` int(11) NOT NULL default '0', - `Empties_or_zeros` int(11) NOT NULL default '0', - `Nulls` int(11) NOT NULL default '0', + `Min_length` bigint(11) NOT NULL default '0', + `Max_length` bigint(11) NOT NULL default '0', + `Empties_or_zeros` bigint(11) NOT NULL default '0', + `Nulls` bigint(11) NOT NULL default '0', `Avg_value_or_avg_length` varbinary(255) NOT NULL default '', `Std` varbinary(255) default NULL, `Optimal_fieldtype` varbinary(64) NOT NULL default '' diff --git a/mysql-test/r/metadata.result b/mysql-test/r/metadata.result index 34e961395c4..d33fb038b79 100644 --- a/mysql-test/r/metadata.result +++ b/mysql-test/r/metadata.result @@ -130,3 +130,14 @@ def v3 renamed 8 12 0 Y 32896 0 63 renamed drop table t1; drop view v1,v2,v3; +select a.* from (select 2147483648 as v_large) a; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def a v_large v_large 8 10 10 N 32769 0 63 +v_large +2147483648 +select a.* from (select 214748364 as v_small) a; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def a v_small v_small 3 9 9 N 32769 0 63 +v_small +214748364 +End of 5.0 tests diff --git a/mysql-test/r/olap.result b/mysql-test/r/olap.result index b1c29a5aadb..4a54b17316d 100644 --- a/mysql-test/r/olap.result +++ b/mysql-test/r/olap.result @@ -696,8 +696,8 @@ CREATE VIEW v1 AS SELECT a, LENGTH(a), COUNT(*) FROM t1 GROUP BY a WITH ROLLUP; DESC v1; Field Type Null Key Default Extra -a int(11) YES 0 -LENGTH(a) int(10) YES NULL +a bigint(11) YES NULL +LENGTH(a) bigint(10) YES NULL COUNT(*) bigint(21) NO 0 SELECT * FROM v1; a LENGTH(a) COUNT(*) diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index b5b79af031e..4514bae1494 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -4909,7 +4909,7 @@ create table t3 as select * from v1| show create table t3| Table Create Table t3 CREATE TABLE `t3` ( - `j` int(11) default NULL + `j` bigint(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t3| j diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 13239af41ad..f333e7db474 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -2779,7 +2779,7 @@ CREATE TABLE t1 (i int, j int); CREATE VIEW v1 AS SELECT COALESCE(i,j) FROM t1; DESCRIBE v1; Field Type Null Key Default Extra -COALESCE(i,j) int(11) YES NULL +COALESCE(i,j) bigint(11) YES NULL CREATE TABLE t2 SELECT COALESCE(i,j) FROM t1; DESCRIBE t2; Field Type Null Key Default Extra diff --git a/mysql-test/t/metadata.test b/mysql-test/t/metadata.test index a6ebfdc14c1..df4acec2021 100644 --- a/mysql-test/t/metadata.test +++ b/mysql-test/t/metadata.test @@ -81,3 +81,14 @@ drop view v1,v2,v3; --disable_metadata # End of 4.1 tests + +# +# Bug #28492: subselect returns LONG in >5.0.24a and LONGLONG in <=5.0.24a +# +--enable_metadata +select a.* from (select 2147483648 as v_large) a; +select a.* from (select 214748364 as v_small) a; +--disable_metadata + + +--echo End of 5.0 tests -- cgit v1.2.1 From 4334d68017f465147f060c7a99923de127619a3d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 May 2007 12:21:39 +0500 Subject: Fixed bug #28716. The result of the CHECK OPTION condition evaluation over an updated record and records of merged tables was arbitrary and dependant on the order of records in the merged tables during the execution of SELECT statement. The CHECK OPTION expression was evaluated over expired record buffers (with arbitrary data in the fields). Rowids of tables used in the CHECK OPTION expression were added to temporary table rows. The multi_update::do_updates() method was modified to restore necessary record buffers before evaluation of the CHECK OPTION condition. sql/sql_class.h: Fixed bug #29716. The multi_update::unupdatable_check_opt_tables variable has been added. sql/sql_update.cc: Fixed bug #29716. Rowids of tables used in the CHECK OPTION expression were added to temporary table rows. The multi_update::do_updates() method was modified to restore necessary record buffers before evaluation of the CHECK OPTION condition. mysql-test/t/view.test: Updated test case for bug #28716. mysql-test/r/view.result: Updated test case for bug #28716. --- mysql-test/r/view.result | 17 +++++++++++++++++ mysql-test/t/view.test | 16 ++++++++++++++++ 2 files changed, 33 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 8d9d802949d..998bca751d0 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3367,4 +3367,21 @@ SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(1.23456789 as decimal(8,0)) AS `col` DROP VIEW v1; +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (b INT, c INT DEFAULT 0); +INSERT INTO t1 (a) VALUES (1), (2); +INSERT INTO t2 (b) VALUES (1), (2); +CREATE VIEW v1 AS SELECT t2.b,t2.c FROM t1, t2 +WHERE t1.a=t2.b AND t2.b < 3 WITH CHECK OPTION; +SELECT * FROM v1; +b c +1 0 +2 0 +UPDATE v1 SET c=1 WHERE b=1; +SELECT * FROM v1; +b c +1 1 +2 0 +DROP VIEW v1; +DROP TABLE t1,t2; End of 5.0 tests. diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 3275ba0a687..422c0e4f76b 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3233,4 +3233,20 @@ CREATE VIEW v1 AS SELECT CAST(1.23456789 AS DECIMAL(8,0)) AS col; SHOW CREATE VIEW v1; DROP VIEW v1; +# +# Bug #28716: CHECK OPTION expression is evaluated over expired record buffers +# when VIEW is updated via temporary tables +# +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (b INT, c INT DEFAULT 0); +INSERT INTO t1 (a) VALUES (1), (2); +INSERT INTO t2 (b) VALUES (1), (2); +CREATE VIEW v1 AS SELECT t2.b,t2.c FROM t1, t2 + WHERE t1.a=t2.b AND t2.b < 3 WITH CHECK OPTION; +SELECT * FROM v1; +UPDATE v1 SET c=1 WHERE b=1; +SELECT * FROM v1; +DROP VIEW v1; +DROP TABLE t1,t2; + --echo End of 5.0 tests. -- cgit v1.2.1 From 144bc40d9fef8fa2991e04b1a26cfbcd8a682611 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 May 2007 17:04:04 +0500 Subject: backport of Bug#11491 Misleading error message if not NULL column set to NULL, SQL mode TRADITIONAL mysql-test/r/auto_increment.result: result fix mysql-test/r/create.result: result fix mysql-test/r/insert.result: result fix mysql-test/r/insert_select.result: result fix mysql-test/r/insert_update.result: result fix mysql-test/r/key.result: result fix mysql-test/r/null.result: result fix mysql-test/r/null_key.result: result fix mysql-test/r/ps_2myisam.result: result fix mysql-test/r/ps_3innodb.result: result fix mysql-test/r/ps_4heap.result: result fix mysql-test/r/ps_5merge.result: result fix mysql-test/r/ps_6bdb.result: result fix mysql-test/r/ps_7ndb.result: result fix mysql-test/r/strict.result: result fix mysql-test/r/view.result: result fix mysql-test/r/warnings.result: result fix mysql-test/t/strict.test: test fix --- mysql-test/r/auto_increment.result | 4 ++-- mysql-test/r/create.result | 2 +- mysql-test/r/insert.result | 2 +- mysql-test/r/insert_select.result | 4 ++-- mysql-test/r/insert_update.result | 4 ++-- mysql-test/r/key.result | 4 ++-- mysql-test/r/null.result | 18 +++++++++--------- mysql-test/r/null_key.result | 2 +- mysql-test/r/ps_2myisam.result | 2 +- mysql-test/r/ps_3innodb.result | 2 +- mysql-test/r/ps_4heap.result | 2 +- mysql-test/r/ps_5merge.result | 4 ++-- mysql-test/r/ps_6bdb.result | 2 +- mysql-test/r/ps_7ndb.result | 2 +- mysql-test/r/strict.result | 18 +++++++++--------- mysql-test/r/view.result | 2 +- mysql-test/r/warnings.result | 6 +++--- mysql-test/t/strict.test | 8 ++++---- 18 files changed, 44 insertions(+), 44 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result index d0058118e4c..90ba00e1019 100644 --- a/mysql-test/r/auto_increment.result +++ b/mysql-test/r/auto_increment.result @@ -232,7 +232,7 @@ a b delete from t1 where a=0; update t1 set a=NULL where b=6; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 4 +Warning 1048 Column 'a' cannot be null update t1 set a=300 where b=7; SET SQL_MODE=''; insert into t1(a,b)values(NULL,8); @@ -274,7 +274,7 @@ a b delete from t1 where a=0; update t1 set a=NULL where b=13; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 9 +Warning 1048 Column 'a' cannot be null update t1 set a=500 where b=14; select * from t1 order by b; a b diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index e1262c7d2c2..c1f72ce317c 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -13,7 +13,7 @@ Warnings: Note 1050 Table 't1' already exists insert into t1 values (""),(null); Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'b' at row 2 +Warning 1048 Column 'b' cannot be null select * from t1; b diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index fa6e23d09f9..8a0a3ba848c 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -63,7 +63,7 @@ insert into t1 values(NULL); ERROR 23000: Column 'id' cannot be null insert into t1 values (1), (NULL), (2); Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'id' at row 2 +Warning 1048 Column 'id' cannot be null select * from t1; id 1 diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index a96add7eb9a..08a865e0b94 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -606,8 +606,8 @@ NULL 2 100 create table t2(No int not null, Field int not null, Count int not null); insert into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'No' at row 1 -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'No' at row 2 +Warning 1048 Column 'No' cannot be null +Warning 1048 Column 'No' cannot be null select * from t2; No Field Count 0 1 100 diff --git a/mysql-test/r/insert_update.result b/mysql-test/r/insert_update.result index 375961292a3..b3bca7517f3 100644 --- a/mysql-test/r/insert_update.result +++ b/mysql-test/r/insert_update.result @@ -378,7 +378,7 @@ id c1 cnt INSERT IGNORE INTO t1 (id,c1) SELECT 1,NULL ON DUPLICATE KEY UPDATE c1=NULL, cnt=cnt+1; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c1' at row 1 +Warning 1048 Column 'c1' cannot be null Error 1048 Column 'c1' cannot be null SELECT * FROM t1; id c1 cnt @@ -386,7 +386,7 @@ id c1 cnt INSERT IGNORE INTO t1 (id,c1) SELECT * FROM t2 ON DUPLICATE KEY UPDATE c1=NULL, cnt=cnt+1; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c1' at row 1 +Warning 1048 Column 'c1' cannot be null Error 1048 Column 'c1' cannot be null SELECT * FROM t1; id c1 cnt diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result index 3abc95ec3bf..5a707770ab8 100644 --- a/mysql-test/r/key.result +++ b/mysql-test/r/key.result @@ -159,8 +159,8 @@ CREATE TABLE t1 (c CHAR(10) NOT NULL,i INT NOT NULL AUTO_INCREMENT, UNIQUE (c,i)); INSERT INTO t1 (c) VALUES (NULL),(NULL); Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c' at row 1 -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c' at row 2 +Warning 1048 Column 'c' cannot be null +Warning 1048 Column 'c' cannot be null SELECT * FROM t1; c i 1 diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index daedfa50b80..c33adee76b2 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -97,39 +97,39 @@ Warnings: Warning 1265 Data truncated for column 'd' at row 1 UPDATE t1 SET d=NULL; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'd' at row 1 +Warning 1048 Column 'd' cannot be null INSERT INTO t1 (a) values (null); ERROR 23000: Column 'a' cannot be null INSERT INTO t1 (a) values (1/null); ERROR 23000: Column 'a' cannot be null INSERT INTO t1 (a) values (null),(null); Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1 -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 2 +Warning 1048 Column 'a' cannot be null +Warning 1048 Column 'a' cannot be null INSERT INTO t1 (b) values (null); ERROR 23000: Column 'b' cannot be null INSERT INTO t1 (b) values (1/null); ERROR 23000: Column 'b' cannot be null INSERT INTO t1 (b) values (null),(null); Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'b' at row 1 -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'b' at row 2 +Warning 1048 Column 'b' cannot be null +Warning 1048 Column 'b' cannot be null INSERT INTO t1 (c) values (null); ERROR 23000: Column 'c' cannot be null INSERT INTO t1 (c) values (1/null); ERROR 23000: Column 'c' cannot be null INSERT INTO t1 (c) values (null),(null); Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c' at row 1 -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c' at row 2 +Warning 1048 Column 'c' cannot be null +Warning 1048 Column 'c' cannot be null INSERT INTO t1 (d) values (null); ERROR 23000: Column 'd' cannot be null INSERT INTO t1 (d) values (1/null); ERROR 23000: Column 'd' cannot be null INSERT INTO t1 (d) values (null),(null); Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'd' at row 1 -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'd' at row 2 +Warning 1048 Column 'd' cannot be null +Warning 1048 Column 'd' cannot be null select * from t1; a b c d 0 0000-00-00 00:00:00 0 diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result index 0b4ed15f659..8a440284c53 100644 --- a/mysql-test/r/null_key.result +++ b/mysql-test/r/null_key.result @@ -342,7 +342,7 @@ index (id2) ); insert into t1 values(null,null),(1,1); Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'id2' at row 1 +Warning 1048 Column 'id2' cannot be null select * from t1; id id2 NULL 0 diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index 32ed34e1d52..06941cf6497 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.result @@ -1304,7 +1304,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1 +Warning 1048 Column 'a' cannot be null select a,b from t1 order by a; a b 0 two diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index c53056cfa0e..235660cbbaf 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -1287,7 +1287,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1 +Warning 1048 Column 'a' cannot be null select a,b from t1 order by a; a b 0 two diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index 2951ce28fa5..bf77ec7acf2 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -1288,7 +1288,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1 +Warning 1048 Column 'a' cannot be null select a,b from t1 order by a; a b 0 two diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index 56ec1e04901..f6aa716d932 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -1330,7 +1330,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1 +Warning 1048 Column 'a' cannot be null select a,b from t1 order by a; a b 0 two @@ -4351,7 +4351,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1 +Warning 1048 Column 'a' cannot be null select a,b from t1 order by a; a b 0 two diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result index ed774b202b2..2c8b40e8818 100644 --- a/mysql-test/r/ps_6bdb.result +++ b/mysql-test/r/ps_6bdb.result @@ -1287,7 +1287,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1 +Warning 1048 Column 'a' cannot be null select a,b from t1 order by a; a b 0 two diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result index ff5ecbb2e9b..a0bbeed34ee 100644 --- a/mysql-test/r/ps_7ndb.result +++ b/mysql-test/r/ps_7ndb.result @@ -1287,7 +1287,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1 +Warning 1048 Column 'a' cannot be null select a,b from t1 order by a; a b 0 two diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index a3ebd5c86fd..34869862a63 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -993,16 +993,16 @@ ERROR 23000: Column 'col2' cannot be null INSERT INTO t1 VALUES (103,'',NULL); ERROR 23000: Column 'col3' cannot be null UPDATE t1 SET col1=NULL WHERE col1 =100; -ERROR 22004: Column was set to data type implicit default; NULL supplied for NOT NULL column 'col1' at row 1 +ERROR 23000: Column 'col1' cannot be null UPDATE t1 SET col2 =NULL WHERE col2 ='hello'; -ERROR 22004: Column was set to data type implicit default; NULL supplied for NOT NULL column 'col2' at row 1 +ERROR 23000: Column 'col2' cannot be null UPDATE t1 SET col2 =NULL where col3 IS NOT NULL; -ERROR 22004: Column was set to data type implicit default; NULL supplied for NOT NULL column 'col2' at row 1 +ERROR 23000: Column 'col2' cannot be null INSERT IGNORE INTO t1 values (NULL,NULL,NULL); Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'col1' at row 1 -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'col2' at row 1 -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'col3' at row 1 +Warning 1048 Column 'col1' cannot be null +Warning 1048 Column 'col2' cannot be null +Warning 1048 Column 'col3' cannot be null SELECT * FROM t1; col1 col2 col3 100 hello 2004-08-20 @@ -1027,11 +1027,11 @@ ERROR HY000: Field 'col2' doesn't have a default value INSERT INTO t1 (col1) SELECT 1; ERROR HY000: Field 'col2' doesn't have a default value INSERT INTO t1 SELECT 1,NULL; -ERROR 22004: Column was set to data type implicit default; NULL supplied for NOT NULL column 'col2' at row 1 +ERROR 23000: Column 'col2' cannot be null INSERT IGNORE INTO t1 values (NULL,NULL); Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'col1' at row 1 -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'col2' at row 1 +Warning 1048 Column 'col1' cannot be null +Warning 1048 Column 'col2' cannot be null INSERT IGNORE INTO t1 (col1) values (3); Warnings: Warning 1364 Field 'col2' doesn't have a default value diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 13239af41ad..2e147c2d1fd 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -1497,7 +1497,7 @@ insert into v3(b) values (10); insert into v3(a) select a from t2; insert into v3(b) select b from t2; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 2 +Warning 1048 Column 'a' cannot be null insert into v3(a) values (1) on duplicate key update a=a+10000+VALUES(a); select * from t1; a b diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index d0ad4ca6648..9ce1f9c825d 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -86,7 +86,7 @@ drop table t1; create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5)); insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test'); Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 1 +Warning 1048 Column 'a' cannot be null Warning 1264 Out of range value adjusted for column 'b' at row 2 Warning 1265 Data truncated for column 'c' at row 2 Warning 1264 Out of range value adjusted for column 'a' at row 3 @@ -99,7 +99,7 @@ Warning 1265 Data truncated for column 'c' at row 2 alter table t1 add d char(2); update t1 set a=NULL where a=10; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 2 +Warning 1048 Column 'a' cannot be null update t1 set c='mysql ab' where c='test'; Warnings: Warning 1265 Data truncated for column 'c' at row 4 @@ -115,7 +115,7 @@ Warnings: Warning 1265 Data truncated for column 'b' at row 1 Warning 1265 Data truncated for column 'b' at row 2 Warning 1265 Data truncated for column 'b' at row 3 -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'a' at row 4 +Warning 1048 Column 'a' cannot be null Warning 1265 Data truncated for column 'b' at row 4 insert into t2(b) values('mysqlab'); Warnings: diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test index fc663853174..bf49a6a906c 100644 --- a/mysql-test/t/strict.test +++ b/mysql-test/t/strict.test @@ -890,11 +890,11 @@ INSERT INTO t1 (col1,col2,col3) VALUES (NULL, '', '2004-01-01'); INSERT INTO t1 (col1,col2,col3) VALUES (102, NULL, '2004-01-01'); --error 1048 INSERT INTO t1 VALUES (103,'',NULL); ---error 1263 +--error 1048 UPDATE t1 SET col1=NULL WHERE col1 =100; ---error 1263 +--error 1048 UPDATE t1 SET col2 =NULL WHERE col2 ='hello'; ---error 1263 +--error 1048 UPDATE t1 SET col2 =NULL where col3 IS NOT NULL; INSERT IGNORE INTO t1 values (NULL,NULL,NULL); SELECT * FROM t1; @@ -914,7 +914,7 @@ INSERT INTO t1 (col1) VALUES (2); INSERT INTO t1 VALUES(default(col1),default(col2)); --error 1364 INSERT INTO t1 (col1) SELECT 1; ---error 1263 +--error 1048 INSERT INTO t1 SELECT 1,NULL; INSERT IGNORE INTO t1 values (NULL,NULL); INSERT IGNORE INTO t1 (col1) values (3); -- cgit v1.2.1 From 4108ead9d3e1fc9524a32ab2cce84170fb925131 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 May 2007 20:25:16 +0400 Subject: sp.result, analyse.result: Post merge fix. mysql-test/r/sp.result: Post merge fix. mysql-test/r/analyse.result: Post merge fix. --- mysql-test/r/analyse.result | 24 ++++++++++++------------ mysql-test/r/sp.result | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/analyse.result b/mysql-test/r/analyse.result index b1ed1ea2bed..c0b16778f9c 100644 --- a/mysql-test/r/analyse.result +++ b/mysql-test/r/analyse.result @@ -39,10 +39,10 @@ t2 CREATE TABLE `t2` ( `Field_name` varbinary(255) NOT NULL DEFAULT '', `Min_value` varbinary(255) DEFAULT NULL, `Max_value` varbinary(255) DEFAULT NULL, - `Min_length` int(11) NOT NULL DEFAULT '0', - `Max_length` int(11) NOT NULL DEFAULT '0', - `Empties_or_zeros` int(11) NOT NULL DEFAULT '0', - `Nulls` int(11) NOT NULL DEFAULT '0', + `Min_length` bigint(11) NOT NULL DEFAULT '0', + `Max_length` bigint(11) NOT NULL DEFAULT '0', + `Empties_or_zeros` bigint(11) NOT NULL DEFAULT '0', + `Nulls` bigint(11) NOT NULL DEFAULT '0', `Avg_value_or_avg_length` varbinary(255) NOT NULL DEFAULT '', `Std` varbinary(255) DEFAULT NULL, `Optimal_fieldtype` varbinary(64) NOT NULL DEFAULT '' @@ -58,10 +58,10 @@ t2 CREATE TABLE `t2` ( `Field_name` varbinary(255) NOT NULL DEFAULT '', `Min_value` varbinary(255) DEFAULT NULL, `Max_value` varbinary(255) DEFAULT NULL, - `Min_length` int(11) NOT NULL DEFAULT '0', - `Max_length` int(11) NOT NULL DEFAULT '0', - `Empties_or_zeros` int(11) NOT NULL DEFAULT '0', - `Nulls` int(11) NOT NULL DEFAULT '0', + `Min_length` bigint(11) NOT NULL DEFAULT '0', + `Max_length` bigint(11) NOT NULL DEFAULT '0', + `Empties_or_zeros` bigint(11) NOT NULL DEFAULT '0', + `Nulls` bigint(11) NOT NULL DEFAULT '0', `Avg_value_or_avg_length` varbinary(255) NOT NULL DEFAULT '', `Std` varbinary(255) DEFAULT NULL, `Optimal_fieldtype` varbinary(64) NOT NULL DEFAULT '' @@ -81,10 +81,10 @@ t2 CREATE TABLE `t2` ( `Field_name` varbinary(255) NOT NULL DEFAULT '', `Min_value` varbinary(255) DEFAULT NULL, `Max_value` varbinary(255) DEFAULT NULL, - `Min_length` int(11) NOT NULL DEFAULT '0', - `Max_length` int(11) NOT NULL DEFAULT '0', - `Empties_or_zeros` int(11) NOT NULL DEFAULT '0', - `Nulls` int(11) NOT NULL DEFAULT '0', + `Min_length` bigint(11) NOT NULL DEFAULT '0', + `Max_length` bigint(11) NOT NULL DEFAULT '0', + `Empties_or_zeros` bigint(11) NOT NULL DEFAULT '0', + `Nulls` bigint(11) NOT NULL DEFAULT '0', `Avg_value_or_avg_length` varbinary(255) NOT NULL DEFAULT '', `Std` varbinary(255) DEFAULT NULL, `Optimal_fieldtype` varbinary(64) NOT NULL DEFAULT '' diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 24bf12d441e..0d31d5fc4e1 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -4910,7 +4910,7 @@ create table t3 as select * from v1| show create table t3| Table Create Table t3 CREATE TABLE `t3` ( - `j` int(11) DEFAULT NULL + `j` bigint(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t3| j -- cgit v1.2.1 From 3a35610d9714a3ef47600504f04daa4cba3b4d35 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 May 2007 23:28:14 +0400 Subject: Bug#28729: Field_enum wrongly reported an error while storing an empty string. ENUM fields internally store their values as integers and may use integer values as indexes to their values. Invalid values are mapped to zero value. When storing an empty string the ENUM field fails to find an appropriate value and tries to convert the provided string to integer. The conversion also fails and error is returned even if the thd->count_cuted_fields is set to CHECK_FIELD_IGNORE. This makes the range optimizer wrongly decide that an impossible range is present. Now the Field_enum::store() returns error while storing an empty string only if the thd->count_cuted_fields isn't set to CHECK_FIELD_IGNORE. sql/field.cc: Bug#28729: Field_enum wrongly reported an error while storing an empty string. Now the Field_enum::store() returns error while storing an empty string only if the thd->count_cuted_fields isn't set to CHECK_FIELD_IGNORE. mysql-test/r/type_enum.result: Added a test case for the bug#28729: Field_enum wrongly reported an error while storing an empty string. mysql-test/t/type_enum.test: Added a test case for the bug#28729: Field_enum wrongly reported an error while storing an empty string. --- mysql-test/r/type_enum.result | 7 +++++++ mysql-test/t/type_enum.test | 8 ++++++++ 2 files changed, 15 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/type_enum.result b/mysql-test/r/type_enum.result index 2683201e25e..0b420c42cc7 100644 --- a/mysql-test/r/type_enum.result +++ b/mysql-test/r/type_enum.result @@ -1779,3 +1779,10 @@ create table t1(exhausting_charset enum('ABCDEFGHIJKLMNOPQRSTUVWXYZ','  !"','#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~','xx\','yy\€','zz‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ')); ERROR 42000: Field separator argument is not what is expected; check the manual End of 4.1 tests +create table t1(f1 set('a','b'), index(f1)); +insert into t1 values(''),(''),('a'),('b'); +select * from t1 where f1=''; +f1 + + +drop table t1; diff --git a/mysql-test/t/type_enum.test b/mysql-test/t/type_enum.test index 4b3429d9ea0..45da469cf2d 100644 --- a/mysql-test/t/type_enum.test +++ b/mysql-test/t/type_enum.test @@ -157,3 +157,11 @@ create table t1(exhausting_charset enum('ABCDEFGHIJKLMNOPQRSTUVWXYZ','  !"','#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~','xx\','yy\€','zz‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ')); --echo End of 4.1 tests + +# +# Bug#28729: Field_enum wrongly reported an error while storing an empty string. +# +create table t1(f1 set('a','b'), index(f1)); +insert into t1 values(''),(''),('a'),('b'); +select * from t1 where f1=''; +drop table t1; -- cgit v1.2.1 From 474503a49db1235b8a57073513796c6f2e46b212 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 May 2007 00:04:03 -0700 Subject: Post merge fix. --- mysql-test/r/view.result | 10 ++++++++++ mysql-test/t/view.test | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 238e330710c..cecffe6997e 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3369,6 +3369,16 @@ SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(1.23456789 as decimal(8,0)) AS `col` DROP VIEW v1; +CREATE TABLE t1 (id int); +CREATE TABLE t2 (id int, c int DEFAULT 0); +INSERT INTO t1 (id) VALUES (1); +INSERT INTO t2 (id) VALUES (1); +CREATE VIEW v1 AS +SELECT t2.c FROM t1, t2 +WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; +UPDATE v1 SET c=1; +DROP VIEW v1; +DROP TABLE t1,t2; End of 5.0 tests. DROP DATABASE IF EXISTS `d-1`; CREATE DATABASE `d-1`; diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 0eebdcf2a22..897aa292f76 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3244,6 +3244,25 @@ CREATE VIEW v1 AS SELECT CAST(1.23456789 AS DECIMAL(8,0)) AS col; SHOW CREATE VIEW v1; DROP VIEW v1; +# +# Bug #28561: update on multi-table view with CHECK OPTION and +# a subquery in WHERE condition +# + +CREATE TABLE t1 (id int); +CREATE TABLE t2 (id int, c int DEFAULT 0); +INSERT INTO t1 (id) VALUES (1); +INSERT INTO t2 (id) VALUES (1); + +CREATE VIEW v1 AS + SELECT t2.c FROM t1, t2 + WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; + +UPDATE v1 SET c=1; + +DROP VIEW v1; +DROP TABLE t1,t2; + --echo End of 5.0 tests. # -- cgit v1.2.1 From 0e0a30e20ecc0603e59f1b25b4f6d80df0cf38f0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 May 2007 12:10:21 +0500 Subject: Fixed bug #28598. mysqld crashed when a long-running explain query was killed from another connection. When the current thread caught a kill signal executing the function best_extension_by_limited_search it just silently returned to the calling function greedy_search without initializing elements of the join->best_positions array. However, the greedy_search function ignored thd->killed status after a calls to the best_extension_by_limited_search function, and after several calls the greedy_search function used an uninitialized data from the join->best_positions[idx] to search position in the join->best_ref array. That search failed, and greedy_search tried to call swap_variables function with NULL argument - that caused a crash. sql/sql_select.cc: Fixed bug #28598. choose_plan(), greedy_search(), best_extension_by_limited_search() and find_best() functions have been changed to return TRUE in case of fatal error. mysql-test/t/kill.test: Updated test case for bug #28598. mysql-test/r/kill.result: Updated test case for bug #28598. --- mysql-test/r/kill.result | 2 ++ mysql-test/t/kill.test | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/kill.result b/mysql-test/r/kill.result index 4bc04c6de3c..a4966d9d5ec 100644 --- a/mysql-test/r/kill.result +++ b/mysql-test/r/kill.result @@ -123,3 +123,5 @@ release_lock("lock27563") drop table t1, t2; drop function bug27563; drop procedure proc27563; +PREPARE stmt FROM 'EXPLAIN SELECT * FROM t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40 WHERE a1=a2 AND a2=a3 AND a3=a4 AND a4=a5 AND a5=a6 AND a6=a7 AND a7=a8 AND a8=a9 AND a9=a10 AND a10=a11 AND a11=a12 AND a12=a13 AND a13=a14 AND a14=a15 AND a15=a16 AND a16=a17 AND a17=a18 AND a18=a19 AND a19=a20 AND a20=a21 AND a21=a22 AND a22=a23 AND a23=a24 AND a24=a25 AND a25=a26 AND a26=a27 AND a27=a28 AND a28=a29 AND a29=a30 AND a30=a31 AND a31=a32 AND a32=a33 AND a33=a34 AND a34=a35 AND a35=a36 AND a36=a37 AND a37=a38 AND a38=a39 AND a39=a40 '; +EXECUTE stmt; diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test index 83194e214fb..5f6bae00254 100644 --- a/mysql-test/t/kill.test +++ b/mysql-test/t/kill.test @@ -249,3 +249,56 @@ select release_lock("lock27563"); drop table t1, t2; drop function bug27563; drop procedure proc27563; + +# +# Bug#28598: mysqld crash when killing a long-running explain query. +# +--disable_query_log +connection con1; +let $ID= `select connection_id()`; +let $tab_count= 40; + +let $i= $tab_count; +while ($i) +{ + eval CREATE TABLE t$i (a$i int, KEY(a$i)); + eval INSERT INTO t$i VALUES (1),(2),(3),(4),(5),(6),(7); + dec $i ; +} +set session optimizer_search_depth=0; + +let $i=$tab_count; +while ($i) +{ + let $a= a$i; + let $t= t$i; + dec $i; + if ($i) + { + let $comma=,; + let $from=$comma$t$from; + let $where=a$i=$a $and $where; + } + if (!$i) + { + let $from=FROM $t$from; + let $where=WHERE $where; + } + let $and=AND; +} + +--enable_query_log +eval PREPARE stmt FROM 'EXPLAIN SELECT * $from $where'; +send EXECUTE stmt; +--disable_query_log + +connection con2; +real_sleep 2; +eval kill query $ID; +let $i= $tab_count; +while ($i) +{ + eval DROP TABLE t$i; + dec $i ; +} +--enable_query_log -- cgit v1.2.1 From 727397ada495020ebddfa439e3e334991f26d5f4 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 May 2007 17:01:10 +0500 Subject: merging --- mysql-test/r/type_enum.result | 1 - 1 file changed, 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/type_enum.result b/mysql-test/r/type_enum.result index 80323f07f79..fe63ad6d69e 100644 --- a/mysql-test/r/type_enum.result +++ b/mysql-test/r/type_enum.result @@ -1755,7 +1755,6 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; End of 4.1 tests - create table t1(f1 set('a','b'), index(f1)); insert into t1 values(''),(''),('a'),('b'); select * from t1 where f1=''; -- cgit v1.2.1 From 2550ede7a40d207d779d3a246cfcef3cfbd6c46a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 May 2007 14:22:21 +0200 Subject: bug#27741: udf test fails on AIX < 5.3 problem #1: udf_example.so does not get built on AIX solution#1: build it yourself using cd sql; gcc -g -I ../include/ -I /usr/include/ -lpthread \ -shared -o udf_example.so udf_example.c; mv udf_example.so \ .libs/ problem#2 (the bug): udf_example fails because it does not recognize the variable LD_LIBRARY_PATH when doing dl_open(), it looks at LIBPATH solution#2: add the library path to LIBPATH problem#3: udf_example returns the wrong result length since it relies on strmov to return a pointer to the end of the string that it copies. On AIX builds, where m_string.h is not included (m_string defines a macro expanding strmov to stpcpy), there is a macro expanding strmov to strcpy, which returns a pointer to the first character. solution#3: define strmov as stpcpy. problem#4: #2 applies on hp-ux as well, but this platform looks at SHLIB_PATH solution#4: added the library path to SHLIB_PATH mysql-test/mysql-test-run.pl: bug#27741: Added library paths to LIBPATH ( shared library path environment variable used on AIX) and SHLIB_PATH (ditto on hp-ux) sql/udf_example.c: bug#27741: define strmov as stpcpy rather than strcpy and include string.h. The definition for strmov in the standalone case was not maintained properly --- mysql-test/mysql-test-run.pl | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index c494626bbae..85191a0be00 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1784,6 +1784,17 @@ sub environment_setup () { split(':', $ENV{'DYLD_LIBRARY_PATH'}) : ()); mtr_debug("DYLD_LIBRARY_PATH: $ENV{'DYLD_LIBRARY_PATH'}"); + # The environment variable used for shared libs on AIX + $ENV{'SHLIB_PATH'}= join(":", @ld_library_paths, + $ENV{'SHLIB_PATH'} ? + split(':', $ENV{'SHLIB_PATH'}) : ()); + mtr_debug("SHLIB_PATH: $ENV{'SHLIB_PATH'}"); + + # The environment variable used for shared libs on hp-ux + $ENV{'LIBPATH'}= join(":", @ld_library_paths, + $ENV{'LIBPATH'} ? + split(':', $ENV{'LIBPATH'}) : ()); + mtr_debug("LIBPATH: $ENV{'LIBPATH'}"); # -------------------------------------------------------------------------- # Also command lines in .opt files may contain env vars -- cgit v1.2.1 From 599e61e8c0a0cb785600d9216918dd2fd6a8fc3b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 May 2007 17:30:56 +0500 Subject: Fixed bug #28244. When the same VIEW was created at the master side twice, malformed (truncated after the word 'AS') query string was forwarded to client side, so error messages on the master and client was different, and replication was broken. The mysql_register_view function call failed too early: fields of `view' output argument of this function was not filled yet with correct data required for query replication. The mysql_register_view function also copied pointers to local buffers into a memory allocated by the caller. sql/sql_view.cc: Fixed bug #28244. Checking of existence of VIEW .frm file has been moved down to the place, when `view' argument is completely filled with proper data. view->query.str and view->query.md5 pointers has been set to the NULL before return from the mysql_register_view function. mysql-test/t/rpl_view.test: Updated test case for bug #28244. mysql-test/r/rpl_view.result: Updated test case for bug #28244. --- mysql-test/r/rpl_view.result | 6 ++++++ mysql-test/t/rpl_view.test | 12 ++++++++++++ 2 files changed, 18 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/rpl_view.result b/mysql-test/r/rpl_view.result index be03f3f080a..be7ed6e8c2a 100644 --- a/mysql-test/r/rpl_view.result +++ b/mysql-test/r/rpl_view.result @@ -106,4 +106,10 @@ a b 1 6 drop table t1; drop view v1; +CREATE TABLE t1(a INT); +CREATE VIEW v1 AS SELECT * FROM t1; +CREATE VIEW v1 AS SELECT * FROM t1; +ERROR 42S01: Table 'v1' already exists +DROP VIEW v1; +DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/t/rpl_view.test b/mysql-test/t/rpl_view.test index 812e5d44d58..21748586130 100644 --- a/mysql-test/t/rpl_view.test +++ b/mysql-test/t/rpl_view.test @@ -149,4 +149,16 @@ drop view v1; sync_slave_with_master; +# +# BUG#28244 CREATE VIEW breaks replication when view exists +# +connection master; +CREATE TABLE t1(a INT); +CREATE VIEW v1 AS SELECT * FROM t1; +--error ER_TABLE_EXISTS_ERROR +CREATE VIEW v1 AS SELECT * FROM t1; +DROP VIEW v1; +DROP TABLE t1; +sync_slave_with_master; + --echo End of 5.0 tests -- cgit v1.2.1 From 4605d8f26cc496a4fa1e4a37ceffbcb772c177f6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 May 2007 17:45:22 +0300 Subject: Added casts to avoid compiler warnings and fixed a wrong type. --- Added casts and fixed wrong type. --- Added casts and fixed wrong type. --- Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-marvel into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel --- Don't give warning that readonly variable is forced to be readonly mysql-test-run run now fails if we have [Warning] and [ERROR] as tags in .err file Fixed wrong reference to the mysql manual Fixed wrong prototype that caused some tests to fail on 64 bit platforms --- Disabled compiler warnings mainly for Win 64. --- Added casts to remove compiler warnings on windows Give warnings also for safe_mutex errors found by test system Added some warnings from different machines in pushbuild --- Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marvel into mysql.com:/home/my/mysql-5.1 --- Added escapes for double quotes and parenthesis. --- Archive db fix plus added non-critical warnings in ignore list. --- Fixed previously added patch and added new ignored warning. client/mysqltest.c: Added casts to avoid compiler warnings. --- Added casts to avoid compiler warnings. mysql-test/lib/mtr_report.pl: Test run now fails if we have [Warning] and [ERROR] as tags in .err file Added list of all common 'not fatal' errors to ignore error list --- Give warnings also for safe_mutex errors Added some warnings from different machines in pushbuild --- Added escapes for double quotes and parenthesis. --- Added non-critical warnings to be ignored. --- Fixed a wrong regexp Added new non-critical warning mysql-test/mysql-test-run-shell.sh: Fixed some wrong startup options mysql-test/r/func_misc.result: Test case for archive db fix. mysql-test/t/disabled.def: Disable instance manager tests because they generate warnings (and probably don't read the option files correctly) mysql-test/t/func_misc.test: Test case for archive db fix. mysys/array.c: Added casts to avoid compiler warnings. mysys/hash.c: Added casts to avoid compiler warnings. mysys/my_compress.c: Added casts to remove compiler warnings on windows mysys/my_conio.c: To avoid a warning from compiler. mysys/my_pread.c: Archive db fix. mysys/my_quick.c: Added cast to avoid compiler warning. --- Added cast to avoid compiler warning. sql/ha_ndbcluster_binlog.cc: Ensure we log all binglog errors with the "NDB Binlog" tag sql/ha_partition.cc: result is type bool, so calculation should be forced to that also. sql/log.cc: Fixed compiler problem on Solaris. sql/slave.cc: Make errors uniform sql/sql_class.cc: Added cast to remove compiler warnings on windows sql/sql_map.cc: Added casts to avoid compiler warnings. --- Added casts to avoid compiler warnings. sql/sql_plugin.cc: Fixed wrong type. --- Don't give warning that readonly variable is forced to be readonly sql/stacktrace.c: Corrected manual reference storage/archive/azio.c: Archive db fix. --- Fixed previously added patch. storage/blackhole/ha_blackhole.cc: Fixed wrong prototype that caused test to fail on 64 bit platforms storage/example/ha_example.cc: Fixed wrong prototype that caused test to fail on 64 bit platforms strings/ctype-ucs2.c: Fixed wrong type. --- Fixed wrong type. support-files/compiler_warnings.supp: Added new disabled warnings for Win 64. --- mysql-test/lib/mtr_report.pl | 76 +++++++++++++++++++++++++++++++++++--- mysql-test/mysql-test-run-shell.sh | 9 ++++- mysql-test/r/func_misc.result | 6 ++- mysql-test/t/disabled.def | 3 ++ mysql-test/t/func_misc.test | 4 +- 5 files changed, 87 insertions(+), 11 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index ce206a35727..8a74b1f42f0 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -265,8 +265,13 @@ sub mtr_report_stats ($) { else { # We report different types of problems in order - foreach my $pattern ( "^Warning:", "^Error:", "^==.* at 0x", - "InnoDB: Warning", "missing DBUG_RETURN", + foreach my $pattern ( "^Warning:", + "\\[Warning\\]", + "\\[ERROR\\]", + "^Error:", "^==.* at 0x", + "InnoDB: Warning", + "^safe_mutex:", + "missing DBUG_RETURN", "mysqld: Warning", "allocated at line", "Attempting backtrace", "Assertion .* failed" ) @@ -281,10 +286,69 @@ sub mtr_report_stats ($) { while ( ) { # Skip some non fatal warnings from the log files - if ( /Warning:\s+Table:.* on (delete|rename)/ or - /Warning:\s+Setting lower_case_table_names=2/ or - /Warning:\s+One can only use the --user.*root/ or - /InnoDB: Warning: we did not need to do crash recovery/) + if ( + /\"SELECT UNIX_TIMESTAMP\(\)\" failed on master/ or + /Aborted connection/ or + /Client requested master to start replication from impossible position/ or + /Could not find first log file name in binary log/ or + /Enabling keys got errno/ or + /Error reading master configuration/ or + /Error reading packet/ or + /Event Scheduler/ or + /Failed to open log/ or + /Failed to open the existing master info file/ or + /Forcing shutdown of [0-9]* plugins/ or + /Got error [0-9]* when reading table/ or + /Incorrect definition of table/ or + /Incorrect information in file/ or + /InnoDB: Warning: we did not need to do crash recovery/ or + /Invalid \(old\?\) table or database name/ or + /Lock wait timeout exceeded/ or + /Log entry on master is longer than max_allowed_packet/ or + /unknown option '--loose-/ or + /unknown variable 'loose-/ or + /You have forced lower_case_table_names to 0 through a command-line option/ or + /Setting lower_case_table_names=2/ or + /NDB Binlog:/ or + /NDB: failed to setup table/ or + /NDB: only row based binary logging/ or + /Neither --relay-log nor --relay-log-index were used/ or + /Query partially completed/ or + /Slave I.O thread aborted while waiting for relay log/ or + /Slave SQL thread is stopped because UNTIL condition/ or + /Slave SQL thread retried transaction/ or + /Slave \(additional info\)/ or + /Slave: .*Duplicate column name/ or + /Slave: .*master may suffer from/ or + /Slave: According to the master's version/ or + /Slave: Column [0-9]* type mismatch/ or + /Slave: Error .* doesn't exist/ or + /Slave: Error .*Deadlock found/ or + /Slave: Error .*Unknown table/ or + /Slave: Error in Write_rows event: / or + /Slave: Field .* of table .* has no default value/ or + /Slave: Query caused different errors on master and slave/ or + /Slave: Table .* doesn't exist/ or + /Slave: Table width mismatch/ or + /Slave: The incident LOST_EVENTS occured on the master/ or + /Slave: Unknown error.* 1105/ or + /Slave: Can't drop database.* database doesn't exist/ or + /Sort aborted/ or + /Time-out in NDB/ or + /Warning:\s+One can only use the --user.*root/ or + /Warning:\s+Setting lower_case_table_names=2/ or + /Warning:\s+Table:.* on (delete|rename)/ or + /You have an error in your SQL syntax/ or + /deprecated/ or + /description of time zone/ or + /equal MySQL server ids/ or + /error .*connecting to master/ or + /error reading log entry/ or + /lower_case_table_names is set/ or + /skip-name-resolve mode/ or + /slave SQL thread aborted/ or + /Slave: .*Duplicate entry/ + ) { next; # Skip these lines } diff --git a/mysql-test/mysql-test-run-shell.sh b/mysql-test/mysql-test-run-shell.sh index 953478fa9f4..54323c878a9 100644 --- a/mysql-test/mysql-test-run-shell.sh +++ b/mysql-test/mysql-test-run-shell.sh @@ -629,6 +629,11 @@ else TEST_MODE=`echo $TEST_MODE | sed 's/^ *//'` fi +# +# Skip tests that doesn't work with shell version +# +SKIP_TEST="$SKIP_TEST bootstrap" + #++ # mysqld Environment Parameters #-- @@ -900,8 +905,8 @@ MYSQL_DUMP="$MYSQL_DUMP --no-defaults --debug-info -uroot --socket=$MASTER_MYSOC MYSQL_SLAP="$MYSQL_SLAP -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLSLAP_OPT" MYSQL_DUMP_SLAVE="$MYSQL_DUMP_DIR --no-defaults -uroot --socket=$SLAVE_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT" MYSQL_SHOW="$MYSQL_SHOW --no-defaults --debug-info -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLSHOW_OPT" -MYSQL_BINLOG="$MYSQL_BINLOG --debug-info --no-defaults --local-load=$MYSQL_TMP_DIR --character-sets-dir=$CHARSETSDIR $EXTRA_MYSQLBINLOG_OPT" -MYSQL_IMPORT="$MYSQL_IMPORT --debug-info -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT" +MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --debug-info --local-load=$MYSQL_TMP_DIR --character-sets-dir=$CHARSETSDIR $EXTRA_MYSQLBINLOG_OPT" +MYSQL_IMPORT="$MYSQL_IMPORT --no-defaults --debug-info -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT" MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose" MYSQL="$MYSQL --no-defaults --debug-info --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD" export MYSQL MYSQL_CHECK MYSQL_DUMP MYSQL_DUMP_SLAVE MYSQL_SHOW MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES MYSQL_IMPORT diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index 7526134c476..86b237d9afe 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -22,8 +22,10 @@ hex(inet_aton('127.1.1')) select length(uuid()), charset(uuid()), length(unhex(replace(uuid(),_utf8'-',_utf8''))); length(uuid()) charset(uuid()) length(unhex(replace(uuid(),_utf8'-',_utf8''))) 36 utf8 16 -select cast(uuid_short()-uuid_short() as signed); -cast(uuid_short()-uuid_short() as signed) +set @a= uuid_short(); +set @b= uuid_short(); +select cast(@a - @b as signed); +cast(@a - @b as signed) -1 select length(format('nan', 2)) > 0; length(format('nan', 2)) > 0 diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index e2a0b30c592..8f5403844d3 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -15,6 +15,9 @@ im_options : Bug#20294 2006-07-24 stewart Instance manager test im_daemon_life_cycle : Bug#20294 2007-05-14 alik Instance manager tests fail randomly im_cmd_line : Bug#20294 2007-05-14 alik Instance manager tests fail randomly im_life_cycle : BUG#27851 Instance manager dies on ASSERT in ~Thread_registry() or from not being able to close a mysqld instance. +im_instance_conf : BUG#28743 Instance manager generates warnings in test suite +im_utils : BUG#28743 Instance manager generates warnings in test suite + concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index 7437b0008e4..4d28ebf9404 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -16,7 +16,9 @@ select length(uuid()), charset(uuid()), length(unhex(replace(uuid(),_utf8'-',_ut # As we can assume we are the only user for the mysqld server, the difference # between two calls should be -1 -select cast(uuid_short()-uuid_short() as signed); +set @a= uuid_short(); +set @b= uuid_short(); +select cast(@a - @b as signed); # # Test for core dump with nan -- cgit v1.2.1 From f284baee5c24681e43fa6fb15d17134192430cb1 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 1 Jun 2007 02:15:40 +0500 Subject: Fixed bug #27827. ON conditions from JOIN expression were ignored at CHECK OPTION check when updating a multi-table view with CHECK OPTION. The st_table_list::prep_check_option function has been modified to to take into account ON conditions at CHECK OPTION check It was also changed to build the check option condition only once for any update used in PS/SP. sql/table.h: Fixed bug #27827. The st_table_list::check_option_processed variable has been added to build the check option condition only once for any update used in PS/SP. sql/table.cc: Fixed bug #27827. The st_table_list::prep_check_option function has been modified to to take into account ON conditions at CHECK OPTION check It was also changed to build the check option condition only once for any update used in PS/SP. mysql-test/t/view.test: Updated test case for bug #27827. mysql-test/r/view.result: Updated test case for bug #27827. --- mysql-test/r/view.result | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ mysql-test/t/view.test | 52 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 8d9d802949d..c31f6a4f8eb 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3367,4 +3367,65 @@ SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(1.23456789 as decimal(8,0)) AS `col` DROP VIEW v1; +CREATE TABLE t1 (a1 INT, c INT DEFAULT 0); +CREATE TABLE t2 (a2 INT); +CREATE TABLE t3 (a3 INT); +CREATE TABLE t4 (a4 INT); +INSERT INTO t1 (a1) VALUES (1),(2); +INSERT INTO t2 (a2) VALUES (1),(2); +INSERT INTO t3 (a3) VALUES (1),(2); +INSERT INTO t4 (a4) VALUES (1),(2); +CREATE VIEW v1 AS +SELECT t1.a1, t1.c FROM t1 JOIN t2 ON t1.a1=t2.a2 AND t1.c < 3 +WITH CHECK OPTION; +SELECT * FROM v1; +a1 c +1 0 +2 0 +UPDATE v1 SET c=3; +ERROR HY000: CHECK OPTION failed 'test.v1' +PREPARE t FROM 'UPDATE v1 SET c=3'; +EXECUTE t; +ERROR HY000: CHECK OPTION failed 'test.v1' +EXECUTE t; +ERROR HY000: CHECK OPTION failed 'test.v1' +INSERT INTO v1(a1, c) VALUES (3, 3); +ERROR HY000: CHECK OPTION failed 'test.v1' +UPDATE v1 SET c=1 WHERE a1=1; +SELECT * FROM v1; +a1 c +1 1 +2 0 +SELECT * FROM t1; +a1 c +1 1 +2 0 +CREATE VIEW v2 AS SELECT t1.a1, t1.c +FROM (t1 JOIN t2 ON t1.a1=t2.a2 AND t1.c < 3) +JOIN (t3 JOIN t4 ON t3.a3=t4.a4) +ON t2.a2=t3.a3 WITH CHECK OPTION; +SELECT * FROM v2; +a1 c +1 1 +2 0 +UPDATE v2 SET c=3; +ERROR HY000: CHECK OPTION failed 'test.v2' +PREPARE t FROM 'UPDATE v2 SET c=3'; +EXECUTE t; +ERROR HY000: CHECK OPTION failed 'test.v2' +EXECUTE t; +ERROR HY000: CHECK OPTION failed 'test.v2' +INSERT INTO v2(a1, c) VALUES (3, 3); +ERROR HY000: CHECK OPTION failed 'test.v2' +UPDATE v2 SET c=2 WHERE a1=1; +SELECT * FROM v2; +a1 c +1 2 +2 0 +SELECT * FROM t1; +a1 c +1 2 +2 0 +DROP VIEW v1,v2; +DROP TABLE t1,t2,t3,t4; End of 5.0 tests. diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 3275ba0a687..60b10de01f0 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3233,4 +3233,56 @@ CREATE VIEW v1 AS SELECT CAST(1.23456789 AS DECIMAL(8,0)) AS col; SHOW CREATE VIEW v1; DROP VIEW v1; +# +# Bug #27827: CHECK OPTION ignores ON conditions when updating +# a multi-table view with CHECK OPTION. +# + +CREATE TABLE t1 (a1 INT, c INT DEFAULT 0); +CREATE TABLE t2 (a2 INT); +CREATE TABLE t3 (a3 INT); +CREATE TABLE t4 (a4 INT); +INSERT INTO t1 (a1) VALUES (1),(2); +INSERT INTO t2 (a2) VALUES (1),(2); +INSERT INTO t3 (a3) VALUES (1),(2); +INSERT INTO t4 (a4) VALUES (1),(2); + +CREATE VIEW v1 AS + SELECT t1.a1, t1.c FROM t1 JOIN t2 ON t1.a1=t2.a2 AND t1.c < 3 + WITH CHECK OPTION; +SELECT * FROM v1; +--error 1369 +UPDATE v1 SET c=3; +PREPARE t FROM 'UPDATE v1 SET c=3'; +--error 1369 +EXECUTE t; +--error 1369 +EXECUTE t; +--error 1369 +INSERT INTO v1(a1, c) VALUES (3, 3); +UPDATE v1 SET c=1 WHERE a1=1; +SELECT * FROM v1; +SELECT * FROM t1; + +CREATE VIEW v2 AS SELECT t1.a1, t1.c + FROM (t1 JOIN t2 ON t1.a1=t2.a2 AND t1.c < 3) + JOIN (t3 JOIN t4 ON t3.a3=t4.a4) + ON t2.a2=t3.a3 WITH CHECK OPTION; +SELECT * FROM v2; +--error 1369 +UPDATE v2 SET c=3; +PREPARE t FROM 'UPDATE v2 SET c=3'; +--error 1369 +EXECUTE t; +--error 1369 +EXECUTE t; +--error 1369 +INSERT INTO v2(a1, c) VALUES (3, 3); +UPDATE v2 SET c=2 WHERE a1=1; +SELECT * FROM v2; +SELECT * FROM t1; + +DROP VIEW v1,v2; +DROP TABLE t1,t2,t3,t4; + --echo End of 5.0 tests. -- cgit v1.2.1 From f2fb7e78a9feec50c596a0dc967fe31f26adb9d7 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 1 Jun 2007 01:17:14 +0400 Subject: Bug#28494: Grouping by Item_func_set_user_var produces incorrect result. The end_update() function uses the Item::save_org_in_field() function to save original values of items into the group buffer. But for the Item_func_set_user_var this method was mapped to the save_in_field method. The latter function wrongly decides to use the result_field. This leads to saving incorrect value in the grouping buffer and wrong result of the whole query. The can_use_result_field argument of the bool type is added to the Item_func_set_user_var::save_in_field() function. If it is set to FALSE then the item's result field won't be used. Otherwise it will be detected whether the result field will be used (old behaviour). Two wrapping functions for the function above are added to the Item_func_set_user_var class: the save_in_field(Field *field, bool no_conversions) - it calls the above function with the can_use_result_field set to TRUE. the save_org_in_field(Field *field) - same, but the can_use_result_field is set to FALSE. mysql-test/t/user_var.test: Added a test case for the bug#28494: Grouping by Item_func_set_user_var produces incorrect result. mysql-test/r/user_var.result: Added a test case for the bug#28494: Grouping by Item_func_set_user_var produces incorrect result. sql/item_func.cc: Bug#28494: Grouping by Item_func_set_user_var produces incorrect result. The can_use_result_field argument of the bool type is added to the Item_func_set_user_var::save_in_field() function. If it is set to FALSE then the item's result field won't be used. Otherwise it will be detected whether the result field will be used (old behaviour). sql/item_func.h: Bug#28494: Grouping by Item_func_set_user_var produces incorrect result. The can_use_result_field argument of the bool type is added to the Item_func_set_user_var::save_in_field() function. Two wrapping functions for the function above are added to the Item_func_set_user_var class: the save_in_field(Field *field, bool no_conversions) - it calls the above function with the can_use_result_field set to TRUE. the save_org_in_field(Field *field) - same, but the can_use_result_field is set to FALSE. --- mysql-test/r/user_var.result | 7 +++++++ mysql-test/t/user_var.test | 8 ++++++++ 2 files changed, 15 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index 753c982155c..b9f58b60d9b 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -317,3 +317,10 @@ SHOW COUNT(*) WARNINGS; SHOW COUNT(*) ERRORS; @@session.error_count 1 +create table t1(f1 int); +insert into t1 values(1),(1),(2); +select @a:=f1, count(f1) from t1 group by 1; +@a:=f1 count(f1) +1 2 +2 1 +drop table t1; diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test index 70f57fdf283..7919b663a73 100644 --- a/mysql-test/t/user_var.test +++ b/mysql-test/t/user_var.test @@ -222,3 +222,11 @@ drop table t1,t2; insert into city 'blah'; SHOW COUNT(*) WARNINGS; SHOW COUNT(*) ERRORS; + +# +# Bug#28494: Grouping by Item_func_set_user_var produces incorrect result. +# +create table t1(f1 int); +insert into t1 values(1),(1),(2); +select @a:=f1, count(f1) from t1 group by 1; +drop table t1; -- cgit v1.2.1 From dc7c5c46005ce006725001ca8e1ca8a88f5abd9a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 May 2007 23:31:59 -0700 Subject: Post-merge fix. --- mysql-test/r/user_var.result | 2 +- mysql-test/t/user_var.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index 25fe18dccaf..d8d7ddef122 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -319,7 +319,7 @@ SHOW COUNT(*) ERRORS; 1 create table t1(f1 int); insert into t1 values(1),(1),(2); -select @a:=f1, count(f1) from t1 group by 1; +select @a:=f1, count(f1) from t1 group by 1 order by 1; @a:=f1 count(f1) 1 2 2 1 diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test index 7919b663a73..da4143bb0d3 100644 --- a/mysql-test/t/user_var.test +++ b/mysql-test/t/user_var.test @@ -228,5 +228,5 @@ SHOW COUNT(*) ERRORS; # create table t1(f1 int); insert into t1 values(1),(1),(2); -select @a:=f1, count(f1) from t1 group by 1; +select @a:=f1, count(f1) from t1 group by 1 order by 1; drop table t1; -- cgit v1.2.1 From 75c454876da59171ef5b3dfa38a978bf3ff4071f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 1 Jun 2007 17:49:01 +0400 Subject: Fix some mysqltest warnings. mysql-test/r/sp.result: Update results. mysql-test/t/mysql.test: Fix a typo. mysql-test/t/mysqltest.test: Fix a typo. mysql-test/t/order_by.test: Fix a typo. mysql-test/t/row.test: Remove an unsupported command. mysql-test/t/sp.test: Fix a typo. mysql-test/t/subselect3.test: Fix mysqltest warnings - now it warns when sees some suspicious -- comment --- mysql-test/r/sp.result | 11 +++++++++++ mysql-test/t/mysql.test | 2 +- mysql-test/t/mysqltest.test | 2 +- mysql-test/t/order_by.test | 4 ++-- mysql-test/t/row.test | 2 -- mysql-test/t/sp.test | 2 +- mysql-test/t/subselect3.test | 4 ++-- 7 files changed, 18 insertions(+), 9 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index b5b79af031e..a503106c81e 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -6018,6 +6018,8 @@ select bug20777(9223372036854775810) as '9223372036854775810 2**63+2'; select bug20777(-9223372036854775808) as 'lower bounds signed bigint'; lower bounds signed bigint 0 +Warnings: +Warning 1264 Out of range value adjusted for column 'f1' at row 1 select bug20777(9223372036854775807) as 'upper bounds signed bigint'; upper bounds signed bigint 9223372036854775807 @@ -6030,9 +6032,13 @@ upper bounds unsigned bigint select bug20777(18446744073709551616) as 'upper bounds unsigned bigint + 1'; upper bounds unsigned bigint + 1 18446744073709551615 +Warnings: +Warning 1264 Out of range value adjusted for column 'f1' at row 1 select bug20777(-1) as 'lower bounds unsigned bigint - 1'; lower bounds unsigned bigint - 1 0 +Warnings: +Warning 1264 Out of range value adjusted for column 'f1' at row 1 create table examplebug20777 as select 0 as 'i', bug20777(9223372036854775806) as '2**63-2', @@ -6044,7 +6050,12 @@ bug20777(18446744073709551615) as '2**64-1', bug20777(18446744073709551616) as '2**64', bug20777(0) as '0', bug20777(-1) as '-1'; +Warnings: +Warning 1264 Out of range value adjusted for column 'f1' at row 1 +Warning 1264 Out of range value adjusted for column 'f1' at row 1 insert into examplebug20777 values (1, 9223372036854775806, 9223372036854775807, 223372036854775808, 9223372036854775809, 18446744073709551614, 18446744073709551615, 8446744073709551616, 0, -1); +Warnings: +Warning 1264 Out of range value adjusted for column '-1' at row 1 show create table examplebug20777; Table Create Table examplebug20777 CREATE TABLE `examplebug20777` ( diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test index 0732559e7e1..37bbca77d9f 100644 --- a/mysql-test/t/mysql.test +++ b/mysql-test/t/mysql.test @@ -262,7 +262,7 @@ EOF --exec $MYSQL test -e "show status" 2>&1 > /dev/null --exec $MYSQL --help 2>&1 > /dev/null --exec $MYSQL --version 2>&1 > /dev/null ---enable_quary_log +--enable_query_log # # bug #26851: Mysql Client --pager Buffer Overflow diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 057432d37fd..24e59eeb89b 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1871,7 +1871,7 @@ DROP TABLE t1; --disable_query_log --exec $MYSQL_TEST --help 2>&1 > /dev/null --exec $MYSQL_TEST --version 2>&1 > /dev/null ---enable_quary_log +--enable_query_log --disable_abort_on_error --error 1 --exec $MYSQL_TEST a b c 2>&1 > /dev/null diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index 3e8fa07dfb7..29a290c7fbf 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -719,10 +719,10 @@ CREATE TABLE t1 (a INT UNSIGNED NOT NULL, b TIME); INSERT INTO t1 (a) VALUES (100000), (0), (100), (1000000),(10000), (1000), (10); UPDATE t1 SET b = SEC_TO_TIME(a); --- Correct ORDER +# Correct ORDER SELECT a, b FROM t1 ORDER BY b DESC; --- must be ordered as the above +# must be ordered as the above SELECT a, b FROM t1 ORDER BY SEC_TO_TIME(a) DESC; DROP TABLE t1; diff --git a/mysql-test/t/row.test b/mysql-test/t/row.test index d2750fecbac..20d044306a6 100644 --- a/mysql-test/t/row.test +++ b/mysql-test/t/row.test @@ -7,10 +7,8 @@ select (1,2,3) IN ((3,2,3), (1,2,3), (1,3,3)); select row(10,2,3) IN (row(3,2,3), row(1,2,3), row(1,3,3)); select row(1,2,3) IN (row(3,NULL,3), row(1,2,3), row(1,3,3)); select row(10,2,3) IN (row(3,NULL,3), row(1,2,3), row(1,3,3)); ---disable_ps_warnings select row('a',1.5,3) IN (row(1,2,3), row('a',1.5,3), row('a','a','a')); select row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3)); ---enable_ps_warnings select row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3)); select row('a',1.5,3) IN (row(3,NULL,3), row('a',1.5,3), row(1,3,3)); select row('b',1.5,3) IN (row(3,NULL,3), row('a',1.5,3), row(1,3,3)); diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index ff203a85ef7..2dc2c09ab2d 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -6975,7 +6975,7 @@ use test| --disable_warnings drop function if exists bug20777| drop table if exists examplebug20777| ---enabled_warnings +--enable_warnings create function bug20777(f1 bigint unsigned) returns bigint unsigned begin set f1 = (f1 - 10); set f1 = (f1 + 10); diff --git a/mysql-test/t/subselect3.test b/mysql-test/t/subselect3.test index 65556012588..14dbb72de7b 100644 --- a/mysql-test/t/subselect3.test +++ b/mysql-test/t/subselect3.test @@ -260,11 +260,11 @@ insert into t2 values ('dd', 1, NULL); alter table t1 add index idx(ie1,ie2); ---cc 3 NULL NULL +# cc 3 NULL NULL select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2 where a=3 and b is null ; insert into t2 values ('new1', 10,10); insert into t1 values ('new1', 1234, 10, NULL); --- new1, 10, 10, NULL, +# new1, 10, 10, NULL, select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2 where a=10 and b=10; explain extended select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2 where a=10 and b=10; -- cgit v1.2.1 From 9c6d0d336b23d00cab2837c3761fbb88226584e0 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 1 Jun 2007 17:53:38 +0400 Subject: A post-merge fix. --- mysql-test/r/sp.result | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index e6dea250355..34945f0cb60 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -6127,6 +6127,8 @@ select bug20777(9223372036854775810) as '9223372036854775810 2**63+2'; select bug20777(-9223372036854775808) as 'lower bounds signed bigint'; lower bounds signed bigint 0 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 select bug20777(9223372036854775807) as 'upper bounds signed bigint'; upper bounds signed bigint 9223372036854775807 @@ -6139,9 +6141,13 @@ upper bounds unsigned bigint select bug20777(18446744073709551616) as 'upper bounds unsigned bigint + 1'; upper bounds unsigned bigint + 1 18446744073709551615 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 select bug20777(-1) as 'lower bounds unsigned bigint - 1'; lower bounds unsigned bigint - 1 0 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 create table examplebug20777 as select 0 as 'i', bug20777(9223372036854775806) as '2**63-2', @@ -6153,7 +6159,12 @@ bug20777(18446744073709551615) as '2**64-1', bug20777(18446744073709551616) as '2**64', bug20777(0) as '0', bug20777(-1) as '-1'; +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 insert into examplebug20777 values (1, 9223372036854775806, 9223372036854775807, 223372036854775808, 9223372036854775809, 18446744073709551614, 18446744073709551615, 8446744073709551616, 0, -1); +Warnings: +Warning 1264 Out of range value for column '-1' at row 1 show create table examplebug20777; Table Create Table examplebug20777 CREATE TABLE `examplebug20777` ( -- cgit v1.2.1 From 8c6d82a20ef46acbc2df4df9344802de6d55f000 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 1 Jun 2007 18:04:25 +0400 Subject: Fix a typo in the test case. mysql-test/r/rpl_loaddata.result: Update result. mysql-test/t/rpl_loaddata.test: Fix a typo in the test file. --- mysql-test/r/rpl_loaddata.result | 2 +- mysql-test/t/rpl_loaddata.test | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result index b4b8d8b9a07..be137079c7a 100644 --- a/mysql-test/r/rpl_loaddata.result +++ b/mysql-test/r/rpl_loaddata.result @@ -83,4 +83,4 @@ drop table t1; CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; LOAD DATA INFILE "../std_data_ln/words.dat" INTO TABLE t1; ERROR 23000: Duplicate entry 'Aarhus' for key 1 -DROP TABLE IF EXISTS t1; +DROP TABLE t1; diff --git a/mysql-test/t/rpl_loaddata.test b/mysql-test/t/rpl_loaddata.test index 27fa7fb95a6..a4781ed4faa 100644 --- a/mysql-test/t/rpl_loaddata.test +++ b/mysql-test/t/rpl_loaddata.test @@ -158,9 +158,7 @@ CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; --error 1062 LOAD DATA INFILE "../std_data_ln/words.dat" INTO TABLE t1; ---disable warnings -DROP TABLE IF EXISTS t1; ---enable warnings +DROP TABLE t1; sync_with_master; # End of 4.1 tests -- cgit v1.2.1 From 75485dc3498596b53d3e0eb04e6f4fe101996908 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 1 Jun 2007 20:05:34 +0400 Subject: Fix more mysqltest warnings. --- mysql-test/t/mysqltest.test | 11 +++-------- mysql-test/t/strict.test | 2 -- 2 files changed, 3 insertions(+), 10 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 24e59eeb89b..54d17df1fd9 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -46,11 +46,6 @@ select otto from (select 1 as otto) as t1; --error 0 select otto from (select 1 as otto) as t1; -# expectation <> response --- // --error 1054 --- // select otto from (select 1 as otto) as t1; - - # ---------------------------------------------------------------------------- # Negative case(statement): # The derived table t1 does not contain a column named 'friedrich' . @@ -331,9 +326,9 @@ select 3 from t1 ; # This is a comment # This is a ; comment # This is a -- comment --- This is also a comment --- # This is also a comment --- This is also a ; comment +# -- This is also a comment +# -- # This is also a comment +# -- This is also a ; comment # ---------------------------------------------------------------------------- # Test comments with embedded command diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test index fc663853174..a66ab464a11 100644 --- a/mysql-test/t/strict.test +++ b/mysql-test/t/strict.test @@ -975,9 +975,7 @@ select * from t1; # Check that select don't abort even in strict mode (for now) set sql_mode='traditional'; ---disable_ps_warnings select count(*) from t1 where STR_TO_DATE('2004.12.12 10:22:61','%Y.%m.%d %T') IS NULL; ---enable_ps_warnings drop table t1; -- cgit v1.2.1 From b16765156ab1d92950463f0009c53283cd8aa0cc Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 2 Jun 2007 01:21:18 +0400 Subject: Bug#28427: Columns were renamed instead of moving by ALTER TABLE. To avoid unnecessary work the mysql_alter_table function takes the list of table fields and applies all changes to it (drops/moves/renames/etc). Then this function compares the new list and the old one. If the changes require only .frm to be modified then the actual data isn't copied. To detect changes all columns attributes but names are compared. When a column has been moved and has replaced another column with the same attributes except name the mysql_alter_table function wrongly decides that two fields has been just renamed. As a result the data from the moved column and from all columns after it is not copied. Now the mysql_alter_table function forces table data copying by setting the need_copy_table flag when it finds a moved column. The flag is set at the stage when the modified fields are created. sql/sql_table.cc: Bug#28427: Columns were renamed instead of moving by ALTER TABLE. Now the mysql_alter_table function forces table data copying by setting the need_copy_table flag when it finds a moved column. The flag is set at the stage when the modified fields are created. mysql-test/r/alter_table.result: Added a test case for the bug#28427: Columns were renamed instead of moving by ALTER TABLE. mysql-test/t/alter_table.test: Added a test case for the bug#28427: Columns were renamed instead of moving by ALTER TABLE. --- mysql-test/r/alter_table.result | 14 ++++++++++++++ mysql-test/t/alter_table.test | 12 ++++++++++++ 2 files changed, 26 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 3fa12f2997a..c9e3655660b 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -1103,3 +1103,17 @@ Field Type Null Key Default Extra unsigned_int_field bigint(20) unsigned NO MUL char_field char(10) YES NULL DROP TABLE t2; +CREATE TABLE t1 (f1 INT, f2 INT, f3 INT); +INSERT INTO t1 VALUES (1, 2, NULL); +SELECT * FROM t1; +f1 f2 f3 +1 2 NULL +ALTER TABLE t1 MODIFY COLUMN f3 INT AFTER f1; +SELECT * FROM t1; +f1 f3 f2 +1 NULL 2 +ALTER TABLE t1 MODIFY COLUMN f3 INT AFTER f2; +SELECT * FROM t1; +f1 f2 f3 +1 2 NULL +DROP TABLE t1; diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 70fd1dfa898..7c1c096534e 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -839,3 +839,15 @@ ALTER TABLE t2 MODIFY unsigned_int_field BIGINT UNSIGNED NOT NULL; DESCRIBE t2; DROP TABLE t2; + +# +# Bug#28427: Columns were renamed instead of moving by ALTER TABLE. +# +CREATE TABLE t1 (f1 INT, f2 INT, f3 INT); +INSERT INTO t1 VALUES (1, 2, NULL); +SELECT * FROM t1; +ALTER TABLE t1 MODIFY COLUMN f3 INT AFTER f1; +SELECT * FROM t1; +ALTER TABLE t1 MODIFY COLUMN f3 INT AFTER f2; +SELECT * FROM t1; +DROP TABLE t1; -- cgit v1.2.1 From b7ce84adbbf7e2bb8f3deb83a8756cb815f747cc Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 2 Jun 2007 11:44:16 -0700 Subject: Fixed bug #28728: a crash when executing EXPLAIN EXTENDED for a query using a derived table over a grouping subselect. This crash happens only when materialization of the derived tables requires creation of auxiliary temporary table, for example when a grouping operation is carried out with usage of a temporary table. The crash happened because EXPLAIN EXTENDED when printing the query expression made an attempt to use the objects created in the mem_root of the temporary table which has been already freed by the moment when printing is called. This bug appeared after the method Item_field::print() had been introduced. mysql-test/r/subselect.result: Added a test case for bug #28728. mysql-test/t/subselect.test: Added a test case for bug #28728. sql/sql_select.cc: Fixed bug #28728: a crash when executing EXPLAIN EXTENDED for a query using a derived table over a grouping subselect. The crash happened because EXPLAIN EXTENDED when printing the query expression made an attempt to use the objects created in the mem_root of the temporary table which has been already freed by the moment when printing is accomplished. The fix in JOIN::exec() ensures using existing objects when printing subselects for a derived tables by EXPLAIN EXTENDED. --- mysql-test/r/subselect.result | 10 ++++++++++ mysql-test/t/subselect.test | 14 ++++++++++++++ 2 files changed, 24 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 92a4a6f3f5a..ba487cb859d 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4071,4 +4071,14 @@ id st 2 GA 4 FL DROP TABLE t1,t2; +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (1), (2); +EXPLAIN EXTENDED +SELECT * FROM (SELECT count(*) FROM t1 GROUP BY a) as res; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 +2 DERIVED t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort +Warnings: +Note 1003 select `res`.`count(*)` AS `count(*)` from (select count(0) AS `count(*)` from `test`.`t1` group by `test`.`t1`.`a`) `res` +DROP TABLE t1; End of 5.0 tests. diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 5840e434b64..d565070835e 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -2906,4 +2906,18 @@ SELECT id, st FROM t1 DROP TABLE t1,t2; +# +# Bug #28728: crash with EXPLAIN EXTENDED for a query with a derived table +# over a grouping subselect +# + +CREATE TABLE t1 (a int); + +INSERT INTO t1 VALUES (1), (2); + +EXPLAIN EXTENDED +SELECT * FROM (SELECT count(*) FROM t1 GROUP BY a) as res; + +DROP TABLE t1; + --echo End of 5.0 tests. -- cgit v1.2.1 From 26f38860d77732e36af9acef8648ca3cd811870e Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 2 Jun 2007 23:17:46 +0400 Subject: Bug#28494: Grouping by Item_func_set_user_var produces incorrect result. This is an additional fix. Item::val_xxx methods are supposed to use original data source and Item::val_xxx_result methods to use the item's result field. But for the Item_func_set_user_var class val_xxx_result methods were mapped to val_xxx methods. This leads, in particular, to producing bad sort keys and thus wrong order of the result set of queries with group by/order by clauses. The set of val_xxx_result methods is added to the Item_func_set_user_var class. It's the same as the val_xxx set of method but uses the result_field to return a value. mysql-test/t/user_var.test: Corrected test case for hte bug#28494. mysql-test/r/user_var.result: Corrected test case for hte bug#28494. sql/item_func.cc: Bug#28494: Grouping by Item_func_set_user_var produces incorrect result. The set of val_xxx_result methods is added to the Item_func_set_user_var class. It's the same as the val_xxx set of method but uses the result_field to return a value. sql/item_func.h: Bug#28494: Grouping by Item_func_set_user_var produces incorrect result. The set of val_xxx_result methods is added to the Item_func_set_user_var class. --- mysql-test/r/user_var.result | 14 +++++++++++--- mysql-test/t/user_var.test | 5 +++-- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index b9f58b60d9b..b90bb1f062b 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -318,9 +318,17 @@ SHOW COUNT(*) ERRORS; @@session.error_count 1 create table t1(f1 int); -insert into t1 values(1),(1),(2); -select @a:=f1, count(f1) from t1 group by 1; +insert into t1 values(1),(1),(2),(3),(4),(1),(3),(1); +select @a:=f1, count(f1) from t1 group by 1 desc; @a:=f1 count(f1) -1 2 +4 1 +3 2 2 1 +1 4 +select @a:=f1, count(f1) from t1 group by 1 asc; +@a:=f1 count(f1) +1 4 +2 1 +3 2 +4 1 drop table t1; diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test index 7919b663a73..3df949ae669 100644 --- a/mysql-test/t/user_var.test +++ b/mysql-test/t/user_var.test @@ -227,6 +227,7 @@ SHOW COUNT(*) ERRORS; # Bug#28494: Grouping by Item_func_set_user_var produces incorrect result. # create table t1(f1 int); -insert into t1 values(1),(1),(2); -select @a:=f1, count(f1) from t1 group by 1; +insert into t1 values(1),(1),(2),(3),(4),(1),(3),(1); +select @a:=f1, count(f1) from t1 group by 1 desc; +select @a:=f1, count(f1) from t1 group by 1 asc; drop table t1; -- cgit v1.2.1 From 9d3446387fa61cc3558573c2e250b9c27524cce9 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 3 Jun 2007 09:40:00 +0300 Subject: Bug #26162: Trigger DML ignores low_priority_updates setting The value of "low-priority-updates" option and the LOW PRIORITY prefix was taken into account at parse time. This caused triggers (among others) to ignore this flag (if supplied for the DML statement). Moved reading of the LOW_PRIORITY flag at run time. Fixed an incosistency when handling SET GLOBAL LOW_PRIORITY_UPDATES : now it is in effect for delayed INSERTs. Tested by checking the effect of LOW_PRIORITY flag via a trigger. include/thr_lock.h: Bug #26162: moved reading of the LOW PRIORITY flag at run time mysql-test/r/trigger.result: Bug #26162: test case mysql-test/t/trigger.test: Bug #26162: test case sql/set_var.cc: Bug #26162: fixed the handling of the "low-priority-updates" option sql/sql_base.cc: Bug #26162: moved reading of the LOW PRIORITY flag at run time sql/sql_yacc.yy: Bug #26162: moved reading of the LOW PRIORITY flag at run time --- mysql-test/r/trigger.result | 24 ++++++++++++++++++++ mysql-test/t/trigger.test | 55 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index 3e6a901dc00..e95485eb80a 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -1449,4 +1449,28 @@ isave 1 2 drop table t1, t2, t3; +CREATE TABLE t1 (id INTEGER); +CREATE TABLE t2 (id INTEGER); +INSERT INTO t2 VALUES (1),(2); +CREATE TRIGGER t1_test AFTER INSERT ON t1 FOR EACH ROW +INSERT INTO t2 VALUES (new.id); +SELECT GET_LOCK('B26162',20); +GET_LOCK('B26162',20) +1 +SELECT 'rl_acquirer', GET_LOCK('B26162',5), id FROM t2 WHERE id = 1; +SET SESSION LOW_PRIORITY_UPDATES=1; +SET GLOBAL LOW_PRIORITY_UPDATES=1; +INSERT INTO t1 VALUES (5); +SELECT 'rl_contender', id FROM t2 WHERE id > 1; +SELECT RELEASE_LOCK('B26162'); +RELEASE_LOCK('B26162') +0 +rl_acquirer GET_LOCK('B26162',5) id +rl_acquirer 0 1 +rl_contender id +rl_contender 2 +DROP TRIGGER t1_test; +DROP TABLE t1,t2; +SET SESSION LOW_PRIORITY_UPDATES=DEFAULT; +SET GLOBAL LOW_PRIORITY_UPDATES=DEFAULT; End of 5.0 tests diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test index 82de4dac111..24817de66be 100644 --- a/mysql-test/t/trigger.test +++ b/mysql-test/t/trigger.test @@ -1763,4 +1763,59 @@ select * from t1; select * from t3; drop table t1, t2, t3; +# +# Bug #26162: Trigger DML ignores low_priority_updates setting +# +CREATE TABLE t1 (id INTEGER); +CREATE TABLE t2 (id INTEGER); + +INSERT INTO t2 VALUES (1),(2); + +# trigger that produces the high priority insert, but should be low, adding +# LOW_PRIORITY fixes this +CREATE TRIGGER t1_test AFTER INSERT ON t1 FOR EACH ROW + INSERT INTO t2 VALUES (new.id); + +CONNECT (rl_acquirer, localhost, root,,); +CONNECT (wl_acquirer, localhost, root,,); +CONNECT (rl_contender, localhost, root,,); + +SELECT GET_LOCK('B26162',20); + +CONNECTION rl_acquirer; +--send +SELECT 'rl_acquirer', GET_LOCK('B26162',5), id FROM t2 WHERE id = 1; + +CONNECTION wl_acquirer; +SET SESSION LOW_PRIORITY_UPDATES=1; +SET GLOBAL LOW_PRIORITY_UPDATES=1; +--send +INSERT INTO t1 VALUES (5); + +CONNECTION rl_contender; +# must not "see" the row inserted by the INSERT (as it must run before the +# INSERT) +--send +SELECT 'rl_contender', id FROM t2 WHERE id > 1; + +CONNECTION default; +SELECT RELEASE_LOCK('B26162'); + +CONNECTION wl_acquirer; +--reap +CONNECTION rl_acquirer; +--reap +CONNECTION rl_contender; +--reap + +CONNECTION default; +DISCONNECT rl_acquirer; +DISCONNECT wl_acquirer; +DISCONNECT rl_contender; + +DROP TRIGGER t1_test; +DROP TABLE t1,t2; +SET SESSION LOW_PRIORITY_UPDATES=DEFAULT; +SET GLOBAL LOW_PRIORITY_UPDATES=DEFAULT; + --echo End of 5.0 tests -- cgit v1.2.1 From e3a5404d2bc62c31739a4e23e630bd9a462c742b Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 3 Jun 2007 14:46:09 +0400 Subject: user_var.result, user_var.test: Extended test case for the bug#28494. mysql-test/t/user_var.test: Extended test case for the bug#28494. mysql-test/r/user_var.result: Extended test case for the bug#28494. --- mysql-test/r/user_var.result | 25 +++++++++++++++++++++++-- mysql-test/t/user_var.test | 10 ++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index b90bb1f062b..15a9fe2ecda 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -317,8 +317,11 @@ SHOW COUNT(*) WARNINGS; SHOW COUNT(*) ERRORS; @@session.error_count 1 -create table t1(f1 int); -insert into t1 values(1),(1),(2),(3),(4),(1),(3),(1); +create table t1(f1 int, f2 varchar(2), f3 float, f4 decimal(2,1)); +insert into t1 values +(1, "a", 1.5, 1.6), (1, "a", 1.5, 1.6), (2, "b", 2.5, 2.6), +(3, "c", 3.5, 3.6), (4, "d", 4.5, 4.6), (1, "a", 1.5, 1.6), +(3, "c", 3.5, 3.6), (1, "a", 1.5, 1.6); select @a:=f1, count(f1) from t1 group by 1 desc; @a:=f1 count(f1) 4 1 @@ -331,4 +334,22 @@ select @a:=f1, count(f1) from t1 group by 1 asc; 2 1 3 2 4 1 +select @a:=f2, count(f2) from t1 group by 1 desc; +@a:=f2 count(f2) +a 4 +b 1 +c 2 +d 1 +select @a:=f3, count(f3) from t1 group by 1 desc; +@a:=f3 count(f3) +1.5 4 +2.5 1 +3.5 2 +4.5 1 +select @a:=f4, count(f4) from t1 group by 1 desc; +@a:=f4 count(f4) +4.6 1 +3.6 2 +2.6 1 +1.6 4 drop table t1; diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test index 3df949ae669..3a3e8f88f83 100644 --- a/mysql-test/t/user_var.test +++ b/mysql-test/t/user_var.test @@ -226,8 +226,14 @@ SHOW COUNT(*) ERRORS; # # Bug#28494: Grouping by Item_func_set_user_var produces incorrect result. # -create table t1(f1 int); -insert into t1 values(1),(1),(2),(3),(4),(1),(3),(1); +create table t1(f1 int, f2 varchar(2), f3 float, f4 decimal(2,1)); +insert into t1 values + (1, "a", 1.5, 1.6), (1, "a", 1.5, 1.6), (2, "b", 2.5, 2.6), + (3, "c", 3.5, 3.6), (4, "d", 4.5, 4.6), (1, "a", 1.5, 1.6), + (3, "c", 3.5, 3.6), (1, "a", 1.5, 1.6); select @a:=f1, count(f1) from t1 group by 1 desc; select @a:=f1, count(f1) from t1 group by 1 asc; +select @a:=f2, count(f2) from t1 group by 1 desc; +select @a:=f3, count(f3) from t1 group by 1 desc; +select @a:=f4, count(f4) from t1 group by 1 desc; drop table t1; -- cgit v1.2.1 From a8e7c57a4e85f975e4165c57ce6c574cd573238f Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 3 Jun 2007 15:56:48 +0400 Subject: user_var.result: Corrected test case result for the bug#28494. item_func.h, item_func.cc: Corrected function names after fix for the bug#28494. mysql-test/r/user_var.result: Corrected test case result for the bug#28494. sql/item_func.h: Corrected function names after fix for the bug#28494. sql/item_func.cc: Corrected function names after fix for the bug#28494. --- mysql-test/r/user_var.result | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index 15a9fe2ecda..80b5dccc198 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -336,16 +336,16 @@ select @a:=f1, count(f1) from t1 group by 1 asc; 4 1 select @a:=f2, count(f2) from t1 group by 1 desc; @a:=f2 count(f2) -a 4 -b 1 -c 2 d 1 +c 2 +b 1 +a 4 select @a:=f3, count(f3) from t1 group by 1 desc; @a:=f3 count(f3) -1.5 4 -2.5 1 -3.5 2 4.5 1 +3.5 2 +2.5 1 +1.5 4 select @a:=f4, count(f4) from t1 group by 1 desc; @a:=f4 count(f4) 4.6 1 -- cgit v1.2.1 From 148da4010f0551afdc7681ee42f29db0ff0f4459 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 4 Jun 2007 03:03:15 -0700 Subject: Post-merge fix. --- mysql-test/r/ps_2myisam.result | 32 ++++++++++----------- mysql-test/r/ps_3innodb.result | 32 ++++++++++----------- mysql-test/r/ps_4heap.result | 32 ++++++++++----------- mysql-test/r/ps_5merge.result | 64 +++++++++++++++++++++--------------------- mysql-test/r/ps_7ndb.result | 32 ++++++++++----------- 5 files changed, 96 insertions(+), 96 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index facea5470e9..feb40de9a6d 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.result @@ -1927,8 +1927,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -1974,8 +1974,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2024,8 +2024,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2064,8 +2064,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2112,8 +2112,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2156,8 +2156,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2202,8 +2202,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2240,8 +2240,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index 97a78931332..9398426ec0b 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -1910,8 +1910,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -1957,8 +1957,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2007,8 +2007,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2047,8 +2047,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2095,8 +2095,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2139,8 +2139,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2185,8 +2185,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2223,8 +2223,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index 3f0900888cc..c2de727f572 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -1911,8 +1911,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -1958,8 +1958,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2008,8 +2008,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2048,8 +2048,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2096,8 +2096,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2140,8 +2140,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2186,8 +2186,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2224,8 +2224,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index f96ae5ea7cd..c1f36cc84de 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -1847,8 +1847,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -1894,8 +1894,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -1944,8 +1944,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -1984,8 +1984,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2032,8 +2032,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2076,8 +2076,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2122,8 +2122,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2160,8 +2160,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -4868,8 +4868,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -4915,8 +4915,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -4965,8 +4965,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -5005,8 +5005,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -5053,8 +5053,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -5097,8 +5097,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -5143,8 +5143,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -5181,8 +5181,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result index 52057c99120..26475f4c147 100644 --- a/mysql-test/r/ps_7ndb.result +++ b/mysql-test/r/ps_7ndb.result @@ -1910,8 +1910,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -1957,8 +1957,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2007,8 +2007,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2047,8 +2047,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2095,8 +2095,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2139,8 +2139,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2185,8 +2185,8 @@ def @arg07 5 23 1 Y 32896 31 63 def @arg08 5 23 1 Y 32896 31 63 def @arg09 5 23 1 Y 32896 31 63 def @arg10 5 23 1 Y 32896 31 63 -def @arg11 246 67 6 Y 128 30 63 -def @arg12 246 67 6 Y 128 30 63 +def @arg11 246 83 6 Y 128 30 63 +def @arg12 246 83 6 Y 128 30 63 def @arg13 251 16777216 10 Y 128 31 63 def @arg14 251 16777216 19 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 @@ -2223,8 +2223,8 @@ def @arg07 5 23 0 Y 32896 31 63 def @arg08 5 23 0 Y 32896 31 63 def @arg09 5 23 0 Y 32896 31 63 def @arg10 5 23 0 Y 32896 31 63 -def @arg11 246 67 0 Y 128 30 63 -def @arg12 246 67 0 Y 128 30 63 +def @arg11 246 83 0 Y 128 30 63 +def @arg12 246 83 0 Y 128 30 63 def @arg13 251 16777216 0 Y 128 31 63 def @arg14 251 16777216 0 Y 128 31 63 def @arg15 251 16777216 19 Y 128 31 63 -- cgit v1.2.1 From 2bc1bec13cb66b6ed166c83b043588c77c564678 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 4 Jun 2007 05:55:27 -0700 Subject: Post-merge fix. --- mysql-test/r/subselect.result | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index c9b502a7e8e..8d4a5ee32be 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4075,9 +4075,9 @@ CREATE TABLE t1 (a int); INSERT INTO t1 VALUES (1), (2); EXPLAIN EXTENDED SELECT * FROM (SELECT count(*) FROM t1 GROUP BY a) as res; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY ALL NULL NULL NULL NULL 2 -2 DERIVED t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY ALL NULL NULL NULL NULL 2 100.00 +2 DERIVED t1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort Warnings: Note 1003 select `res`.`count(*)` AS `count(*)` from (select count(0) AS `count(*)` from `test`.`t1` group by `test`.`t1`.`a`) `res` DROP TABLE t1; -- cgit v1.2.1