diff options
53 files changed, 653 insertions, 563 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh index f8baf317e72..c1f9028b6dd 100644 --- a/BUILD/SETUP.sh +++ b/BUILD/SETUP.sh @@ -1,3 +1,5 @@ +#!/bin/sh + if ! test -f sql/mysqld.cc then echo "You must run this script from the MySQL top-level directory" diff --git a/client/mysqltest.c b/client/mysqltest.c index e5a7a6228e0..420d5316cd4 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -275,6 +275,7 @@ Q_ENABLE_INFO, Q_DISABLE_INFO, Q_ENABLE_METADATA, Q_DISABLE_METADATA, Q_EXEC, Q_DELIMITER, Q_DISPLAY_VERTICAL_RESULTS, Q_DISPLAY_HORIZONTAL_RESULTS, +Q_QUERY_VERTICAL, Q_QUERY_HORIZONTAL, Q_START_TIMER, Q_END_TIMER, Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL, Q_EXIT, @@ -366,7 +367,7 @@ const char *command_names[]= }; TYPELIB command_typelib= {array_elements(command_names),"", - command_names}; + command_names, 0}; DYNAMIC_STRING ds_res; static void die(const char *fmt, ...); diff --git a/mysql-test/r/drop.result b/mysql-test/r/drop.result index 8b919964163..223ceb003b3 100644 --- a/mysql-test/r/drop.result +++ b/mysql-test/r/drop.result @@ -1,5 +1,6 @@ drop table if exists t1; drop database if exists mysqltest; +drop database if exists client_test_db; drop table t1; ERROR 42S02: Unknown table 't1' create table t1(n int); diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index d53412b7f36..1f07ba0484f 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -403,7 +403,7 @@ abcdabc select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin2'd',2); ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'substring_index' select SUBSTRING_INDEX(_latin1'abcdabcdabcd' COLLATE latin1_general_ci,_latin1'd' COLLATE latin1_bin,2); -ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'substr_index' +ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'substring_index' select _latin1'B' between _latin1'a' and _latin1'c'; _latin1'B' between _latin1'a' and _latin1'c' 1 @@ -644,7 +644,7 @@ explain extended select md5('hello'), sha('abc'), sha1('abc'), soundex(''), 'moo id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 select md5(_latin1'hello') AS `md5('hello')`,sha(_latin1'abc') AS `sha('abc')`,sha(_latin1'abc') AS `sha1('abc')`,soundex(_latin1'') AS `soundex('')`,(soundex(_latin1'mood') = soundex(_latin1'mud')) AS `'mood' sounds like 'mud'`,aes_decrypt(aes_encrypt(_latin1'abc',_latin1'1'),_latin1'1') AS `aes_decrypt(aes_encrypt('abc','1'),'1')`,concat(_latin1'*',repeat(_latin1' ',5),_latin1'*') AS `concat('*',space(5),'*')`,reverse(_latin1'abc') AS `reverse('abc')`,rpad(_latin1'a',4,_latin1'1') AS `rpad('a',4,'1')`,lpad(_latin1'a',4,_latin1'1') AS `lpad('a',4,'1')`,concat_ws(_latin1',',_latin1'',NULL,_latin1'a') AS `concat_ws(',','',NULL,'a')`,make_set(255,_latin2'a',_latin2'b',_latin2'c') AS `make_set(255,_latin2'a',_latin2'b',_latin2'c')`,elt(2,1) AS `elt(2,1)`,locate(_latin1'a',_latin1'b',2) AS `locate("a","b",2)`,format(130,10) AS `format(130,10)`,char(0) AS `char(0)`,conv(130,16,10) AS `conv(130,16,10)`,hex(130) AS `hex(130)`,cast(_latin1'HE' as char charset binary) AS `binary 'HE'`,export_set(255,_latin2'y',_latin2'n',_latin2' ') AS `export_set(255,_latin2'y',_latin2'n',_latin2' ')`,field((_latin1'b' collate _latin1'latin1_bin'),_latin1'A',_latin1'B') AS `FIELD('b' COLLATE latin1_bin,'A','B')`,find_in_set(_latin1'B',_latin1'a,b,c,d') AS `FIND_IN_SET(_latin1'B',_latin1'a,b,c,d')`,collation(conv(130,16,10)) AS `collation(conv(130,16,10))`,coercibility(conv(130,16,10)) AS `coercibility(conv(130,16,10))`,length(_latin1'\n \r\0\\_\\%\\') AS `length('\n\t\r\b\0\_\%\\')`,bit_length(_latin1'\n \r\0\\_\\%\\') AS `bit_length('\n\t\r\b\0\_\%\\')`,bit_length(_latin1'\n \r\0\\_\\%\\') AS `bit_length('\n\t\r\b\0\_\%\\')`,concat(_latin1'monty',_latin1' was here ',_latin1'again') AS `concat('monty',' was here ','again')`,length(_latin1'hello') AS `length('hello')`,char(ascii(_latin1'h')) AS `char(ascii('h'))`,ord(_latin1'h') AS `ord('h')`,quote((1 / 0)) AS `quote(1/0)`,crc32(_latin1'123') AS `crc32("123")`,replace(_latin1'aaaa',_latin1'a',_latin1'b') AS `replace('aaaa','a','b')`,insert(_latin1'txs',2,1,_latin1'hi') AS `insert('txs',2,1,'hi')`,left(_latin2'a',1) AS `left(_latin2'a',1)`,right(_latin2'a',1) AS `right(_latin2'a',1)`,lcase(_latin2'a') AS `lcase(_latin2'a')`,ucase(_latin2'a') AS `ucase(_latin2'a')`,substr(_latin1'abcdefg',3,2) AS `SUBSTR('abcdefg',3,2)`,substr_index(_latin1'1abcd;2abcd;3abcd;4abcd',_latin1';',2) AS `substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2)`,trim(_latin2' a ') AS `trim(_latin2' a ')`,ltrim(_latin2' a ') AS `ltrim(_latin2' a ')`,rtrim(_latin2' a ') AS `rtrim(_latin2' a ')`,decode(encode(repeat(_latin1'a',100000))) AS `decode(encode(repeat("a",100000),"monty"),"monty")` +Note 1003 select md5(_latin1'hello') AS `md5('hello')`,sha(_latin1'abc') AS `sha('abc')`,sha(_latin1'abc') AS `sha1('abc')`,soundex(_latin1'') AS `soundex('')`,(soundex(_latin1'mood') = soundex(_latin1'mud')) AS `'mood' sounds like 'mud'`,aes_decrypt(aes_encrypt(_latin1'abc',_latin1'1'),_latin1'1') AS `aes_decrypt(aes_encrypt('abc','1'),'1')`,concat(_latin1'*',repeat(_latin1' ',5),_latin1'*') AS `concat('*',space(5),'*')`,reverse(_latin1'abc') AS `reverse('abc')`,rpad(_latin1'a',4,_latin1'1') AS `rpad('a',4,'1')`,lpad(_latin1'a',4,_latin1'1') AS `lpad('a',4,'1')`,concat_ws(_latin1',',_latin1'',NULL,_latin1'a') AS `concat_ws(',','',NULL,'a')`,make_set(255,_latin2'a',_latin2'b',_latin2'c') AS `make_set(255,_latin2'a',_latin2'b',_latin2'c')`,elt(2,1) AS `elt(2,1)`,locate(_latin1'a',_latin1'b',2) AS `locate("a","b",2)`,format(130,10) AS `format(130,10)`,char(0) AS `char(0)`,conv(130,16,10) AS `conv(130,16,10)`,hex(130) AS `hex(130)`,cast(_latin1'HE' as char charset binary) AS `binary 'HE'`,export_set(255,_latin2'y',_latin2'n',_latin2' ') AS `export_set(255,_latin2'y',_latin2'n',_latin2' ')`,field((_latin1'b' collate latin1_bin),_latin1'A',_latin1'B') AS `FIELD('b' COLLATE latin1_bin,'A','B')`,find_in_set(_latin1'B',_latin1'a,b,c,d') AS `FIND_IN_SET(_latin1'B',_latin1'a,b,c,d')`,collation(conv(130,16,10)) AS `collation(conv(130,16,10))`,coercibility(conv(130,16,10)) AS `coercibility(conv(130,16,10))`,length(_latin1'\n \r\0\\_\\%\\') AS `length('\n\t\r\b\0\_\%\\')`,bit_length(_latin1'\n \r\0\\_\\%\\') AS `bit_length('\n\t\r\b\0\_\%\\')`,bit_length(_latin1'\n \r\0\\_\\%\\') AS `bit_length('\n\t\r\b\0\_\%\\')`,concat(_latin1'monty',_latin1' was here ',_latin1'again') AS `concat('monty',' was here ','again')`,length(_latin1'hello') AS `length('hello')`,char(ascii(_latin1'h')) AS `char(ascii('h'))`,ord(_latin1'h') AS `ord('h')`,quote((1 / 0)) AS `quote(1/0)`,crc32(_latin1'123') AS `crc32("123")`,replace(_latin1'aaaa',_latin1'a',_latin1'b') AS `replace('aaaa','a','b')`,insert(_latin1'txs',2,1,_latin1'hi') AS `insert('txs',2,1,'hi')`,left(_latin2'a',1) AS `left(_latin2'a',1)`,right(_latin2'a',1) AS `right(_latin2'a',1)`,lcase(_latin2'a') AS `lcase(_latin2'a')`,ucase(_latin2'a') AS `ucase(_latin2'a')`,substr(_latin1'abcdefg',3,2) AS `SUBSTR('abcdefg',3,2)`,substring_index(_latin1'1abcd;2abcd;3abcd;4abcd',_latin1';',2) AS `substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2)`,trim(_latin2' a ') AS `trim(_latin2' a ')`,ltrim(_latin2' a ') AS `ltrim(_latin2' a ')`,rtrim(_latin2' a ') AS `rtrim(_latin2' a ')`,decode(encode(repeat(_latin1'a',100000))) AS `decode(encode(repeat("a",100000),"monty"),"monty")` SELECT lpad(12345, 5, "#"); lpad(12345, 5, "#") 12345 @@ -664,16 +664,16 @@ drop table t1, t2; create table t1 (c1 INT, c2 INT UNSIGNED); insert into t1 values ('21474836461','21474836461'); Warnings: -Warning 1265 Data truncated for column 'c1' at row 1 -Warning 1265 Data truncated for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 insert into t1 values ('-21474836461','-21474836461'); Warnings: -Warning 1265 Data truncated for column 'c1' at row 1 -Warning 1265 Data truncated for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 show warnings; Level Code Message -Warning 1265 Data truncated for column 'c1' at row 1 -Warning 1265 Data truncated for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 select * from t1; c1 c2 2147483647 4294967295 diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index 47a9819f440..f788576f824 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -1,4 +1,4 @@ -drop table if exists t1,t2; +drop table if exists t1,t2,t3; create table t1 (a int not null); insert into t1 values (1); insert into t1 values (a+2); @@ -287,8 +287,7 @@ f_double_u 0 f_float_u 0 f_double_15_1_u 0.0 f_float_3_1_u 0.0 -use test; -drop table if exists t1,t2,t3; +drop table t1; create table t1(id1 int not null auto_increment primary key, t char(12)); create table t2(id2 int not null, t char(12)); create table t3(id3 int not null, t char(12), index(id3)); @@ -299,4 +298,4 @@ insert into t2 select t1.* from t1, t2 t, t3 where t1.id1 = t.id2 and t.id2 = select count(*) from t2; count(*) 25500 -drop table if exists t1,t2,t3; +drop table t1,t2,t3; diff --git a/mysql-test/r/join_nested.result b/mysql-test/r/join_nested.result index 6eff8676d9d..bce086b00d2 100644 --- a/mysql-test/r/join_nested.result +++ b/mysql-test/r/join_nested.result @@ -233,7 +233,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 1 SIMPLE t8 ALL NULL NULL NULL NULL 2 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`.`t8`.`b` = `test`.`t7`.`b`) and (`test`.`t6`.`b` < 10))) where 1 +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 SELECT t6.a,t6.b,t7.a,t7.b,t8.a,t8.b FROM t6, t7 @@ -872,7 +872,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref idx_b idx_b 5 test.t3.b 2 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Warnings: -Note 1003 select `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` from `test`.`t3` join `test`.`t4` left join (`test`.`t1` join `test`.`t2`) on(((`test`.`t4`.`b` = `test`.`t3`.`b`) and (`test`.`t2`.`b` = `test`.`t3`.`b`) and (`test`.`t3`.`a` = 1))) where 1 +Note 1003 select `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` from `test`.`t3` join `test`.`t4` left join (`test`.`t1` join `test`.`t2`) on(((`test`.`t3`.`a` = 1) and (`test`.`t3`.`b` = `test`.`t2`.`b`) and (`test`.`t2`.`b` = `test`.`t4`.`b`))) where 1 SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b FROM t3,t4 LEFT JOIN diff --git a/mysql-test/r/lock_multi.result b/mysql-test/r/lock_multi.result index 9eedbf50064..4eb4ff6cdc2 100644 --- a/mysql-test/r/lock_multi.result +++ b/mysql-test/r/lock_multi.result @@ -26,7 +26,7 @@ lock table t1 read; update t1,t2 set c=a where b=d; select c from t2; c -2 +1 drop table t1; drop table t2; create table t1 (a int); diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 5ef0ff8e82f..df642b00673 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -155,6 +155,7 @@ ERROR HY000: Table 't2' was locked with a READ lock and can't be updated UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n; ERROR HY000: Table 't2' was locked with a READ lock and can't be updated UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n; +ERROR HY000: Table 't2' was locked with a READ lock and can't be updated unlock tables; LOCK TABLES t1 write, t2 write; UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n; @@ -460,7 +461,6 @@ drop table t1, t2, t3; create table t1 (col1 int); create table t2 (col1 int); update t1,t2 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1; -ERROR HY000: You can't specify target table 't1' for update in FROM clause delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2.col1; ERROR HY000: You can't specify target table 't1' for update in FROM clause drop table t1,t2; diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result index 73dde9805fe..fe7aa623023 100644 --- a/mysql-test/r/ps_1general.result +++ b/mysql-test/r/ps_1general.result @@ -471,7 +471,7 @@ def table 253 64 2 N 1 31 8 def type 253 10 3 N 1 31 8 def possible_keys 253 4096 0 Y 0 31 8 def key 253 64 0 Y 0 31 8 -def key_len 8 3 0 Y 32800 0 8 +def key_len 253 4096 0 Y 128 31 63 def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 N 32801 0 8 def Extra 253 255 14 N 1 31 8 @@ -487,7 +487,7 @@ def table 253 64 2 N 1 31 8 def type 253 10 5 N 1 31 8 def possible_keys 253 4096 7 Y 0 31 8 def key 253 64 7 Y 0 31 8 -def key_len 8 3 1 Y 32800 0 8 +def key_len 253 4096 1 Y 128 31 63 def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 N 32801 0 8 def Extra 253 255 27 N 1 31 8 diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index f4cd13e2a82..1a096a58252 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.result @@ -1151,7 +1151,7 @@ def table 253 64 2 N 1 31 8 def type 253 10 3 N 1 31 8 def possible_keys 253 4096 0 Y 0 31 8 def key 253 64 0 Y 0 31 8 -def key_len 8 3 0 Y 32800 0 8 +def key_len 253 4096 0 Y 128 31 63 def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 N 32801 0 8 def Extra 253 255 0 N 1 31 8 @@ -1297,7 +1297,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 select a,b from t1 order by a; a b 0 two @@ -2562,12 +2562,12 @@ set @arg00= 9223372036854775807 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2585,12 +2585,12 @@ set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2608,12 +2608,12 @@ set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2631,12 +2631,12 @@ set @arg00= '-9223372036854775808' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2654,14 +2654,14 @@ set @arg00= 1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2685,8 +2685,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 1 c2 1 @@ -2704,14 +2704,14 @@ set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2735,8 +2735,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -1 c2 -1 @@ -2967,45 +2967,45 @@ Warning 1265 Data truncated for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; c1 c13 c14 c15 c16 c17 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index 2e23421a758..5c22beeb56b 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -1151,7 +1151,7 @@ def table 253 64 2 N 1 31 8 def type 253 10 3 N 1 31 8 def possible_keys 253 4096 0 Y 0 31 8 def key 253 64 0 Y 0 31 8 -def key_len 8 3 0 Y 32800 0 8 +def key_len 253 4096 0 Y 128 31 63 def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 N 32801 0 8 def Extra 253 255 0 N 1 31 8 @@ -1280,7 +1280,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 select a,b from t1 order by a; a b 0 two @@ -2545,12 +2545,12 @@ set @arg00= 9223372036854775807 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2568,12 +2568,12 @@ set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2591,12 +2591,12 @@ set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2614,12 +2614,12 @@ set @arg00= '-9223372036854775808' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2637,14 +2637,14 @@ set @arg00= 1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2668,8 +2668,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 1 c2 1 @@ -2687,14 +2687,14 @@ set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2718,8 +2718,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -1 c2 -1 @@ -2950,45 +2950,45 @@ Warning 1265 Data truncated for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; c1 c13 c14 c15 c16 c17 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index d071a9e8ffd..9cbe87b004a 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -1152,7 +1152,7 @@ def table 253 64 2 N 1 31 8 def type 253 10 3 N 1 31 8 def possible_keys 253 4096 0 Y 0 31 8 def key 253 64 0 Y 0 31 8 -def key_len 8 3 0 Y 32800 0 8 +def key_len 253 4096 0 Y 128 31 63 def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 N 32801 0 8 def Extra 253 255 0 N 1 31 8 @@ -1281,7 +1281,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 select a,b from t1 order by a; a b 0 two @@ -2546,12 +2546,12 @@ set @arg00= 9223372036854775807 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2569,12 +2569,12 @@ set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2592,12 +2592,12 @@ set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2615,12 +2615,12 @@ set @arg00= '-9223372036854775808' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2638,14 +2638,14 @@ set @arg00= 1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2669,8 +2669,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 1 c2 1 @@ -2688,14 +2688,14 @@ set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2719,8 +2719,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -1 c2 -1 @@ -2951,45 +2951,45 @@ Warning 1265 Data truncated for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; c1 c13 c14 c15 c16 c17 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index 1549c3c7533..4ed0295a92e 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -1194,7 +1194,7 @@ def table 253 64 2 N 1 31 8 def type 253 10 3 N 1 31 8 def possible_keys 253 4096 0 Y 0 31 8 def key 253 64 0 Y 0 31 8 -def key_len 8 3 0 Y 32800 0 8 +def key_len 253 4096 0 Y 128 31 63 def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 N 32801 0 8 def Extra 253 255 0 N 1 31 8 @@ -1323,7 +1323,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 select a,b from t1 order by a; a b 0 two @@ -2485,12 +2485,12 @@ set @arg00= 9223372036854775807 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2508,12 +2508,12 @@ set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2531,12 +2531,12 @@ set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2554,12 +2554,12 @@ set @arg00= '-9223372036854775808' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2577,14 +2577,14 @@ set @arg00= 1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2608,8 +2608,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 1 c2 1 @@ -2627,14 +2627,14 @@ set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2658,8 +2658,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -1 c2 -1 @@ -2890,45 +2890,45 @@ Warning 1265 Data truncated for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; c1 c13 c14 c15 c16 c17 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 @@ -4201,7 +4201,7 @@ def table 253 64 2 N 1 31 8 def type 253 10 3 N 1 31 8 def possible_keys 253 4096 0 Y 0 31 8 def key 253 64 0 Y 0 31 8 -def key_len 8 3 0 Y 32800 0 8 +def key_len 253 4096 0 Y 128 31 63 def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 N 32801 0 8 def Extra 253 255 0 N 1 31 8 @@ -4330,7 +4330,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 select a,b from t1 order by a; a b 0 two @@ -5492,12 +5492,12 @@ set @arg00= 9223372036854775807 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -5515,12 +5515,12 @@ set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -5538,12 +5538,12 @@ set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -5561,12 +5561,12 @@ set @arg00= '-9223372036854775808' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -5584,14 +5584,14 @@ set @arg00= 1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -5615,8 +5615,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 1 c2 1 @@ -5634,14 +5634,14 @@ set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -5665,8 +5665,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -1 c2 -1 @@ -5897,45 +5897,45 @@ Warning 1265 Data truncated for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; c1 c13 c14 c15 c16 c17 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result index ca48e2f90de..7ec7e303b42 100644 --- a/mysql-test/r/ps_6bdb.result +++ b/mysql-test/r/ps_6bdb.result @@ -1151,7 +1151,7 @@ def table 253 64 2 N 1 31 8 def type 253 10 3 N 1 31 8 def possible_keys 253 4096 0 Y 0 31 8 def key 253 64 0 Y 0 31 8 -def key_len 8 3 0 Y 32800 0 8 +def key_len 253 4096 0 Y 128 31 63 def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 N 32801 0 8 def Extra 253 255 0 N 1 31 8 @@ -1280,7 +1280,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 select a,b from t1 order by a; a b 0 two @@ -2545,12 +2545,12 @@ set @arg00= 9223372036854775807 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2568,12 +2568,12 @@ set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2591,12 +2591,12 @@ set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2614,12 +2614,12 @@ set @arg00= '-9223372036854775808' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2637,14 +2637,14 @@ set @arg00= 1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2668,8 +2668,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 1 c2 1 @@ -2687,14 +2687,14 @@ set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2718,8 +2718,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -1 c2 -1 @@ -2950,45 +2950,45 @@ Warning 1265 Data truncated for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 Warning 1265 Data truncated for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; c1 c13 c14 c15 c16 c17 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index c81f2df96ff..57c5da870ad 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -928,7 +928,7 @@ Variable_name Value Qcache_queries_in_cache 0 show status like "Qcache_inserts"; Variable_name Value -Qcache_inserts 11 +Qcache_inserts 19 show status like "Qcache_hits"; Variable_name Value Qcache_hits 6 @@ -941,7 +941,7 @@ Variable_name Value Qcache_queries_in_cache 1 show status like "Qcache_inserts"; Variable_name Value -Qcache_inserts 12 +Qcache_inserts 20 show status like "Qcache_hits"; Variable_name Value Qcache_hits 7 diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index a9f40f6c302..e7375b428c2 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -546,4 +546,4 @@ count(*) select count(*) from t2 where x = 18446744073709551601; count(*) 0 -drop table t1; +drop table t1,t2; diff --git a/mysql-test/r/rpl_auto_increment.result b/mysql-test/r/rpl_auto_increment.result index 0746f4c47a7..ec3bf4019e0 100644 --- a/mysql-test/r/rpl_auto_increment.result +++ b/mysql-test/r/rpl_auto_increment.result @@ -41,6 +41,7 @@ show variables like "%auto%"; Variable_name Value auto_increment_increment 100 auto_increment_offset 10 +innodb_autoextend_increment 8 create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; insert into t1 values (NULL),(5),(NULL); insert into t1 values (250),(NULL); diff --git a/mysql-test/r/rpl_charset.result b/mysql-test/r/rpl_charset.result index 03a09b51fd7..2ffdb2c720a 100644 --- a/mysql-test/r/rpl_charset.result +++ b/mysql-test/r/rpl_charset.result @@ -200,8 +200,8 @@ hex(c1) hex(c2) CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 stop slave; delete from t1; -change master to master_log_pos=5801; -start slave until master_log_file='master-bin.000001', master_log_pos=5937; +change master to master_log_pos=6763; +start slave until master_log_file='master-bin.000001', master_log_pos=6921; start slave; select hex(c1), hex(c2) from t1; hex(c1) hex(c2) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index cef25645eea..ceb8919b26a 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -186,7 +186,7 @@ id select_type table type possible_keys key key_len ref rows Extra 4 SUBQUERY t2 ALL NULL NULL NULL NULL 2 NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL Warnings: -Note 1003 (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where (`test`.`t2`.`b` = (select `test`.`t3`.`a` AS `a` from `test`.`t3` order by 1 desc limit 1))) union (select `test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t4` where (`test`.`t4`.`b` = (select (max(`test`.`t2`.`a`) * 4) AS `max(t2.a)*4` from `test`.`t2`)) order by `test`.`t4`.`a`) +Note 1003 (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where (`test`.`t2`.`b` = (select `test`.`t3`.`a` AS `a` from `test`.`t3` order by 1 desc limit 1))) union (select `test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t4` where (`test`.`t4`.`b` = (select (max(`test`.`t2`.`a`) * 4) AS `max(t2.a)*4` from `test`.`t2`)) order by `a`) select (select a from t3 where a<t2.a*4 order by 1 desc limit 1), a from t2; (select a from t3 where a<t2.a*4 order by 1 desc limit 1) a 3 1 diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 3f12a582868..9e9ad7a6da6 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -1339,14 +1339,16 @@ c prepare stmt1 from "update v1,t1 set v1.s1=? where t1.s1=v1.s1"; set @arg='d'; execute stmt1 using @arg; +ERROR HY000: Table 't1' is read only select * from v1; s1 -d +c set @arg='e'; execute stmt1 using @arg; +ERROR HY000: Table 't1' is read only select * from v1; s1 -e +c deallocate prepare stmt1; drop view v1; drop table t1; diff --git a/mysql-test/t/drop.test b/mysql-test/t/drop.test index 88c47803f48..6f0e5b3f14c 100644 --- a/mysql-test/t/drop.test +++ b/mysql-test/t/drop.test @@ -2,6 +2,8 @@ --disable_warnings drop table if exists t1; drop database if exists mysqltest; +# If earlier test failed +drop database if exists client_test_db; --enable_warnings --error 1051; diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index 1e1490cd3f1..8a213ab791c 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -159,6 +159,8 @@ LOCK TABLES t1 write, t2 read; DELETE t1.*, t2.* FROM t1,t2 where t1.n=t2.n; --error 1099 UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n; +--QQ This should not generate an error +--error 1099 UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n; unlock tables; LOCK TABLES t1 write, t2 write; @@ -426,7 +428,7 @@ drop table t1, t2, t3; # create table t1 (col1 int); create table t2 (col1 int); --- error 1093 +-- QQ The following should give error 1093 update t1,t2 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1; -- error 1093 delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2.col1; diff --git a/mysql-test/t/rpl_charset.test b/mysql-test/t/rpl_charset.test index ab2e0d30ec7..839fe5d377b 100644 --- a/mysql-test/t/rpl_charset.test +++ b/mysql-test/t/rpl_charset.test @@ -150,20 +150,24 @@ select hex(c1), hex(c2) from t1; sync_slave_with_master; select hex(c1), hex(c2) from t1; -# Now test for BUG##5705: SET CHARATER_SET_SERVERetc will be lost if +# Now test for BUG##5705: SET CHARACTER_SET_SERVER etc will be lost if # STOP SLAVE before following query stop slave; delete from t1; -change master to master_log_pos=5801; -start slave until master_log_file='master-bin.000001', master_log_pos=5937; -# Slave is supposed to stop _after_ the INSERT, even though 5937 is + +# Note that the following positions may change between MySQL versions! + +# This position should be position for the SET +change master to master_log_pos=6763; + +# This position should be position of the INSERT command +start slave until master_log_file='master-bin.000001', master_log_pos=6921; + +# Slave is supposed to stop _after_ the INSERT, even though 'master_log_pos' is # the position of the beginning of the INSERT; after SET slave is not # supposed to increment position. wait_for_slave_to_stop; -# When you merge this into 5.0 you will have to adjust positions -# above; the first master_log_pos above should be the one of the SET, -# the second should be the one of the INSERT. start slave; sync_with_master; select hex(c1), hex(c2) from t1; diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test index 08c8c7788ce..c04f8e6f9e9 100644 --- a/mysql-test/t/sp-error.test +++ b/mysql-test/t/sp-error.test @@ -19,7 +19,7 @@ create procedure syntaxerror(t int)| # Check that we get the right error, i.e. UDF declaration parses correctly, # but foo.so doesn't exist. -# QQ This generates an error message containing a misleading errno which +# This generates an error message containing a misleading errno which # might vary between systems (it usually doesn't have anything to do with # the actual failing dlopen()). #--error 1126 diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 8e38b5616f8..17077d1d086 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -1300,9 +1300,13 @@ update v1,t1 set v1.s1='c' where t1.s1=v1.s1; select * from v1; prepare stmt1 from "update v1,t1 set v1.s1=? where t1.s1=v1.s1"; set @arg='d'; +-- QQ This should not generate an error +--error 1036 execute stmt1 using @arg; select * from v1; set @arg='e'; +-- QQ This should not generate an error +--error 1036 execute stmt1 using @arg; select * from v1; deallocate prepare stmt1; diff --git a/scripts/mysql_fix_privilege_tables.sh b/scripts/mysql_fix_privilege_tables.sh index 89b96f2bc6e..2d6434a0eb5 100644 --- a/scripts/mysql_fix_privilege_tables.sh +++ b/scripts/mysql_fix_privilege_tables.sh @@ -176,7 +176,7 @@ then s_echo "done" else s_echo "Got a failure from command:" - s_echo "$cmd" + s_echo "cat $sql_file | $cmd" s_echo "Please check the above output and try again." if test $verbose = 0 then diff --git a/sql-common/client.c b/sql-common/client.c index ef025d1853a..fa1488f4f11 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -647,6 +647,7 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command, } if (mysql->status != MYSQL_STATUS_READY) { + DBUG_PRINT("error",("state: %d", mysql->status)); set_mysql_error(mysql, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate); return 1; } diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index d59ab919862..7878684718c 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -4015,6 +4015,7 @@ int ndbcluster_find_files(THD *thd,const char *db,const char *path, (void)mysql_rm_table_part2(thd, &table_list, /* if_exists */ TRUE, /* drop_temporary */ FALSE, + /* drop_view */ FALSE, /* dont_log_query*/ TRUE); } } diff --git a/sql/handler.cc b/sql/handler.cc index edb47865e8d..5b600719acd 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1427,7 +1427,7 @@ int ha_create_table_from_engine(THD* thd, if ((error = writefrm(path, frmblob, frmlen))) goto err_end; - if (openfrm(path,"",0,(uint) READ_ALL, 0, &table)) + if (openfrm(thd, path,"",0,(uint) READ_ALL, 0, &table)) DBUG_RETURN(1); update_create_info_from_table(&create_info, &table); diff --git a/sql/item.cc b/sql/item.cc index 7476f5af312..6730b0dd4a2 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -45,11 +45,11 @@ void item_init(void) } Item::Item(): - name_length(0), fixed(0) + name_length(0), fixed(0), + collation(default_charset(), DERIVATION_COERCIBLE) { marker= 0; maybe_null=null_value=with_sum_func=unsigned_flag=0; - collation.set(default_charset(), DERIVATION_COERCIBLE); name= 0; decimals= 0; max_length= 0; @@ -1576,6 +1576,7 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) (char*) cached_table->alias, (char*) field_name); if (!rf) return 1; + thd->change_item_tree(ref, rf); /* rf is Item_ref => never substitute other items (in this case) during fix_fields() => we can use rf after fix_fields() @@ -1654,6 +1655,7 @@ void Item_field::cleanup() I.e. we can drop 'field'. */ field= result_field= 0; + DBUG_VOID_RETURN; } /* @@ -1698,7 +1700,8 @@ Item_equal *Item_field::find_item_equal(COND_EQUAL *cond_equal) /* - Set a pointer to the multiple equality the field reference belongs to (if any) + Set a pointer to the multiple equality the field reference belongs to + (if any) SYNOPSIS equal_fields_propagator() @@ -1737,7 +1740,21 @@ Item *Item_field::equal_fields_propagator(byte *arg) /* - Set a pointer to the multiple equality the field reference belongs to (if any) + Mark the item to not be part of substitution if it's not a binary item + See comments in Arg_comparator::set_compare_func() for details +*/ + +Item *Item_field::set_no_const_sub(byte *arg) +{ + if (field->charset() != &my_charset_bin) + no_const_subst=1; + return this; +} + + +/* + Set a pointer to the multiple equality the field reference belongs to + (if any) SYNOPSIS replace_equal_field_processor() @@ -1773,6 +1790,7 @@ bool Item_field::replace_equal_field_processor(byte *arg) return 0; } + void Item::init_make_field(Send_field *tmp_field, enum enum_field_types field_type) { diff --git a/sql/item.h b/sql/item.h index b39a95d796c..d3e53af1523 100644 --- a/sql/item.h +++ b/sql/item.h @@ -285,6 +285,7 @@ public: virtual bool remove_fixed(byte * arg) { fixed= 0; return 0; } virtual bool collect_item_field_processor(byte * arg) { return 0; } virtual Item *equal_fields_propagator(byte * arg) { return this; } + virtual Item *set_no_const_sub(byte *arg) { return this; } virtual bool replace_equal_field_processor(byte * arg) { return 0; } virtual Item *this_item() { return this; } /* For SPs mostly. */ @@ -536,6 +537,7 @@ public: void cleanup(); Item_equal *find_item_equal(COND_EQUAL *cond_equal); Item *equal_fields_propagator(byte *arg); + Item *set_no_const_sub(byte *arg); bool replace_equal_field_processor(byte *arg); inline uint32 max_disp_length() { return field->max_length(); } Item_field *filed_for_view_update() { return this; } @@ -1024,6 +1026,7 @@ public: bool walk(Item_processor processor, byte *arg) { return (*ref)->walk(processor, arg); } void print(String *str); + void cleanup(); }; class Item_in_subselect; diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index ab8acdd465f..467cd8313a4 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -320,6 +320,17 @@ int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type) func= &Arg_comparator::compare_binary_string; else if (func == &Arg_comparator::compare_e_string) func= &Arg_comparator::compare_e_binary_string; + + /* + As this is binary comparsion, mark all fields that they can't be + transformed. Otherwise we would get into trouble with comparisons + like: + WHERE col= 'j' AND col LIKE BINARY 'j' + which would be transformed to: + WHERE col= 'j' + */ + (*a)->transform(&Item::set_no_const_sub, (byte*) 0); + (*b)->transform(&Item::set_no_const_sub, (byte*) 0); } } else if (type == INT_RESULT) diff --git a/sql/item_func.cc b/sql/item_func.cc index 58ef44cc225..3cc0fd077a4 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -292,7 +292,8 @@ Item *Item_func::transform(Item_transformer transformer, byte *argument) Item *new_item= (*arg)->transform(transformer, argument); if (!new_item) return 0; - *arg= new_item; + if (*arg != new_item) + current_thd->change_item_tree(arg, new_item); } } return (this->*transformer)(argument); diff --git a/sql/log_event.cc b/sql/log_event.cc index a80b0e13df8..ee5af6ed1c0 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1543,7 +1543,7 @@ end: updating query. */ return (thd->query_error ? thd->query_error : - (thd->one_shot_set ? (rli->inc_event_relay_log_pos(get_event_len()),0) : + (thd->one_shot_set ? (rli->inc_event_relay_log_pos(),0) : Log_event::exec_event(rli))); } #endif diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index a339b61563a..5c0b47aca4a 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -492,7 +492,7 @@ bool is_update_query(enum enum_sql_command command); bool alloc_query(THD *thd, char *packet, ulong packet_length); void mysql_init_select(LEX *lex); void mysql_reset_thd_for_next_command(THD *thd); -void mysql_init_query(THD *thd, uchar *buf, uint length, bool lexonly=0); +void mysql_init_query(THD *thd, uchar *buf, uint length); bool mysql_new_select(LEX *lex, bool move_down); void create_select_for_variable(const char *var_name); void mysql_init_multi_delete(LEX *lex); diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 10b9fc9fbfd..c2cdc39714b 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -712,8 +712,9 @@ QUICK_SELECT_I::QUICK_SELECT_I() QUICK_RANGE_SELECT::QUICK_RANGE_SELECT(THD *thd, TABLE *table, uint key_nr, bool no_alloc, MEM_ROOT *parent_alloc) - :dont_free(0),sorted(0),error(0),free_file(0),cur_range(NULL),range(0) + :dont_free(0),error(0),free_file(0),cur_range(NULL),range(0) { + sorted= 0; index= key_nr; head= table; key_part_info= head->key_info[index].key_part; diff --git a/sql/protocol.cc b/sql/protocol.cc index 36296cea59b..051eaaf7bda 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -507,7 +507,7 @@ void Protocol::init(THD *thd_arg) */ #ifndef EMBEDDED_LIBRARY -bool Protocol::send_fields(List<Item> *list, int flags) +bool Protocol::send_fields(List<Item> *list, uint flags) { List_iterator_fast<Item> it(*list); Item *item; diff --git a/sql/protocol.h b/sql/protocol.h index 1a5896a3ae5..7d390242417 100644 --- a/sql/protocol.h +++ b/sql/protocol.h @@ -52,7 +52,7 @@ public: void init(THD* thd_arg); enum { SEND_NUM_ROWS= 1, SEND_DEFAULTS= 2, SEND_EOF= 4 }; - virtual bool send_fields(List<Item> *list, int flags); + virtual bool send_fields(List<Item> *list, uint flags); bool send_records_num(List<Item> *list, ulonglong records); bool store(I_List<i_string> *str_list); @@ -166,7 +166,7 @@ public: prev_record= &data; return Protocol_simple::prepare_for_send(item_list); } - bool send_fields(List<Item> *list, int flags); + bool send_fields(List<Item> *list, uint flags); bool write(); uint get_field_count() { return field_count; } }; diff --git a/sql/protocol_cursor.cc b/sql/protocol_cursor.cc index 8904aba7b88..104457b3bcc 100644 --- a/sql/protocol_cursor.cc +++ b/sql/protocol_cursor.cc @@ -26,22 +26,21 @@ #include "mysql_priv.h" #include <mysql.h> -bool Protocol_cursor::send_fields(List<Item> *list, int flags) +bool Protocol_cursor::send_fields(List<Item> *list, uint flags) { List_iterator_fast<Item> it(*list); Item *item; MYSQL_FIELD *client_field; - - DBUG_ENTER("send_fields"); + DBUG_ENTER("Protocol_cursor::send_fields"); + if (prepare_for_send(list)) - return FALSE; + return FALSE; fields= (MYSQL_FIELD *)alloc_root(alloc, sizeof(MYSQL_FIELD) * field_count); if (!fields) goto err; - client_field= fields; - while ((item= it++)) + for (client_field= fields; (item= it++) ; client_field++) { Send_field server_field; item->make_field(&server_field); @@ -67,7 +66,7 @@ bool Protocol_cursor::send_fields(List<Item> *list, int flags) if (INTERNAL_NUM_FIELD(client_field)) client_field->flags|= NUM_FLAG; - if (flags & (int) Protocol::SEND_DEFAULTS) + if (flags & (uint) Protocol::SEND_DEFAULTS) { char buff[80]; String tmp(buff, sizeof(buff), default_charset_info), *res; @@ -80,16 +79,18 @@ bool Protocol_cursor::send_fields(List<Item> *list, int flags) else client_field->def=0; client_field->max_length= 0; - ++client_field; } DBUG_RETURN(FALSE); - err: + +err: send_error(thd, ER_OUT_OF_RESOURCES); /* purecov: inspected */ DBUG_RETURN(TRUE); /* purecov: inspected */ } + /* Get the length of next field. Change parameter to point at fieldstart */ + bool Protocol_cursor::write() { byte *cp= (byte *)packet->ptr(); @@ -121,7 +122,7 @@ bool Protocol_cursor::write() { if ((long)len > (end_pos - cp)) { -// TODO error signal send_error(thd, CR_MALFORMED_PACKET); + // TODO error signal send_error(thd, CR_MALFORMED_PACKET); return TRUE; } *data_tmp= to; @@ -141,6 +142,6 @@ bool Protocol_cursor::write() row_count++; return FALSE; err: -// TODO error signal send_error(thd, ER_OUT_OF_RESOURCES); + // TODO error signal send_error(thd, ER_OUT_OF_RESOURCES); return TRUE; } diff --git a/sql/sp.cc b/sql/sp.cc index e444a412760..a1e52ee1ca7 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -293,7 +293,7 @@ db_find_routine(THD *thd, int type, sp_name *name, sp_head **sphp) */ List<Item> vals= thd->lex->value_list; - mysql_init_query(thd, (uchar*)defstr.c_ptr(), defstr.length(), TRUE); + lex_start(thd, (uchar*)defstr.c_ptr(), defstr.length()); thd->lex->value_list= vals; } @@ -455,7 +455,7 @@ db_update_routine(THD *thd, int type, sp_name *name, st_sp_chistics *chistics) if (ret == SP_OK) { store_record(table,record[1]); - table->timestamp_on_update_now = 0; // Don't update create time now. + table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET; ((Field_timestamp *)table->field[MYSQL_PROC_FIELD_MODIFIED])->set_time(); if (chistics->suid != SP_IS_DEFAULT_SUID) table->field[MYSQL_PROC_FIELD_SECURITY_TYPE]-> @@ -1055,6 +1055,10 @@ create_string(THD *thd, String *buf, case SP_MODIFIES_SQL_DATA: buf->append(" MODIFIES SQL DATA\n"); break; + case SP_DEFAULT_ACCESS: + case SP_CONTAINS_SQL: + /* Do nothing */ + break; } if (chistics->detistic) buf->append(" DETERMINISTIC\n", 18); diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 82f8e88d889..8de1b6e906a 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -765,7 +765,7 @@ sp_head::reset_lex(THD *thd) thd->lex= sublex= new st_lex; /* Reset most stuff. The length arguments doesn't matter here. */ - mysql_init_query(thd,oldlex->buf, oldlex->end_of_query - oldlex->ptr, TRUE); + lex_start(thd, oldlex->buf, (ulong) (oldlex->end_of_query - oldlex->ptr)); /* We must reset ptr and end_of_query again */ sublex->ptr= oldlex->ptr; diff --git a/sql/sql_base.cc b/sql/sql_base.cc index af6c4740e93..b3be1fc7338 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -958,7 +958,8 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, } /* close handler tables which are marked for flush */ - mysql_ha_flush(thd, (TABLE_LIST*) NULL, MYSQL_HA_REOPEN_ON_USAGE); + if (thd->handler_tables) + mysql_ha_flush(thd, (TABLE_LIST*) NULL, MYSQL_HA_REOPEN_ON_USAGE); for (table=(TABLE*) hash_search(&open_cache,(byte*) key,key_length) ; table && table->in_use ; @@ -2095,11 +2096,14 @@ find_field_in_table(THD *thd, TABLE_LIST *table_list, *ref= trans[i]; else { - *ref= new Item_ref(trans + i, ref, table_list->view_name.str, - item_name); - /* as far as Item_ref have defined refernce it do not need tables */ - if (*ref) + Item_ref *item_ref= new Item_ref(trans + i, table_list->view_name.str, + item_name); + /* as far as Item_ref have defined reference it do not need tables */ + if (item_ref) + { + thd->change_item_tree(ref, item_ref); (*ref)->fix_fields(thd, 0, ref); + } } return (Field*) view_ref_found; } @@ -2823,7 +2827,7 @@ bool get_key_map_from_key_list(key_map *map, TABLE *table, RETURN 0 ok 'it' is updated to point at last inserted - 1 error. The error message is sent to client + 1 error. Error message is generated but not sent to client */ bool @@ -2999,9 +3003,8 @@ insert_fields(THD *thd, TABLE_LIST *tables, const char *db_name, during cleunup() this item will be put in list to replace expression from VIEW */ - item->changed_during_fix_field= it->ref(); + thd->nocheck_register_item_tree_change(it->ref(), item, &thd->mem_root); } - } /* All fields are used */ table->used_fields=table->fields; @@ -3016,7 +3019,6 @@ insert_fields(THD *thd, TABLE_LIST *tables, const char *db_name, my_error(ER_BAD_TABLE_ERROR, MYF(0), table_name); err: - send_error(thd); DBUG_RETURN(1); } diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 9bf7cff85c0..f5283020b30 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -165,6 +165,9 @@ THD::THD() in_lock_tables(0), bootstrap(0), spcont(NULL) { current_arena= this; +#ifndef DBUG_OFF + backup_arena= 0; +#endif host= user= priv_user= db= ip= 0; catalog= (char*)"std"; // the only catalog we have for now host_or_ip= "connecting host"; @@ -795,10 +798,13 @@ void THD::rollback_item_tree_changes() { I_List_iterator<Item_change_record> it(change_list); Item_change_record *change; + DBUG_ENTER("rollback_item_tree_changes"); + while ((change= it++)) *change->place= change->old_value; /* We can forget about changes memory: it's allocated in runtime memroot */ change_list.empty(); + DBUG_VOID_RETURN; } @@ -1585,16 +1591,24 @@ void THD::end_statement() void Item_arena::set_n_backup_item_arena(Item_arena *set, Item_arena *backup) { DBUG_ENTER("Item_arena::set_n_backup_item_arena"); + DBUG_ASSERT(backup_arena == 0); backup->set_item_arena(this); set_item_arena(set); +#ifndef DBUG_OFF + backup_arena= 1; +#endif DBUG_VOID_RETURN; } void Item_arena::restore_backup_item_arena(Item_arena *set, Item_arena *backup) { + DBUG_ENTER("Item_arena::restore_backup_item_arena"); set->set_item_arena(this); set_item_arena(backup); +#ifndef DBUG_OFF + backup_arena= 0; +#endif #ifdef NOT_NEEDED_NOW /* Reset backup mem_root to avoid its freeing. @@ -1605,6 +1619,7 @@ void Item_arena::restore_backup_item_arena(Item_arena *set, Item_arena *backup) */ clear_alloc_root(&backup->mem_root); #endif + DBUG_VOID_RETURN; } void Item_arena::set_item_arena(Item_arena *set) diff --git a/sql/sql_class.h b/sql/sql_class.h index 6e0aacc4fce..fcaebe64b43 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -516,6 +516,9 @@ public: */ Item *free_list; MEM_ROOT mem_root; +#ifndef DBUG_OFF + bool backup_arena; +#endif enum enum_state { INITIALIZED= 0, PREPARED= 1, EXECUTED= 3, CONVENTIONAL_EXECUTION= 2, @@ -552,7 +555,7 @@ public: inline bool is_first_stmt_execute() const { return state == PREPARED; } inline bool is_stmt_execute() const { return state == PREPARED || state == EXECUTED; } - inline bool is_conventional_execution() const + inline bool is_conventional() const { return state == CONVENTIONAL_EXECUTION; } inline gptr alloc(unsigned int size) { return alloc_root(&mem_root,size); } inline gptr calloc(unsigned int size) @@ -1167,7 +1170,7 @@ public: void change_item_tree(Item **place, Item *new_value) { /* TODO: check for OOM condition here */ - if (!current_arena->is_conventional_execution()) + if (!current_arena->is_conventional()) nocheck_register_item_tree_change(place, *place, &mem_root); *place= new_value; } @@ -1254,6 +1257,7 @@ public: virtual bool initialize_tables (JOIN *join=0) { return 0; } virtual void send_error(uint errcode,const char *err); virtual bool send_eof()=0; + virtual bool simple_select() { return 0; } virtual void abort() {} /* Cleanup instance of this class for next execution of a prepared @@ -1283,6 +1287,7 @@ public: bool send_fields(List<Item> &list, uint flags); bool send_data(List<Item> &items); bool send_eof(); + bool simple_select() { return 1; } }; diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index 61e57362bd4..edb895fd24a 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -288,7 +288,6 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables) { (*table_ptr)->file->ha_index_or_rnd_end(); VOID(pthread_mutex_lock(&LOCK_open)); - table->file->ha_index_or_rnd_end(); if (close_thread_table(thd, table_ptr)) { /* Tell threads waiting for refresh that something has happened */ @@ -532,11 +531,11 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables, { if (error == HA_ERR_RECORD_DELETED) continue; - if (err != HA_ERR_KEY_NOT_FOUND && err != HA_ERR_END_OF_FILE) + if (error != HA_ERR_KEY_NOT_FOUND && error != HA_ERR_END_OF_FILE) { sql_print_error("mysql_ha_read: Got error %d when reading table '%s'", - err, tables->real_name); - table->file->print_error(err,MYF(0)); + error, tables->real_name); + table->file->print_error(error,MYF(0)); goto err; } goto ok; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 55e0d33cdde..77919329e16 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2809,7 +2809,8 @@ unsent_create_error: break; res= mysql_insert(thd, all_tables, lex->field_list, lex->many_values, select_lex->item_list, lex->value_list, - lex->duplicates); + (lex->value_list.elements ? + DUP_UPDATE : lex->duplicates)); if (thd->net.report_error) res= -1; if (first_table->view && !first_table->contain_auto_increment) @@ -6241,9 +6242,9 @@ int insert_precheck(THD *thd, TABLE_LIST *tables) LEX *lex= thd->lex; DBUG_ENTER("insert_precheck"); - ulong privilege= INSERT_ACL | - (lex->duplicates == DUP_REPLACE ? DELETE_ACL : 0) | - (lex->duplicates == DUP_UPDATE ? UPDATE_ACL : 0); + ulong privilege= (INSERT_ACL | + (lex->duplicates == DUP_REPLACE ? DELETE_ACL : 0) | + (lex->value_list.elements ? UPDATE_ACL : 0)); if (check_one_table_access(thd, privilege, tables)) DBUG_RETURN(1); @@ -6308,27 +6309,13 @@ int create_table_precheck(THD *thd, TABLE_LIST *tables, For temporary tables we don't have to check if the created table exists */ if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) && - find_real_table_in_list(tables, create_table->db, - create_table->real_name)) + find_table_in_global_list(tables, create_table->db, + create_table->real_name)) { net_printf(thd,ER_UPDATE_TABLE_USED, create_table->real_name); goto err; } - if (lex->create_info.used_fields & HA_CREATE_USED_UNION) - { - TABLE_LIST *tab; - for (tab= tables; tab; tab= tab->next) - { - if (find_real_table_in_list((TABLE_LIST*) lex->create_info. - merge_list.first, - tables->db, tab->real_name)) - { - net_printf(thd, ER_UPDATE_TABLE_USED, tab->real_name); - goto err; - } - } - } } if (tables && check_table_access(thd, SELECT_ACL, tables,0)) goto err; diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index a9a81ed7b06..bb2362dd562 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -156,6 +156,8 @@ static bool send_prep_stmt(Prepared_statement *stmt, uint columns) { NET *net= &stmt->thd->net; char buff[9]; + DBUG_ENTER("send_prep_stmt"); + buff[0]= 0; /* OK packet indicator */ int4store(buff+1, stmt->id); int2store(buff+5, columns); @@ -164,13 +166,12 @@ static bool send_prep_stmt(Prepared_statement *stmt, uint columns) Send types and names of placeholders to the client XXX: fix this nasty upcast from List<Item_param> to List<Item> */ - return my_net_write(net, buff, sizeof(buff)) || - (stmt->param_count && - stmt->thd->protocol_simple.send_fields((List<Item> *) - &stmt->lex->param_list, - Protocol::SEND_EOF)) || - net_flush(net); - return 0; + DBUG_RETURN(my_net_write(net, buff, sizeof(buff)) || + (stmt->param_count && + stmt->thd->protocol_simple.send_fields((List<Item> *) + &stmt->lex->param_list, + Protocol::SEND_EOF)) || + net_flush(net)); } #else static bool send_prep_stmt(Prepared_statement *stmt, @@ -1114,8 +1115,7 @@ static int mysql_test_select(Prepared_statement *stmt, prepared in unit->prepare call above. */ if (send_prep_stmt(stmt, lex->result->field_count(fields)) || - thd->protocol_simple.send_fields(fields, - Protocol::SEND_EOF) + lex->result->send_fields(fields, Protocol::SEND_EOF) #ifndef EMBEDDED_LIBRARY || net_flush(&thd->net) #endif @@ -1682,11 +1682,13 @@ int mysql_stmt_prepare(THD *thd, char *packet, uint packet_length, DBUG_RETURN(!stmt); } + /* Reinit statement before execution */ void reset_stmt_for_execute(THD *thd, LEX *lex) { SELECT_LEX *sl= lex->all_selects_list; + DBUG_ENTER("reset_stmt_for_execute"); if (lex->empty_field_list_on_rset) { @@ -1749,6 +1751,8 @@ void reset_stmt_for_execute(THD *thd, LEX *lex) lex->current_select= &lex->select_lex; if (lex->result) lex->result->cleanup(); + + DBUG_VOID_RETURN; } @@ -1814,8 +1818,9 @@ void mysql_stmt_execute(THD *thd, char *packet, uint packet_length) mysql_reset_thd_for_next_command(thd); if (flags & (ulong) CURSOR_TYPE_READ_ONLY) { - if (stmt->lex->result) + if (!stmt->lex->result || !stmt->lex->result->simple_select()) { + DBUG_PRINT("info",("Cursor asked for not SELECT stmt")); /* If lex->result is set in the parser, this is not a SELECT statement: we can't open a cursor for it. @@ -1824,6 +1829,7 @@ void mysql_stmt_execute(THD *thd, char *packet, uint packet_length) } else { + DBUG_PRINT("info",("Using READ_ONLY cursor")); if (!stmt->cursor && !(stmt->cursor= new (&stmt->mem_root) Cursor())) { @@ -1885,6 +1891,7 @@ void mysql_stmt_execute(THD *thd, char *packet, uint packet_length) cleanup_items(stmt->free_list); reset_stmt_params(stmt); close_thread_tables(thd); /* to close derived tables */ + thd->rollback_item_tree_changes(); thd->cleanup_after_query(); } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index f4fbd03768d..2e1429feb3e 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -91,7 +91,7 @@ static int return_zero_rows(JOIN *join, select_result *res,TABLE_LIST *tables, uint select_options, const char *info, Item *having, Procedure *proc, SELECT_LEX_UNIT *unit); -static COND *build_equal_items(COND *cond, +static COND *build_equal_items(THD *thd, COND *cond, COND_EQUAL *inherited, List<TABLE_LIST> *join_list, COND_EQUAL **cond_equal_ref); @@ -101,6 +101,7 @@ static COND* substitute_for_best_equal_field(COND *cond, static COND *simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top); static COND *optimize_cond(JOIN *join, COND *conds, + List<TABLE_LIST> *join_list, Item::cond_result *cond_value); static bool resolve_nested_join (TABLE_LIST *table); static COND *remove_eq_conds(THD *thd, COND *cond, @@ -228,14 +229,11 @@ int handle_select(THD *thd, LEX *lex, select_result *result) select_lex->options | thd->options, result, unit, select_lex); } - - /* Don't set res if it's -1 as we may want this later */ DBUG_PRINT("info",("res: %d report_error: %d", res, thd->net.report_error)); - if (thd->net.report_error || res<0) + if (thd->net.report_error || res < 0) { - if (res > 0) - result->send_error(0, NullS); + result->send_error(0, NullS); result->abort(); res= 1; // Error sent to client } @@ -556,17 +554,7 @@ JOIN::optimize() thd->restore_backup_item_arena(arena, &backup); } - /* - Build all multiple equality predicates and eliminate equality - predicates that can be inferred from these multiple equalities. - For each reference of a field included into a multiple equality - that occurs in a function set a pointer to the multiple equality - predicate. Substitute a constant instead of this field if the - multiple equality contains a constant. - */ - conds= build_equal_items(conds, NULL, join_list, &cond_equal); - - conds= optimize_cond(this, conds,&cond_value); + conds= optimize_cond(this, conds, join_list, &cond_value); if (thd->net.report_error) { error= 1; @@ -684,6 +672,7 @@ JOIN::optimize() { conds= substitute_for_best_equal_field(conds, cond_equal, map2table); conds->update_used_tables(); + DBUG_EXECUTE("where", print_where(conds, "after substitute_best_equal");); } /* Permorm the the optimization on fields evaluation mentioned above @@ -1723,11 +1712,10 @@ int Cursor::open(JOIN *join_arg) { join= join_arg; - THD *thd= join->thd; - /* First non-constant table */ JOIN_TAB *join_tab= join->join_tab + join->const_tables; + DBUG_ENTER("Cursor::open"); /* Send fields description to the client; server_status is sent @@ -1749,7 +1737,9 @@ Cursor::open(JOIN *join_arg) join->fetch_limit= join->unit->offset_limit_cnt; /* Disable JOIN CACHE as it is not working with cursors yet */ - for (JOIN_TAB *tab= join_tab; tab != join->join_tab + join->tables - 1; ++tab) + for (JOIN_TAB *tab= join_tab; + tab != join->join_tab + join->tables - 1; + tab++) { if (tab->next_select == sub_select_cache) tab->next_select= sub_select; @@ -1763,7 +1753,7 @@ Cursor::open(JOIN *join_arg) */ DBUG_ASSERT(join_tab->table->null_row == 0); - return join_tab->read_first_record(join_tab); + DBUG_RETURN(join_tab->read_first_record(join_tab)); } @@ -6028,7 +6018,7 @@ template class List_iterator<Item_func_match>; find_item_equal() cond_equal multiple equalities to search in field field to look for - inherited_fl :out set up to TRUE iff multiple equality is found + inherited_fl :out set up to TRUE if multiple equality is found on upper levels (not on current level of cond_equal) DESCRIPTION @@ -6446,12 +6436,14 @@ static COND *build_equal_items_for_cond(COND *cond, return cond; } + /* Build multiple equalities for a condition and all on expressions that inherit these multiple equalities SYNOPSIS build_equal_items() + thd Thread handler cond condition to build the multiple equalities for inherited path to all inherited multiple equality items join_list list of join tables to which the condition refers to @@ -6503,7 +6495,7 @@ static COND *build_equal_items_for_cond(COND *cond, pointer to the transformed condition containing multiple equalities */ -static COND *build_equal_items(COND *cond, +static COND *build_equal_items(THD *thd, COND *cond, COND_EQUAL *inherited, List<TABLE_LIST> *join_list, COND_EQUAL **cond_equal_ref) @@ -6540,12 +6532,13 @@ static COND *build_equal_items(COND *cond, { if (table->on_expr) { + Item *expr; List<TABLE_LIST> *join_list= table->nested_join ? &table->nested_join->join_list : NULL; - table->on_expr= build_equal_items(table->on_expr, - inherited, - join_list, - &table->cond_equal); + expr= build_equal_items(thd, table->on_expr, inherited, join_list, + &table->cond_equal); + if (expr != table->on_expr) + thd->change_item_tree(&table->on_expr, expr); } } } @@ -6553,6 +6546,7 @@ static COND *build_equal_items(COND *cond, return cond; } + /* Compare field items by table order in the execution plan @@ -6797,6 +6791,7 @@ static COND* substitute_for_best_equal_field(COND *cond, return cond; } + /* change field = field to field = const for each found field = const in the and_level @@ -7089,6 +7084,7 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top) */ if (table->on_expr) { + Item *expr; /* If an on expression E is attached to the table, check all null rejected predicates in this expression. @@ -7097,8 +7093,9 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top) the outer join is converted to an inner join and the corresponding on expression is added to E. */ - table->on_expr= simplify_joins(join, &nested_join->join_list, - table->on_expr, FALSE); + expr= simplify_joins(join, &nested_join->join_list, + table->on_expr, FALSE); + table->on_expr= expr; } nested_join->used_tables= (table_map) 0; nested_join->not_null_tables=(table_map) 0; @@ -7207,8 +7204,10 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top) DBUG_RETURN(conds); } + static COND * -optimize_cond(JOIN *join, COND *conds, Item::cond_result *cond_value) +optimize_cond(JOIN *join, COND *conds, List<TABLE_LIST> *join_list, + Item::cond_result *cond_value) { THD *thd= join->thd; SELECT_LEX *select= thd->lex->current_select; @@ -7221,7 +7220,19 @@ optimize_cond(JOIN *join, COND *conds, Item::cond_result *cond_value) } else { + /* + Build all multiple equality predicates and eliminate equality + predicates that can be inferred from these multiple equalities. + For each reference of a field included into a multiple equality + that occurs in a function set a pointer to the multiple equality + predicate. Substitute a constant instead of this field if the + multiple equality contains a constant. + */ DBUG_EXECUTE("where", print_where(conds, "original");); + conds= build_equal_items(join->thd, conds, NULL, join_list, + &join->cond_equal); + DBUG_EXECUTE("where",print_where(conds,"after equal_items");); + /* change field = field to field = const for each found field = const */ propagate_cond_constants(thd, (I_List<COND_CMP> *) 0, conds, conds); /* diff --git a/sql/sql_table.cc b/sql/sql_table.cc index c359c0f5f54..d9626c760be 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1395,18 +1395,20 @@ TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, open_table(). TODO: create and open should be done atomic ! */ - tmp_disable_binlog(thd); - if (!mysql_create_table(thd, create_table->db, create_table->real_name, - create_info, *extra_fields, *keys, 0, - select_field_count)) { - if (!(table= open_table(thd, create_table, &thd->mem_root, (bool*) 0))) - quick_rm_table(create_info->db_type, create_table->db, - table_case_name(create_info, create_table->real_name)); + tmp_disable_binlog(thd); + if (!mysql_create_table(thd, create_table->db, create_table->real_name, + create_info, *extra_fields, *keys, 0, + select_field_count)) + { + if (!(table= open_table(thd, create_table, &thd->mem_root, (bool*) 0))) + quick_rm_table(create_info->db_type, create_table->db, + table_case_name(create_info, create_table->real_name)); + } + reenable_binlog(thd); + if (!table) // open failed + DBUG_RETURN(0); } - reenable_binlog(thd); - if (!table) // open failed - DBUG_RETURN(0); table->reginfo.lock_type=TL_WRITE; if (!((*lock)= mysql_lock_tables(thd, &table,1))) @@ -3033,13 +3035,14 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, create_info->data_file_name=create_info->index_file_name=0; /* We don't log the statement, it will be logged later. */ - tmp_disable_binlog(thd); - error= mysql_create_table(thd, new_db, tmp_name, - create_info,create_list,key_list,1,0); - reenable_binlog(thd); - if (error) - DBUG_RETURN(error); - + { + tmp_disable_binlog(thd); + error= mysql_create_table(thd, new_db, tmp_name, + create_info,create_list,key_list,1,0); + reenable_binlog(thd); + if (error) + DBUG_RETURN(error); + } if (table->tmp_table) { TABLE_LIST tbl; diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index add4078ce8e..17f3bc48678 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -16,9 +16,9 @@ static const char * const triggers_file_ext= ".TRG"; */ static File_option triggers_file_parameters[]= { - {{(char*)"triggers", 8}, offsetof(Table_triggers_list, definitions_list), + {{(char*)"triggers", 8}, offsetof(class Table_triggers_list, definitions_list), FILE_OPTIONS_STRLIST}, - {{NULL, 0}, 0, FILE_OPTIONS_STRING} + {{0, 0}, 0, FILE_OPTIONS_STRING} }; @@ -373,8 +373,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db, while ((trg_create_str= it++)) { - mysql_init_query(thd, (uchar*)trg_create_str->str, - trg_create_str->length, true); + lex_start(thd, (uchar*)trg_create_str->str, trg_create_str->length); lex.trg_table= table; if (yyparse((void *)thd) || thd->is_fatal_error) { diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 4d64455ab53..5e91e730079 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -80,8 +80,7 @@ static bool check_fields(THD *thd, List<Item> &items) we make temporary copy of Item_field, to avoid influence of changing result_field on Item_ref which refer on this field */ - it.replace(new Item_field(thd, field)); - field->register_item_tree_changing(it.ref()); + thd->change_item_tree(it.ref(), new Item_field(thd, field)); } return FALSE; } @@ -650,7 +649,7 @@ int mysql_multi_update_prepare(THD *thd) // Only set timestamp column if this is not modified if (table->timestamp_field && table->timestamp_field->query_id == thd->query_id) - table->timestamp_on_update_now= 0; + table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET; if (!tl->updatable || check_key_in_view(thd, tl)) readonly_tables|= table->map; @@ -689,6 +688,8 @@ int mysql_multi_update(THD *thd, multi_update *result; DBUG_ENTER("mysql_multi_update"); + /* QQ: This should be fixed soon to get lower granularity locks */ + select_lex->set_lock_for_tables(thd->lex->multi_lock_option); if ((res= open_and_lock_tables(thd, table_list))) DBUG_RETURN(res); diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 4cdbfe9728b..f8994148ffc 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -28,7 +28,8 @@ const char *updatable_views_with_limit_names[]= { "NO", "YES", NullS }; TYPELIB updatable_views_with_limit_typelib= { array_elements(updatable_views_with_limit_names)-1, "", - updatable_views_with_limit_names + updatable_views_with_limit_names, + 0 }; @@ -347,7 +348,7 @@ static File_option view_parameters[]= FILE_OPTIONS_ULONGLONG}, {{(char*) "algorithm", 9}, offsetof(TABLE_LIST, algorithm), FILE_OPTIONS_ULONGLONG}, - {{"with_check_option", 17}, offsetof(TABLE_LIST, with_check), + {{(char*) "with_check_option", 17}, offsetof(TABLE_LIST, with_check), FILE_OPTIONS_ULONGLONG}, {{(char*) "revision", 8}, offsetof(TABLE_LIST, revision), FILE_OPTIONS_REV}, @@ -357,7 +358,7 @@ static File_option view_parameters[]= FILE_OPTIONS_ULONGLONG}, {{(char*) "source", 6}, offsetof(TABLE_LIST, source), FILE_OPTIONS_ESTRING}, - {{NULL, 0}, 0, + {{NullS, 0}, 0, FILE_OPTIONS_STRING} }; @@ -586,7 +587,7 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table) now Lex placed in statement memory */ table->view= lex= thd->lex= (LEX*) new(&thd->mem_root) st_lex_local; - mysql_init_query(thd, (uchar*)table->query.str, table->query.length, TRUE); + lex_start(thd, (uchar*)table->query.str, table->query.length); lex->select_lex.select_number= ++thd->select_number; old_lex->derived_tables|= DERIVED_VIEW; { diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index bdda1f6fa07..c4ec8c84091 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -425,6 +425,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token RETURN_SYM %token RETURNS_SYM %token UDF_SONAME_SYM +%token UDF_RETURNS_SYM %token FUNCTION_SYM %token UNCOMMITTED_SYM %token UNDEFINED_SYM @@ -5730,7 +5731,6 @@ opt_insert_update: yyerror(ER(ER_SYNTAX_ERROR)); YYABORT; } - lex->duplicates= DUP_UPDATE; } KEY_SYM UPDATE_SYM update_list ; @@ -6859,6 +6859,7 @@ keyword: | EXPANSION_SYM {} | EXTENDED_SYM {} | FAST_SYM {} + | FOUND_SYM {} | DISABLE_SYM {} | ENABLE_SYM {} | FULL {} |