Fixes after merge with 4.1

FOUND is not a reserved keyword anymore
Added Item_field::set_no_const_sub() to be able to mark fields that can't be substituted
Added 'simple_select' method to be able to quickly determinate if a select_result is a normal SELECT
Note that the 5.0 tree is not yet up to date: Sanja will have to fix multi-update-locks for this merge to be complete


BUILD/SETUP.sh:
  Portability fix
client/mysqltest.c:
  Portability fix
mysql-test/r/drop.result:
  updated results
mysql-test/r/func_str.result:
  New warnings (after merge)
mysql-test/r/insert.result:
  Updated tests
mysql-test/r/join_nested.result:
  Updated results (because of new column types in 5.0)
mysql-test/r/lock_multi.result:
  Temporarly wrong results until Sanja fixes multi-update-lock in 5.0
mysql-test/r/multi_update.result:
  Temporary fix until Sanja fixes multi-update locking
mysql-test/r/ps_1general.result:
  Update of results after merge
mysql-test/r/ps_2myisam.result:
  Update of results after merge
mysql-test/r/ps_3innodb.result:
  Update of results after merge
mysql-test/r/ps_4heap.result:
  Update of results after merge
mysql-test/r/ps_5merge.result:
  Update of results after merge
mysql-test/r/ps_6bdb.result:
  Update of results after merge
mysql-test/r/query_cache.result:
  Update of results after merge
mysql-test/r/range.result:
  New results for new tests
mysql-test/r/rpl_auto_increment.result:
  Update with new 4.0 information
mysql-test/r/rpl_charset.result:
  After merge fixes
mysql-test/r/subselect.result:
  After merge fixes
mysql-test/r/view.result:
  Temporary fix until multi-update-locking is fixed
mysql-test/t/drop.test:
  Safety fix
mysql-test/t/multi_update.test:
  Temporary fix until multi-update-locking is fixed
mysql-test/t/rpl_charset.test:
  More comments
mysql-test/t/sp-error.test:
  Updated comments
mysql-test/t/view.test:
  Temporary fix until multi-update-locking is fixed
scripts/mysql_fix_privilege_tables.sh:
  Better error message
sql-common/client.c:
  More debugging
sql/ha_ndbcluster.cc:
  After merge fixes
sql/handler.cc:
  After merge fixes
sql/item.cc:
  Simple optimization of creating item
  After merge fixed
  Added Item_field::set_no_const_sub() to be able to mark fields that can't be substituted
  The problem is that if you compare a string field to a binary string, you can't replace the field with a string constant as the binary comparison may then fail (The original field value may be in a different case)
sql/item.h:
  Added Item::set_no_const_sub() to be able to mark fields that can't be substituted
sql/item_cmpfunc.cc:
  Mark fields compared as binary to not be substituted.
sql/item_func.cc:
  After merge fix
sql/log_event.cc:
  After merge fix
sql/mysql_priv.h:
  After merge fix
sql/opt_range.cc:
  After merge fix
sql/protocol.cc:
  Made flags uint instead of int (as it's used as a bit mask)
sql/protocol.h:
  Made flags uint instead of int (as it's used as a bit mask)
sql/protocol_cursor.cc:
  Made flags uint instead of int (as it's used as a bit mask)
  Indentation cleanups
sql/sp.cc:
  After merge fixes
  Removed compiler warnings
sql/sp_head.cc:
  After merge fixes
sql/sql_base.cc:
  After merge fixes
  Removed 'send_error' from 'insert_fields()' as the error is sent higher up
sql/sql_class.cc:
  Give assert if set_n_backup_item_arena is used twice
sql/sql_class.h:
  Give assert if set_n_backup_item_arena is used twice
  After merge fixes
  Added 'simple_select' method to be able to quickly determinate if a select_result is a normal SELECT
sql/sql_handler.cc:
  After merge fixes
sql/sql_parse.cc:
  After merge fixes
sql/sql_prepare.cc:
  After merge fixes
sql/sql_select.cc:
  After merge fixes
  Moved 'build_equal_items' to optimize_cond() (logical place)
sql/sql_table.cc:
  After merge fixes
sql/sql_trigger.cc:
  After merge fixes
sql/sql_update.cc:
  After merge fixes
  (This should be fixed by Sanja to have lower granuality locking of tables in multi-update)
sql/sql_view.cc:
  After merge fixes
sql/sql_yacc.yy:
  After merge fixes
  Don't have FOUND as a reserved keyword
This commit is contained in:
unknown 2004-11-03 12:39:38 +02:00
parent f095274fe8
commit f5a47f156b
53 changed files with 653 additions and 563 deletions

View File

@ -1,3 +1,5 @@
#!/bin/sh
if ! test -f sql/mysqld.cc if ! test -f sql/mysqld.cc
then then
echo "You must run this script from the MySQL top-level directory" echo "You must run this script from the MySQL top-level directory"

View File

@ -275,6 +275,7 @@ Q_ENABLE_INFO, Q_DISABLE_INFO,
Q_ENABLE_METADATA, Q_DISABLE_METADATA, Q_ENABLE_METADATA, Q_DISABLE_METADATA,
Q_EXEC, Q_DELIMITER, Q_EXEC, Q_DELIMITER,
Q_DISPLAY_VERTICAL_RESULTS, Q_DISPLAY_HORIZONTAL_RESULTS, Q_DISPLAY_VERTICAL_RESULTS, Q_DISPLAY_HORIZONTAL_RESULTS,
Q_QUERY_VERTICAL, Q_QUERY_HORIZONTAL,
Q_START_TIMER, Q_END_TIMER, Q_START_TIMER, Q_END_TIMER,
Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL, Q_CHARACTER_SET, Q_DISABLE_PS_PROTOCOL, Q_ENABLE_PS_PROTOCOL,
Q_EXIT, Q_EXIT,
@ -366,7 +367,7 @@ const char *command_names[]=
}; };
TYPELIB command_typelib= {array_elements(command_names),"", TYPELIB command_typelib= {array_elements(command_names),"",
command_names}; command_names, 0};
DYNAMIC_STRING ds_res; DYNAMIC_STRING ds_res;
static void die(const char *fmt, ...); static void die(const char *fmt, ...);

View File

@ -1,5 +1,6 @@
drop table if exists t1; drop table if exists t1;
drop database if exists mysqltest; drop database if exists mysqltest;
drop database if exists client_test_db;
drop table t1; drop table t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 't1'
create table t1(n int); create table t1(n int);

View File

@ -403,7 +403,7 @@ abcdabc
select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin2'd',2); 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' 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); 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'; select _latin1'B' between _latin1'a' and _latin1'c';
_latin1'B' between _latin1'a' and _latin1'c' _latin1'B' between _latin1'a' and _latin1'c'
1 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 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 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings: 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, "#"); SELECT lpad(12345, 5, "#");
lpad(12345, 5, "#") lpad(12345, 5, "#")
12345 12345
@ -664,16 +664,16 @@ drop table t1, t2;
create table t1 (c1 INT, c2 INT UNSIGNED); create table t1 (c1 INT, c2 INT UNSIGNED);
insert into t1 values ('21474836461','21474836461'); insert into t1 values ('21474836461','21474836461');
Warnings: Warnings:
Warning 1265 Data truncated for column 'c1' at row 1 Warning 1264 Out of range value adjusted 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 'c2' at row 1
insert into t1 values ('-21474836461','-21474836461'); insert into t1 values ('-21474836461','-21474836461');
Warnings: Warnings:
Warning 1265 Data truncated for column 'c1' at row 1 Warning 1264 Out of range value adjusted 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 'c2' at row 1
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1265 Data truncated for column 'c1' at row 1 Warning 1264 Out of range value adjusted 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 'c2' at row 1
select * from t1; select * from t1;
c1 c2 c1 c2
2147483647 4294967295 2147483647 4294967295

View File

@ -1,4 +1,4 @@
drop table if exists t1,t2; drop table if exists t1,t2,t3;
create table t1 (a int not null); create table t1 (a int not null);
insert into t1 values (1); insert into t1 values (1);
insert into t1 values (a+2); insert into t1 values (a+2);
@ -287,8 +287,7 @@ f_double_u 0
f_float_u 0 f_float_u 0
f_double_15_1_u 0.0 f_double_15_1_u 0.0
f_float_3_1_u 0.0 f_float_3_1_u 0.0
use test; drop table t1;
drop table if exists t1,t2,t3;
create table t1(id1 int not null auto_increment primary key, t char(12)); 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 t2(id2 int not null, t char(12));
create table t3(id3 int not null, t char(12), index(id3)); 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; select count(*) from t2;
count(*) count(*)
25500 25500
drop table if exists t1,t2,t3; drop table t1,t2,t3;

View File

@ -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 t6 ALL NULL NULL NULL NULL 3
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 1 SIMPLE t8 ALL NULL NULL NULL NULL 2
Warnings: 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 SELECT t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
FROM t6, FROM t6,
t7 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 t2 ref idx_b idx_b 5 test.t3.b 2
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 1 SIMPLE t1 ALL NULL NULL NULL NULL 3
Warnings: 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 SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
FROM t3,t4 FROM t3,t4
LEFT JOIN LEFT JOIN

View File

@ -26,7 +26,7 @@ lock table t1 read;
update t1,t2 set c=a where b=d; update t1,t2 set c=a where b=d;
select c from t2; select c from t2;
c c
2 1
drop table t1; drop table t1;
drop table t2; drop table t2;
create table t1 (a int); create table t1 (a int);

View File

@ -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; 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 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; 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; unlock tables;
LOCK TABLES t1 write, t2 write; LOCK TABLES t1 write, t2 write;
UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n; 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 t1 (col1 int);
create table t2 (col1 int); create table t2 (col1 int);
update t1,t2 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1; 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; 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 ERROR HY000: You can't specify target table 't1' for update in FROM clause
drop table t1,t2; drop table t1,t2;

View File

@ -471,7 +471,7 @@ def table 253 64 2 N 1 31 8
def type 253 10 3 N 1 31 8 def type 253 10 3 N 1 31 8
def possible_keys 253 4096 0 Y 0 31 8 def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 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 ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32801 0 8 def rows 8 10 1 N 32801 0 8
def Extra 253 255 14 N 1 31 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 type 253 10 5 N 1 31 8
def possible_keys 253 4096 7 Y 0 31 8 def possible_keys 253 4096 7 Y 0 31 8
def key 253 64 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 ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32801 0 8 def rows 8 10 1 N 32801 0 8
def Extra 253 255 27 N 1 31 8 def Extra 253 255 27 N 1 31 8

View File

@ -1151,7 +1151,7 @@ def table 253 64 2 N 1 31 8
def type 253 10 3 N 1 31 8 def type 253 10 3 N 1 31 8
def possible_keys 253 4096 0 Y 0 31 8 def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 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 ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32801 0 8 def rows 8 10 1 N 32801 0 8
def Extra 253 255 0 N 1 31 8 def Extra 253 255 0 N 1 31 8
@ -1297,7 +1297,7 @@ set @arg00=NULL;
set @arg01=2; set @arg01=2;
execute stmt1 using @arg00, @arg01; execute stmt1 using @arg00, @arg01;
Warnings: 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; select a,b from t1 order by a;
a b a b
0 two 0 two
@ -2562,12 +2562,12 @@ set @arg00= 9223372036854775807 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 c2 32767
@ -2585,12 +2585,12 @@ set @arg00= '9223372036854775807' ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1265 Data truncated for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 c2 32767
@ -2608,12 +2608,12 @@ set @arg00= -9223372036854775808 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 c2 -32768
@ -2631,12 +2631,12 @@ set @arg00= '-9223372036854775808' ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1265 Data truncated for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 c2 -32768
@ -2654,14 +2654,14 @@ set @arg00= 1.11111111111111111111e+50 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1
Warning 1264 Data truncated; out of range for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1
Warning 1264 Data truncated; out of range for column 'c7' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 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 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c5' at row 1
Warning 1265 Data truncated for column 'c6' 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 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 1 c1 1
c2 1 c2 1
@ -2704,14 +2704,14 @@ set @arg00= -1.11111111111111111111e+50 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1
Warning 1264 Data truncated; out of range for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1
Warning 1264 Data truncated; out of range for column 'c7' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 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 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c5' at row 1
Warning 1265 Data truncated for column 'c6' 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 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -1 c1 -1
c2 -1 c2 -1
@ -2967,45 +2967,45 @@ Warning 1265 Data truncated for column 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c17' at row 1 Warning 1265 Data truncated for column 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; select c1, c13, c14, c15, c16, c17 from t9 order by c1 ;
c1 c13 c14 c15 c16 c17 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 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991

View File

@ -1151,7 +1151,7 @@ def table 253 64 2 N 1 31 8
def type 253 10 3 N 1 31 8 def type 253 10 3 N 1 31 8
def possible_keys 253 4096 0 Y 0 31 8 def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 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 ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32801 0 8 def rows 8 10 1 N 32801 0 8
def Extra 253 255 0 N 1 31 8 def Extra 253 255 0 N 1 31 8
@ -1280,7 +1280,7 @@ set @arg00=NULL;
set @arg01=2; set @arg01=2;
execute stmt1 using @arg00, @arg01; execute stmt1 using @arg00, @arg01;
Warnings: 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; select a,b from t1 order by a;
a b a b
0 two 0 two
@ -2545,12 +2545,12 @@ set @arg00= 9223372036854775807 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 c2 32767
@ -2568,12 +2568,12 @@ set @arg00= '9223372036854775807' ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1265 Data truncated for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 c2 32767
@ -2591,12 +2591,12 @@ set @arg00= -9223372036854775808 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 c2 -32768
@ -2614,12 +2614,12 @@ set @arg00= '-9223372036854775808' ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1265 Data truncated for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 c2 -32768
@ -2637,14 +2637,14 @@ set @arg00= 1.11111111111111111111e+50 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1
Warning 1264 Data truncated; out of range for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1
Warning 1264 Data truncated; out of range for column 'c7' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 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 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c5' at row 1
Warning 1265 Data truncated for column 'c6' 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 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 1 c1 1
c2 1 c2 1
@ -2687,14 +2687,14 @@ set @arg00= -1.11111111111111111111e+50 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1
Warning 1264 Data truncated; out of range for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1
Warning 1264 Data truncated; out of range for column 'c7' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 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 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c5' at row 1
Warning 1265 Data truncated for column 'c6' 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 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -1 c1 -1
c2 -1 c2 -1
@ -2950,45 +2950,45 @@ Warning 1265 Data truncated for column 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c17' at row 1 Warning 1265 Data truncated for column 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; select c1, c13, c14, c15, c16, c17 from t9 order by c1 ;
c1 c13 c14 c15 c16 c17 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 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991

View File

@ -1152,7 +1152,7 @@ def table 253 64 2 N 1 31 8
def type 253 10 3 N 1 31 8 def type 253 10 3 N 1 31 8
def possible_keys 253 4096 0 Y 0 31 8 def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 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 ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32801 0 8 def rows 8 10 1 N 32801 0 8
def Extra 253 255 0 N 1 31 8 def Extra 253 255 0 N 1 31 8
@ -1281,7 +1281,7 @@ set @arg00=NULL;
set @arg01=2; set @arg01=2;
execute stmt1 using @arg00, @arg01; execute stmt1 using @arg00, @arg01;
Warnings: 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; select a,b from t1 order by a;
a b a b
0 two 0 two
@ -2546,12 +2546,12 @@ set @arg00= 9223372036854775807 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 c2 32767
@ -2569,12 +2569,12 @@ set @arg00= '9223372036854775807' ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1265 Data truncated for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 c2 32767
@ -2592,12 +2592,12 @@ set @arg00= -9223372036854775808 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 c2 -32768
@ -2615,12 +2615,12 @@ set @arg00= '-9223372036854775808' ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1265 Data truncated for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 c2 -32768
@ -2638,14 +2638,14 @@ set @arg00= 1.11111111111111111111e+50 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1
Warning 1264 Data truncated; out of range for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1
Warning 1264 Data truncated; out of range for column 'c7' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 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 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c5' at row 1
Warning 1265 Data truncated for column 'c6' 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 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 1 c1 1
c2 1 c2 1
@ -2688,14 +2688,14 @@ set @arg00= -1.11111111111111111111e+50 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1
Warning 1264 Data truncated; out of range for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1
Warning 1264 Data truncated; out of range for column 'c7' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 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 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c5' at row 1
Warning 1265 Data truncated for column 'c6' 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 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -1 c1 -1
c2 -1 c2 -1
@ -2951,45 +2951,45 @@ Warning 1265 Data truncated for column 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c17' at row 1 Warning 1265 Data truncated for column 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; select c1, c13, c14, c15, c16, c17 from t9 order by c1 ;
c1 c13 c14 c15 c16 c17 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 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991

View File

@ -1194,7 +1194,7 @@ def table 253 64 2 N 1 31 8
def type 253 10 3 N 1 31 8 def type 253 10 3 N 1 31 8
def possible_keys 253 4096 0 Y 0 31 8 def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 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 ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32801 0 8 def rows 8 10 1 N 32801 0 8
def Extra 253 255 0 N 1 31 8 def Extra 253 255 0 N 1 31 8
@ -1323,7 +1323,7 @@ set @arg00=NULL;
set @arg01=2; set @arg01=2;
execute stmt1 using @arg00, @arg01; execute stmt1 using @arg00, @arg01;
Warnings: 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; select a,b from t1 order by a;
a b a b
0 two 0 two
@ -2485,12 +2485,12 @@ set @arg00= 9223372036854775807 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 c2 32767
@ -2508,12 +2508,12 @@ set @arg00= '9223372036854775807' ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1265 Data truncated for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 c2 32767
@ -2531,12 +2531,12 @@ set @arg00= -9223372036854775808 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 c2 -32768
@ -2554,12 +2554,12 @@ set @arg00= '-9223372036854775808' ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1265 Data truncated for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 c2 -32768
@ -2577,14 +2577,14 @@ set @arg00= 1.11111111111111111111e+50 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1
Warning 1264 Data truncated; out of range for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1
Warning 1264 Data truncated; out of range for column 'c7' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 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 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c5' at row 1
Warning 1265 Data truncated for column 'c6' 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 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 1 c1 1
c2 1 c2 1
@ -2627,14 +2627,14 @@ set @arg00= -1.11111111111111111111e+50 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1
Warning 1264 Data truncated; out of range for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1
Warning 1264 Data truncated; out of range for column 'c7' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 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 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c5' at row 1
Warning 1265 Data truncated for column 'c6' 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 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -1 c1 -1
c2 -1 c2 -1
@ -2890,45 +2890,45 @@ Warning 1265 Data truncated for column 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c17' at row 1 Warning 1265 Data truncated for column 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; select c1, c13, c14, c15, c16, c17 from t9 order by c1 ;
c1 c13 c14 c15 c16 c17 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 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 type 253 10 3 N 1 31 8
def possible_keys 253 4096 0 Y 0 31 8 def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 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 ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32801 0 8 def rows 8 10 1 N 32801 0 8
def Extra 253 255 0 N 1 31 8 def Extra 253 255 0 N 1 31 8
@ -4330,7 +4330,7 @@ set @arg00=NULL;
set @arg01=2; set @arg01=2;
execute stmt1 using @arg00, @arg01; execute stmt1 using @arg00, @arg01;
Warnings: 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; select a,b from t1 order by a;
a b a b
0 two 0 two
@ -5492,12 +5492,12 @@ set @arg00= 9223372036854775807 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 c2 32767
@ -5515,12 +5515,12 @@ set @arg00= '9223372036854775807' ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1265 Data truncated for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 c2 32767
@ -5538,12 +5538,12 @@ set @arg00= -9223372036854775808 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 c2 -32768
@ -5561,12 +5561,12 @@ set @arg00= '-9223372036854775808' ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1265 Data truncated for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 c2 -32768
@ -5584,14 +5584,14 @@ set @arg00= 1.11111111111111111111e+50 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1
Warning 1264 Data truncated; out of range for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1
Warning 1264 Data truncated; out of range for column 'c7' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 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 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c5' at row 1
Warning 1265 Data truncated for column 'c6' 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 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 1 c1 1
c2 1 c2 1
@ -5634,14 +5634,14 @@ set @arg00= -1.11111111111111111111e+50 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1
Warning 1264 Data truncated; out of range for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1
Warning 1264 Data truncated; out of range for column 'c7' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 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 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c5' at row 1
Warning 1265 Data truncated for column 'c6' 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 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -1 c1 -1
c2 -1 c2 -1
@ -5897,45 +5897,45 @@ Warning 1265 Data truncated for column 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c17' at row 1 Warning 1265 Data truncated for column 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; select c1, c13, c14, c15, c16, c17 from t9 order by c1 ;
c1 c13 c14 c15 c16 c17 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 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991

View File

@ -1151,7 +1151,7 @@ def table 253 64 2 N 1 31 8
def type 253 10 3 N 1 31 8 def type 253 10 3 N 1 31 8
def possible_keys 253 4096 0 Y 0 31 8 def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 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 ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32801 0 8 def rows 8 10 1 N 32801 0 8
def Extra 253 255 0 N 1 31 8 def Extra 253 255 0 N 1 31 8
@ -1280,7 +1280,7 @@ set @arg00=NULL;
set @arg01=2; set @arg01=2;
execute stmt1 using @arg00, @arg01; execute stmt1 using @arg00, @arg01;
Warnings: 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; select a,b from t1 order by a;
a b a b
0 two 0 two
@ -2545,12 +2545,12 @@ set @arg00= 9223372036854775807 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 c2 32767
@ -2568,12 +2568,12 @@ set @arg00= '9223372036854775807' ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1265 Data truncated for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 c2 32767
@ -2591,12 +2591,12 @@ set @arg00= -9223372036854775808 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 c2 -32768
@ -2614,12 +2614,12 @@ set @arg00= '-9223372036854775808' ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1265 Data truncated for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 c2 -32768
@ -2637,14 +2637,14 @@ set @arg00= 1.11111111111111111111e+50 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1
Warning 1264 Data truncated; out of range for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1
Warning 1264 Data truncated; out of range for column 'c7' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 127 c1 127
c2 32767 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 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c5' at row 1
Warning 1265 Data truncated for column 'c6' 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 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 1 c1 1
c2 1 c2 1
@ -2687,14 +2687,14 @@ set @arg00= -1.11111111111111111111e+50 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ; @arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings: Warnings:
Warning 1264 Data truncated; out of range for column 'c1' at row 1 Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Data truncated; out of range for column 'c2' at row 1 Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Data truncated; out of range for column 'c3' at row 1 Warning 1264 Out of range value adjusted for column 'c3' at row 1
Warning 1264 Data truncated; out of range for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c4' at row 1
Warning 1264 Data truncated; out of range for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1
Warning 1264 Data truncated; out of range for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1
Warning 1264 Data truncated; out of range for column 'c7' at row 1 Warning 1264 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -128 c1 -128
c2 -32768 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 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c5' at row 1
Warning 1265 Data truncated for column 'c6' 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 Out of range value adjusted 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 'c12' at row 1
execute my_select ; execute my_select ;
c1 -1 c1 -1
c2 -1 c2 -1
@ -2950,45 +2950,45 @@ Warning 1265 Data truncated for column 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c17' at row 1 Warning 1265 Data truncated for column 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: 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 'c14' at row 1
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c15' 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 Out of range value adjusted 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 'c17' at row 1
select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; select c1, c13, c14, c15, c16, c17 from t9 order by c1 ;
c1 c13 c14 c15 c16 c17 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 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991

View File

@ -928,7 +928,7 @@ Variable_name Value
Qcache_queries_in_cache 0 Qcache_queries_in_cache 0
show status like "Qcache_inserts"; show status like "Qcache_inserts";
Variable_name Value Variable_name Value
Qcache_inserts 11 Qcache_inserts 19
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 6 Qcache_hits 6
@ -941,7 +941,7 @@ Variable_name Value
Qcache_queries_in_cache 1 Qcache_queries_in_cache 1
show status like "Qcache_inserts"; show status like "Qcache_inserts";
Variable_name Value Variable_name Value
Qcache_inserts 12 Qcache_inserts 20
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 7 Qcache_hits 7

View File

@ -546,4 +546,4 @@ count(*)
select count(*) from t2 where x = 18446744073709551601; select count(*) from t2 where x = 18446744073709551601;
count(*) count(*)
0 0
drop table t1; drop table t1,t2;

View File

@ -41,6 +41,7 @@ show variables like "%auto%";
Variable_name Value Variable_name Value
auto_increment_increment 100 auto_increment_increment 100
auto_increment_offset 10 auto_increment_offset 10
innodb_autoextend_increment 8
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; 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 (NULL),(5),(NULL);
insert into t1 values (250),(NULL); insert into t1 values (250),(NULL);

View File

@ -200,8 +200,8 @@ hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
stop slave; stop slave;
delete from t1; delete from t1;
change master to master_log_pos=5801; change master to master_log_pos=6763;
start slave until master_log_file='master-bin.000001', master_log_pos=5937; start slave until master_log_file='master-bin.000001', master_log_pos=6921;
start slave; start slave;
select hex(c1), hex(c2) from t1; select hex(c1), hex(c2) from t1;
hex(c1) hex(c2) hex(c1) hex(c2)

View File

@ -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 4 SUBQUERY t2 ALL NULL NULL NULL NULL 2
NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL
Warnings: 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 (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 (select a from t3 where a<t2.a*4 order by 1 desc limit 1) a
3 1 3 1

View File

@ -1339,14 +1339,16 @@ c
prepare stmt1 from "update v1,t1 set v1.s1=? where t1.s1=v1.s1"; prepare stmt1 from "update v1,t1 set v1.s1=? where t1.s1=v1.s1";
set @arg='d'; set @arg='d';
execute stmt1 using @arg; execute stmt1 using @arg;
ERROR HY000: Table 't1' is read only
select * from v1; select * from v1;
s1 s1
d c
set @arg='e'; set @arg='e';
execute stmt1 using @arg; execute stmt1 using @arg;
ERROR HY000: Table 't1' is read only
select * from v1; select * from v1;
s1 s1
e c
deallocate prepare stmt1; deallocate prepare stmt1;
drop view v1; drop view v1;
drop table t1; drop table t1;

View File

@ -2,6 +2,8 @@
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
drop database if exists mysqltest; drop database if exists mysqltest;
# If earlier test failed
drop database if exists client_test_db;
--enable_warnings --enable_warnings
--error 1051; --error 1051;

View File

@ -159,6 +159,8 @@ LOCK TABLES t1 write, t2 read;
DELETE t1.*, t2.* FROM t1,t2 where t1.n=t2.n; DELETE t1.*, t2.* FROM t1,t2 where t1.n=t2.n;
--error 1099 --error 1099
UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n; 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; UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n;
unlock tables; unlock tables;
LOCK TABLES t1 write, t2 write; LOCK TABLES t1 write, t2 write;
@ -426,7 +428,7 @@ drop table t1, t2, t3;
# #
create table t1 (col1 int); create table t1 (col1 int);
create table t2 (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; update t1,t2 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1;
-- error 1093 -- error 1093
delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2.col1; delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2.col1;

View File

@ -150,20 +150,24 @@ select hex(c1), hex(c2) from t1;
sync_slave_with_master; sync_slave_with_master;
select hex(c1), hex(c2) from t1; 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 before following query
stop slave; stop slave;
delete from t1; delete from t1;
change master to master_log_pos=5801;
start slave until master_log_file='master-bin.000001', master_log_pos=5937; # Note that the following positions may change between MySQL versions!
# Slave is supposed to stop _after_ the INSERT, even though 5937 is
# 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 # the position of the beginning of the INSERT; after SET slave is not
# supposed to increment position. # supposed to increment position.
wait_for_slave_to_stop; 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; start slave;
sync_with_master; sync_with_master;
select hex(c1), hex(c2) from t1; select hex(c1), hex(c2) from t1;

View File

@ -19,7 +19,7 @@ create procedure syntaxerror(t int)|
# Check that we get the right error, i.e. UDF declaration parses correctly, # Check that we get the right error, i.e. UDF declaration parses correctly,
# but foo.so doesn't exist. # 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 # might vary between systems (it usually doesn't have anything to do with
# the actual failing dlopen()). # the actual failing dlopen()).
#--error 1126 #--error 1126

View File

@ -1300,9 +1300,13 @@ update v1,t1 set v1.s1='c' where t1.s1=v1.s1;
select * from v1; select * from v1;
prepare stmt1 from "update v1,t1 set v1.s1=? where t1.s1=v1.s1"; prepare stmt1 from "update v1,t1 set v1.s1=? where t1.s1=v1.s1";
set @arg='d'; set @arg='d';
-- QQ This should not generate an error
--error 1036
execute stmt1 using @arg; execute stmt1 using @arg;
select * from v1; select * from v1;
set @arg='e'; set @arg='e';
-- QQ This should not generate an error
--error 1036
execute stmt1 using @arg; execute stmt1 using @arg;
select * from v1; select * from v1;
deallocate prepare stmt1; deallocate prepare stmt1;

View File

@ -176,7 +176,7 @@ then
s_echo "done" s_echo "done"
else else
s_echo "Got a failure from command:" 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." s_echo "Please check the above output and try again."
if test $verbose = 0 if test $verbose = 0
then then

View File

@ -647,6 +647,7 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
} }
if (mysql->status != MYSQL_STATUS_READY) if (mysql->status != MYSQL_STATUS_READY)
{ {
DBUG_PRINT("error",("state: %d", mysql->status));
set_mysql_error(mysql, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate); set_mysql_error(mysql, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate);
return 1; return 1;
} }

View File

@ -4015,6 +4015,7 @@ int ndbcluster_find_files(THD *thd,const char *db,const char *path,
(void)mysql_rm_table_part2(thd, &table_list, (void)mysql_rm_table_part2(thd, &table_list,
/* if_exists */ TRUE, /* if_exists */ TRUE,
/* drop_temporary */ FALSE, /* drop_temporary */ FALSE,
/* drop_view */ FALSE,
/* dont_log_query*/ TRUE); /* dont_log_query*/ TRUE);
} }
} }

View File

@ -1427,7 +1427,7 @@ int ha_create_table_from_engine(THD* thd,
if ((error = writefrm(path, frmblob, frmlen))) if ((error = writefrm(path, frmblob, frmlen)))
goto err_end; 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); DBUG_RETURN(1);
update_create_info_from_table(&create_info, &table); update_create_info_from_table(&create_info, &table);

View File

@ -45,11 +45,11 @@ void item_init(void)
} }
Item::Item(): Item::Item():
name_length(0), fixed(0) name_length(0), fixed(0),
collation(default_charset(), DERIVATION_COERCIBLE)
{ {
marker= 0; marker= 0;
maybe_null=null_value=with_sum_func=unsigned_flag=0; maybe_null=null_value=with_sum_func=unsigned_flag=0;
collation.set(default_charset(), DERIVATION_COERCIBLE);
name= 0; name= 0;
decimals= 0; max_length= 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); (char*) cached_table->alias, (char*) field_name);
if (!rf) if (!rf)
return 1; return 1;
thd->change_item_tree(ref, rf);
/* /*
rf is Item_ref => never substitute other items (in this case) rf is Item_ref => never substitute other items (in this case)
during fix_fields() => we can use rf after fix_fields() during fix_fields() => we can use rf after fix_fields()
@ -1654,6 +1655,7 @@ void Item_field::cleanup()
I.e. we can drop 'field'. I.e. we can drop 'field'.
*/ */
field= result_field= 0; 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 SYNOPSIS
equal_fields_propagator() 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 SYNOPSIS
replace_equal_field_processor() replace_equal_field_processor()
@ -1773,6 +1790,7 @@ bool Item_field::replace_equal_field_processor(byte *arg)
return 0; return 0;
} }
void Item::init_make_field(Send_field *tmp_field, void Item::init_make_field(Send_field *tmp_field,
enum enum_field_types field_type) enum enum_field_types field_type)
{ {

View File

@ -285,6 +285,7 @@ public:
virtual bool remove_fixed(byte * arg) { fixed= 0; return 0; } virtual bool remove_fixed(byte * arg) { fixed= 0; return 0; }
virtual bool collect_item_field_processor(byte * arg) { return 0; } virtual bool collect_item_field_processor(byte * arg) { return 0; }
virtual Item *equal_fields_propagator(byte * arg) { return this; } 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 bool replace_equal_field_processor(byte * arg) { return 0; }
virtual Item *this_item() { return this; } /* For SPs mostly. */ virtual Item *this_item() { return this; } /* For SPs mostly. */
@ -536,6 +537,7 @@ public:
void cleanup(); void cleanup();
Item_equal *find_item_equal(COND_EQUAL *cond_equal); Item_equal *find_item_equal(COND_EQUAL *cond_equal);
Item *equal_fields_propagator(byte *arg); Item *equal_fields_propagator(byte *arg);
Item *set_no_const_sub(byte *arg);
bool replace_equal_field_processor(byte *arg); bool replace_equal_field_processor(byte *arg);
inline uint32 max_disp_length() { return field->max_length(); } inline uint32 max_disp_length() { return field->max_length(); }
Item_field *filed_for_view_update() { return this; } Item_field *filed_for_view_update() { return this; }
@ -1024,6 +1026,7 @@ public:
bool walk(Item_processor processor, byte *arg) bool walk(Item_processor processor, byte *arg)
{ return (*ref)->walk(processor, arg); } { return (*ref)->walk(processor, arg); }
void print(String *str); void print(String *str);
void cleanup();
}; };
class Item_in_subselect; class Item_in_subselect;

View File

@ -320,6 +320,17 @@ int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type)
func= &Arg_comparator::compare_binary_string; func= &Arg_comparator::compare_binary_string;
else if (func == &Arg_comparator::compare_e_string) else if (func == &Arg_comparator::compare_e_string)
func= &Arg_comparator::compare_e_binary_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) else if (type == INT_RESULT)

View File

@ -292,7 +292,8 @@ Item *Item_func::transform(Item_transformer transformer, byte *argument)
Item *new_item= (*arg)->transform(transformer, argument); Item *new_item= (*arg)->transform(transformer, argument);
if (!new_item) if (!new_item)
return 0; return 0;
*arg= new_item; if (*arg != new_item)
current_thd->change_item_tree(arg, new_item);
} }
} }
return (this->*transformer)(argument); return (this->*transformer)(argument);

View File

@ -1543,7 +1543,7 @@ end:
updating query. updating query.
*/ */
return (thd->query_error ? thd->query_error : 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))); Log_event::exec_event(rli)));
} }
#endif #endif

View File

@ -492,7 +492,7 @@ bool is_update_query(enum enum_sql_command command);
bool alloc_query(THD *thd, char *packet, ulong packet_length); bool alloc_query(THD *thd, char *packet, ulong packet_length);
void mysql_init_select(LEX *lex); void mysql_init_select(LEX *lex);
void mysql_reset_thd_for_next_command(THD *thd); 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); bool mysql_new_select(LEX *lex, bool move_down);
void create_select_for_variable(const char *var_name); void create_select_for_variable(const char *var_name);
void mysql_init_multi_delete(LEX *lex); void mysql_init_multi_delete(LEX *lex);

View File

@ -712,8 +712,9 @@ QUICK_SELECT_I::QUICK_SELECT_I()
QUICK_RANGE_SELECT::QUICK_RANGE_SELECT(THD *thd, TABLE *table, uint key_nr, QUICK_RANGE_SELECT::QUICK_RANGE_SELECT(THD *thd, TABLE *table, uint key_nr,
bool no_alloc, MEM_ROOT *parent_alloc) 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; index= key_nr;
head= table; head= table;
key_part_info= head->key_info[index].key_part; key_part_info= head->key_info[index].key_part;

View File

@ -507,7 +507,7 @@ void Protocol::init(THD *thd_arg)
*/ */
#ifndef EMBEDDED_LIBRARY #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); List_iterator_fast<Item> it(*list);
Item *item; Item *item;

View File

@ -52,7 +52,7 @@ public:
void init(THD* thd_arg); void init(THD* thd_arg);
enum { SEND_NUM_ROWS= 1, SEND_DEFAULTS= 2, SEND_EOF= 4 }; 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 send_records_num(List<Item> *list, ulonglong records);
bool store(I_List<i_string> *str_list); bool store(I_List<i_string> *str_list);
@ -166,7 +166,7 @@ public:
prev_record= &data; prev_record= &data;
return Protocol_simple::prepare_for_send(item_list); 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(); bool write();
uint get_field_count() { return field_count; } uint get_field_count() { return field_count; }
}; };

View File

@ -26,22 +26,21 @@
#include "mysql_priv.h" #include "mysql_priv.h"
#include <mysql.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); List_iterator_fast<Item> it(*list);
Item *item; Item *item;
MYSQL_FIELD *client_field; MYSQL_FIELD *client_field;
DBUG_ENTER("Protocol_cursor::send_fields");
DBUG_ENTER("send_fields");
if (prepare_for_send(list)) if (prepare_for_send(list))
return FALSE; return FALSE;
fields= (MYSQL_FIELD *)alloc_root(alloc, sizeof(MYSQL_FIELD) * field_count); fields= (MYSQL_FIELD *)alloc_root(alloc, sizeof(MYSQL_FIELD) * field_count);
if (!fields) if (!fields)
goto err; goto err;
client_field= fields; for (client_field= fields; (item= it++) ; client_field++)
while ((item= it++))
{ {
Send_field server_field; Send_field server_field;
item->make_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)) if (INTERNAL_NUM_FIELD(client_field))
client_field->flags|= NUM_FLAG; client_field->flags|= NUM_FLAG;
if (flags & (int) Protocol::SEND_DEFAULTS) if (flags & (uint) Protocol::SEND_DEFAULTS)
{ {
char buff[80]; char buff[80];
String tmp(buff, sizeof(buff), default_charset_info), *res; String tmp(buff, sizeof(buff), default_charset_info), *res;
@ -80,16 +79,18 @@ bool Protocol_cursor::send_fields(List<Item> *list, int flags)
else else
client_field->def=0; client_field->def=0;
client_field->max_length= 0; client_field->max_length= 0;
++client_field;
} }
DBUG_RETURN(FALSE); DBUG_RETURN(FALSE);
err:
err:
send_error(thd, ER_OUT_OF_RESOURCES); /* purecov: inspected */ send_error(thd, ER_OUT_OF_RESOURCES); /* purecov: inspected */
DBUG_RETURN(TRUE); /* purecov: inspected */ DBUG_RETURN(TRUE); /* purecov: inspected */
} }
/* Get the length of next field. Change parameter to point at fieldstart */ /* Get the length of next field. Change parameter to point at fieldstart */
bool Protocol_cursor::write() bool Protocol_cursor::write()
{ {
byte *cp= (byte *)packet->ptr(); byte *cp= (byte *)packet->ptr();
@ -121,7 +122,7 @@ bool Protocol_cursor::write()
{ {
if ((long)len > (end_pos - cp)) 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; return TRUE;
} }
*data_tmp= to; *data_tmp= to;
@ -141,6 +142,6 @@ bool Protocol_cursor::write()
row_count++; row_count++;
return FALSE; return FALSE;
err: err:
// TODO error signal send_error(thd, ER_OUT_OF_RESOURCES); // TODO error signal send_error(thd, ER_OUT_OF_RESOURCES);
return TRUE; return TRUE;
} }

View File

@ -293,7 +293,7 @@ db_find_routine(THD *thd, int type, sp_name *name, sp_head **sphp)
*/ */
List<Item> vals= thd->lex->value_list; 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; 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) if (ret == SP_OK)
{ {
store_record(table,record[1]); 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(); ((Field_timestamp *)table->field[MYSQL_PROC_FIELD_MODIFIED])->set_time();
if (chistics->suid != SP_IS_DEFAULT_SUID) if (chistics->suid != SP_IS_DEFAULT_SUID)
table->field[MYSQL_PROC_FIELD_SECURITY_TYPE]-> table->field[MYSQL_PROC_FIELD_SECURITY_TYPE]->
@ -1055,6 +1055,10 @@ create_string(THD *thd, String *buf,
case SP_MODIFIES_SQL_DATA: case SP_MODIFIES_SQL_DATA:
buf->append(" MODIFIES SQL DATA\n"); buf->append(" MODIFIES SQL DATA\n");
break; break;
case SP_DEFAULT_ACCESS:
case SP_CONTAINS_SQL:
/* Do nothing */
break;
} }
if (chistics->detistic) if (chistics->detistic)
buf->append(" DETERMINISTIC\n", 18); buf->append(" DETERMINISTIC\n", 18);

View File

@ -765,7 +765,7 @@ sp_head::reset_lex(THD *thd)
thd->lex= sublex= new st_lex; thd->lex= sublex= new st_lex;
/* Reset most stuff. The length arguments doesn't matter here. */ /* 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 */ /* We must reset ptr and end_of_query again */
sublex->ptr= oldlex->ptr; sublex->ptr= oldlex->ptr;

View File

@ -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 */ /* 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) ; for (table=(TABLE*) hash_search(&open_cache,(byte*) key,key_length) ;
table && table->in_use ; table && table->in_use ;
@ -2095,11 +2096,14 @@ find_field_in_table(THD *thd, TABLE_LIST *table_list,
*ref= trans[i]; *ref= trans[i];
else else
{ {
*ref= new Item_ref(trans + i, ref, table_list->view_name.str, Item_ref *item_ref= new Item_ref(trans + i, table_list->view_name.str,
item_name); item_name);
/* as far as Item_ref have defined refernce it do not need tables */ /* as far as Item_ref have defined reference it do not need tables */
if (*ref) if (item_ref)
{
thd->change_item_tree(ref, item_ref);
(*ref)->fix_fields(thd, 0, ref); (*ref)->fix_fields(thd, 0, ref);
}
} }
return (Field*) view_ref_found; return (Field*) view_ref_found;
} }
@ -2823,7 +2827,7 @@ bool get_key_map_from_key_list(key_map *map, TABLE *table,
RETURN RETURN
0 ok 0 ok
'it' is updated to point at last inserted '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 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 during cleunup() this item will be put in list to replace
expression from VIEW 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 */ /* All fields are used */
table->used_fields=table->fields; 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); my_error(ER_BAD_TABLE_ERROR, MYF(0), table_name);
err: err:
send_error(thd);
DBUG_RETURN(1); DBUG_RETURN(1);
} }

View File

@ -165,6 +165,9 @@ THD::THD()
in_lock_tables(0), bootstrap(0), spcont(NULL) in_lock_tables(0), bootstrap(0), spcont(NULL)
{ {
current_arena= this; current_arena= this;
#ifndef DBUG_OFF
backup_arena= 0;
#endif
host= user= priv_user= db= ip= 0; host= user= priv_user= db= ip= 0;
catalog= (char*)"std"; // the only catalog we have for now catalog= (char*)"std"; // the only catalog we have for now
host_or_ip= "connecting host"; host_or_ip= "connecting host";
@ -795,10 +798,13 @@ void THD::rollback_item_tree_changes()
{ {
I_List_iterator<Item_change_record> it(change_list); I_List_iterator<Item_change_record> it(change_list);
Item_change_record *change; Item_change_record *change;
DBUG_ENTER("rollback_item_tree_changes");
while ((change= it++)) while ((change= it++))
*change->place= change->old_value; *change->place= change->old_value;
/* We can forget about changes memory: it's allocated in runtime memroot */ /* We can forget about changes memory: it's allocated in runtime memroot */
change_list.empty(); 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) void Item_arena::set_n_backup_item_arena(Item_arena *set, Item_arena *backup)
{ {
DBUG_ENTER("Item_arena::set_n_backup_item_arena"); DBUG_ENTER("Item_arena::set_n_backup_item_arena");
DBUG_ASSERT(backup_arena == 0);
backup->set_item_arena(this); backup->set_item_arena(this);
set_item_arena(set); set_item_arena(set);
#ifndef DBUG_OFF
backup_arena= 1;
#endif
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
void Item_arena::restore_backup_item_arena(Item_arena *set, Item_arena *backup) 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->set_item_arena(this);
set_item_arena(backup); set_item_arena(backup);
#ifndef DBUG_OFF
backup_arena= 0;
#endif
#ifdef NOT_NEEDED_NOW #ifdef NOT_NEEDED_NOW
/* /*
Reset backup mem_root to avoid its freeing. 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); clear_alloc_root(&backup->mem_root);
#endif #endif
DBUG_VOID_RETURN;
} }
void Item_arena::set_item_arena(Item_arena *set) void Item_arena::set_item_arena(Item_arena *set)

View File

@ -516,6 +516,9 @@ public:
*/ */
Item *free_list; Item *free_list;
MEM_ROOT mem_root; MEM_ROOT mem_root;
#ifndef DBUG_OFF
bool backup_arena;
#endif
enum enum_state enum enum_state
{ {
INITIALIZED= 0, PREPARED= 1, EXECUTED= 3, CONVENTIONAL_EXECUTION= 2, 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_first_stmt_execute() const { return state == PREPARED; }
inline bool is_stmt_execute() const inline bool is_stmt_execute() const
{ return state == PREPARED || state == EXECUTED; } { return state == PREPARED || state == EXECUTED; }
inline bool is_conventional_execution() const inline bool is_conventional() const
{ return state == CONVENTIONAL_EXECUTION; } { return state == CONVENTIONAL_EXECUTION; }
inline gptr alloc(unsigned int size) { return alloc_root(&mem_root,size); } inline gptr alloc(unsigned int size) { return alloc_root(&mem_root,size); }
inline gptr calloc(unsigned int size) inline gptr calloc(unsigned int size)
@ -1167,7 +1170,7 @@ public:
void change_item_tree(Item **place, Item *new_value) void change_item_tree(Item **place, Item *new_value)
{ {
/* TODO: check for OOM condition here */ /* 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); nocheck_register_item_tree_change(place, *place, &mem_root);
*place= new_value; *place= new_value;
} }
@ -1254,6 +1257,7 @@ public:
virtual bool initialize_tables (JOIN *join=0) { return 0; } virtual bool initialize_tables (JOIN *join=0) { return 0; }
virtual void send_error(uint errcode,const char *err); virtual void send_error(uint errcode,const char *err);
virtual bool send_eof()=0; virtual bool send_eof()=0;
virtual bool simple_select() { return 0; }
virtual void abort() {} virtual void abort() {}
/* /*
Cleanup instance of this class for next execution of a prepared 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_fields(List<Item> &list, uint flags);
bool send_data(List<Item> &items); bool send_data(List<Item> &items);
bool send_eof(); bool send_eof();
bool simple_select() { return 1; }
}; };

View File

@ -288,7 +288,6 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables)
{ {
(*table_ptr)->file->ha_index_or_rnd_end(); (*table_ptr)->file->ha_index_or_rnd_end();
VOID(pthread_mutex_lock(&LOCK_open)); VOID(pthread_mutex_lock(&LOCK_open));
table->file->ha_index_or_rnd_end();
if (close_thread_table(thd, table_ptr)) if (close_thread_table(thd, table_ptr))
{ {
/* Tell threads waiting for refresh that something has happened */ /* 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) if (error == HA_ERR_RECORD_DELETED)
continue; 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'", sql_print_error("mysql_ha_read: Got error %d when reading table '%s'",
err, tables->real_name); error, tables->real_name);
table->file->print_error(err,MYF(0)); table->file->print_error(error,MYF(0));
goto err; goto err;
} }
goto ok; goto ok;

View File

@ -2809,7 +2809,8 @@ unsent_create_error:
break; break;
res= mysql_insert(thd, all_tables, lex->field_list, lex->many_values, res= mysql_insert(thd, all_tables, lex->field_list, lex->many_values,
select_lex->item_list, lex->value_list, select_lex->item_list, lex->value_list,
lex->duplicates); (lex->value_list.elements ?
DUP_UPDATE : lex->duplicates));
if (thd->net.report_error) if (thd->net.report_error)
res= -1; res= -1;
if (first_table->view && !first_table->contain_auto_increment) 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; LEX *lex= thd->lex;
DBUG_ENTER("insert_precheck"); DBUG_ENTER("insert_precheck");
ulong privilege= INSERT_ACL | ulong privilege= (INSERT_ACL |
(lex->duplicates == DUP_REPLACE ? DELETE_ACL : 0) | (lex->duplicates == DUP_REPLACE ? DELETE_ACL : 0) |
(lex->duplicates == DUP_UPDATE ? UPDATE_ACL : 0); (lex->value_list.elements ? UPDATE_ACL : 0));
if (check_one_table_access(thd, privilege, tables)) if (check_one_table_access(thd, privilege, tables))
DBUG_RETURN(1); 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 For temporary tables we don't have to check if the created table exists
*/ */
if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) && if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) &&
find_real_table_in_list(tables, create_table->db, find_table_in_global_list(tables, create_table->db,
create_table->real_name)) create_table->real_name))
{ {
net_printf(thd,ER_UPDATE_TABLE_USED, create_table->real_name); net_printf(thd,ER_UPDATE_TABLE_USED, create_table->real_name);
goto err; 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)) if (tables && check_table_access(thd, SELECT_ACL, tables,0))
goto err; goto err;

View File

@ -156,6 +156,8 @@ static bool send_prep_stmt(Prepared_statement *stmt, uint columns)
{ {
NET *net= &stmt->thd->net; NET *net= &stmt->thd->net;
char buff[9]; char buff[9];
DBUG_ENTER("send_prep_stmt");
buff[0]= 0; /* OK packet indicator */ buff[0]= 0; /* OK packet indicator */
int4store(buff+1, stmt->id); int4store(buff+1, stmt->id);
int2store(buff+5, columns); 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 Send types and names of placeholders to the client
XXX: fix this nasty upcast from List<Item_param> to List<Item> XXX: fix this nasty upcast from List<Item_param> to List<Item>
*/ */
return my_net_write(net, buff, sizeof(buff)) || DBUG_RETURN(my_net_write(net, buff, sizeof(buff)) ||
(stmt->param_count && (stmt->param_count &&
stmt->thd->protocol_simple.send_fields((List<Item> *) stmt->thd->protocol_simple.send_fields((List<Item> *)
&stmt->lex->param_list, &stmt->lex->param_list,
Protocol::SEND_EOF)) || Protocol::SEND_EOF)) ||
net_flush(net); net_flush(net));
return 0;
} }
#else #else
static bool send_prep_stmt(Prepared_statement *stmt, 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. prepared in unit->prepare call above.
*/ */
if (send_prep_stmt(stmt, lex->result->field_count(fields)) || if (send_prep_stmt(stmt, lex->result->field_count(fields)) ||
thd->protocol_simple.send_fields(fields, lex->result->send_fields(fields, Protocol::SEND_EOF)
Protocol::SEND_EOF)
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
|| net_flush(&thd->net) || net_flush(&thd->net)
#endif #endif
@ -1682,11 +1682,13 @@ int mysql_stmt_prepare(THD *thd, char *packet, uint packet_length,
DBUG_RETURN(!stmt); DBUG_RETURN(!stmt);
} }
/* Reinit statement before execution */ /* Reinit statement before execution */
void reset_stmt_for_execute(THD *thd, LEX *lex) void reset_stmt_for_execute(THD *thd, LEX *lex)
{ {
SELECT_LEX *sl= lex->all_selects_list; SELECT_LEX *sl= lex->all_selects_list;
DBUG_ENTER("reset_stmt_for_execute");
if (lex->empty_field_list_on_rset) 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; lex->current_select= &lex->select_lex;
if (lex->result) if (lex->result)
lex->result->cleanup(); 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); mysql_reset_thd_for_next_command(thd);
if (flags & (ulong) CURSOR_TYPE_READ_ONLY) 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 If lex->result is set in the parser, this is not a SELECT
statement: we can't open a cursor for it. 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 else
{ {
DBUG_PRINT("info",("Using READ_ONLY cursor"));
if (!stmt->cursor && if (!stmt->cursor &&
!(stmt->cursor= new (&stmt->mem_root) 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); cleanup_items(stmt->free_list);
reset_stmt_params(stmt); reset_stmt_params(stmt);
close_thread_tables(thd); /* to close derived tables */ close_thread_tables(thd); /* to close derived tables */
thd->rollback_item_tree_changes();
thd->cleanup_after_query(); thd->cleanup_after_query();
} }

View File

@ -91,7 +91,7 @@ static int return_zero_rows(JOIN *join, select_result *res,TABLE_LIST *tables,
uint select_options, const char *info, uint select_options, const char *info,
Item *having, Procedure *proc, Item *having, Procedure *proc,
SELECT_LEX_UNIT *unit); SELECT_LEX_UNIT *unit);
static COND *build_equal_items(COND *cond, static COND *build_equal_items(THD *thd, COND *cond,
COND_EQUAL *inherited, COND_EQUAL *inherited,
List<TABLE_LIST> *join_list, List<TABLE_LIST> *join_list,
COND_EQUAL **cond_equal_ref); 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, static COND *simplify_joins(JOIN *join, List<TABLE_LIST> *join_list,
COND *conds, bool top); COND *conds, bool top);
static COND *optimize_cond(JOIN *join, COND *conds, static COND *optimize_cond(JOIN *join, COND *conds,
List<TABLE_LIST> *join_list,
Item::cond_result *cond_value); Item::cond_result *cond_value);
static bool resolve_nested_join (TABLE_LIST *table); static bool resolve_nested_join (TABLE_LIST *table);
static COND *remove_eq_conds(THD *thd, COND *cond, 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, select_lex->options | thd->options,
result, unit, select_lex); 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, DBUG_PRINT("info",("res: %d report_error: %d", res,
thd->net.report_error)); 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(); result->abort();
res= 1; // Error sent to client res= 1; // Error sent to client
} }
@ -556,17 +554,7 @@ JOIN::optimize()
thd->restore_backup_item_arena(arena, &backup); thd->restore_backup_item_arena(arena, &backup);
} }
/* conds= optimize_cond(this, conds, join_list, &cond_value);
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);
if (thd->net.report_error) if (thd->net.report_error)
{ {
error= 1; error= 1;
@ -684,6 +672,7 @@ JOIN::optimize()
{ {
conds= substitute_for_best_equal_field(conds, cond_equal, map2table); conds= substitute_for_best_equal_field(conds, cond_equal, map2table);
conds->update_used_tables(); conds->update_used_tables();
DBUG_EXECUTE("where", print_where(conds, "after substitute_best_equal"););
} }
/* /*
Permorm the the optimization on fields evaluation mentioned above Permorm the the optimization on fields evaluation mentioned above
@ -1723,11 +1712,10 @@ int
Cursor::open(JOIN *join_arg) Cursor::open(JOIN *join_arg)
{ {
join= join_arg; join= join_arg;
THD *thd= join->thd; THD *thd= join->thd;
/* First non-constant table */ /* First non-constant table */
JOIN_TAB *join_tab= join->join_tab + join->const_tables; JOIN_TAB *join_tab= join->join_tab + join->const_tables;
DBUG_ENTER("Cursor::open");
/* /*
Send fields description to the client; server_status is sent 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; join->fetch_limit= join->unit->offset_limit_cnt;
/* Disable JOIN CACHE as it is not working with cursors yet */ /* 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) if (tab->next_select == sub_select_cache)
tab->next_select= sub_select; tab->next_select= sub_select;
@ -1763,7 +1753,7 @@ Cursor::open(JOIN *join_arg)
*/ */
DBUG_ASSERT(join_tab->table->null_row == 0); 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() find_item_equal()
cond_equal multiple equalities to search in cond_equal multiple equalities to search in
field field to look for 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) on upper levels (not on current level of cond_equal)
DESCRIPTION DESCRIPTION
@ -6446,12 +6436,14 @@ static COND *build_equal_items_for_cond(COND *cond,
return cond; return cond;
} }
/* /*
Build multiple equalities for a condition and all on expressions that Build multiple equalities for a condition and all on expressions that
inherit these multiple equalities inherit these multiple equalities
SYNOPSIS SYNOPSIS
build_equal_items() build_equal_items()
thd Thread handler
cond condition to build the multiple equalities for cond condition to build the multiple equalities for
inherited path to all inherited multiple equality items inherited path to all inherited multiple equality items
join_list list of join tables to which the condition refers to 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 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, COND_EQUAL *inherited,
List<TABLE_LIST> *join_list, List<TABLE_LIST> *join_list,
COND_EQUAL **cond_equal_ref) COND_EQUAL **cond_equal_ref)
@ -6540,12 +6532,13 @@ static COND *build_equal_items(COND *cond,
{ {
if (table->on_expr) if (table->on_expr)
{ {
Item *expr;
List<TABLE_LIST> *join_list= table->nested_join ? List<TABLE_LIST> *join_list= table->nested_join ?
&table->nested_join->join_list : NULL; &table->nested_join->join_list : NULL;
table->on_expr= build_equal_items(table->on_expr, expr= build_equal_items(thd, table->on_expr, inherited, join_list,
inherited, &table->cond_equal);
join_list, if (expr != table->on_expr)
&table->cond_equal); thd->change_item_tree(&table->on_expr, expr);
} }
} }
} }
@ -6553,6 +6546,7 @@ static COND *build_equal_items(COND *cond,
return cond; return cond;
} }
/* /*
Compare field items by table order in the execution plan 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; return cond;
} }
/* /*
change field = field to field = const for each found field = const in the change field = field to field = const for each found field = const in the
and_level and_level
@ -7089,6 +7084,7 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top)
*/ */
if (table->on_expr) if (table->on_expr)
{ {
Item *expr;
/* /*
If an on expression E is attached to the table, If an on expression E is attached to the table,
check all null rejected predicates in this expression. 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 outer join is converted to an inner join and
the corresponding on expression is added to E. the corresponding on expression is added to E.
*/ */
table->on_expr= simplify_joins(join, &nested_join->join_list, expr= simplify_joins(join, &nested_join->join_list,
table->on_expr, FALSE); table->on_expr, FALSE);
table->on_expr= expr;
} }
nested_join->used_tables= (table_map) 0; nested_join->used_tables= (table_map) 0;
nested_join->not_null_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); DBUG_RETURN(conds);
} }
static COND * 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; THD *thd= join->thd;
SELECT_LEX *select= thd->lex->current_select; SELECT_LEX *select= thd->lex->current_select;
@ -7221,7 +7220,19 @@ optimize_cond(JOIN *join, COND *conds, Item::cond_result *cond_value)
} }
else 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");); 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 */ /* change field = field to field = const for each found field = const */
propagate_cond_constants(thd, (I_List<COND_CMP> *) 0, conds, conds); propagate_cond_constants(thd, (I_List<COND_CMP> *) 0, conds, conds);
/* /*

View File

@ -1395,18 +1395,20 @@ TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
open_table(). open_table().
TODO: create and open should be done atomic ! 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))) tmp_disable_binlog(thd);
quick_rm_table(create_info->db_type, create_table->db, if (!mysql_create_table(thd, create_table->db, create_table->real_name,
table_case_name(create_info, 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; table->reginfo.lock_type=TL_WRITE;
if (!((*lock)= mysql_lock_tables(thd, &table,1))) 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; create_info->data_file_name=create_info->index_file_name=0;
/* We don't log the statement, it will be logged later. */ /* We don't log the statement, it will be logged later. */
tmp_disable_binlog(thd); {
error= mysql_create_table(thd, new_db, tmp_name, tmp_disable_binlog(thd);
create_info,create_list,key_list,1,0); error= mysql_create_table(thd, new_db, tmp_name,
reenable_binlog(thd); create_info,create_list,key_list,1,0);
if (error) reenable_binlog(thd);
DBUG_RETURN(error); if (error)
DBUG_RETURN(error);
}
if (table->tmp_table) if (table->tmp_table)
{ {
TABLE_LIST tbl; TABLE_LIST tbl;

View File

@ -16,9 +16,9 @@ static const char * const triggers_file_ext= ".TRG";
*/ */
static File_option triggers_file_parameters[]= 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}, 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++)) while ((trg_create_str= it++))
{ {
mysql_init_query(thd, (uchar*)trg_create_str->str, lex_start(thd, (uchar*)trg_create_str->str, trg_create_str->length);
trg_create_str->length, true);
lex.trg_table= table; lex.trg_table= table;
if (yyparse((void *)thd) || thd->is_fatal_error) if (yyparse((void *)thd) || thd->is_fatal_error)
{ {

View File

@ -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 we make temporary copy of Item_field, to avoid influence of changing
result_field on Item_ref which refer on this field result_field on Item_ref which refer on this field
*/ */
it.replace(new Item_field(thd, field)); thd->change_item_tree(it.ref(), new Item_field(thd, field));
field->register_item_tree_changing(it.ref());
} }
return FALSE; return FALSE;
} }
@ -650,7 +649,7 @@ int mysql_multi_update_prepare(THD *thd)
// Only set timestamp column if this is not modified // Only set timestamp column if this is not modified
if (table->timestamp_field && if (table->timestamp_field &&
table->timestamp_field->query_id == thd->query_id) 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)) if (!tl->updatable || check_key_in_view(thd, tl))
readonly_tables|= table->map; readonly_tables|= table->map;
@ -689,6 +688,8 @@ int mysql_multi_update(THD *thd,
multi_update *result; multi_update *result;
DBUG_ENTER("mysql_multi_update"); 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))) if ((res= open_and_lock_tables(thd, table_list)))
DBUG_RETURN(res); DBUG_RETURN(res);

View File

@ -28,7 +28,8 @@ const char *updatable_views_with_limit_names[]= { "NO", "YES", NullS };
TYPELIB updatable_views_with_limit_typelib= TYPELIB updatable_views_with_limit_typelib=
{ {
array_elements(updatable_views_with_limit_names)-1, "", 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}, FILE_OPTIONS_ULONGLONG},
{{(char*) "algorithm", 9}, offsetof(TABLE_LIST, algorithm), {{(char*) "algorithm", 9}, offsetof(TABLE_LIST, algorithm),
FILE_OPTIONS_ULONGLONG}, 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}, FILE_OPTIONS_ULONGLONG},
{{(char*) "revision", 8}, offsetof(TABLE_LIST, revision), {{(char*) "revision", 8}, offsetof(TABLE_LIST, revision),
FILE_OPTIONS_REV}, FILE_OPTIONS_REV},
@ -357,7 +358,7 @@ static File_option view_parameters[]=
FILE_OPTIONS_ULONGLONG}, FILE_OPTIONS_ULONGLONG},
{{(char*) "source", 6}, offsetof(TABLE_LIST, source), {{(char*) "source", 6}, offsetof(TABLE_LIST, source),
FILE_OPTIONS_ESTRING}, FILE_OPTIONS_ESTRING},
{{NULL, 0}, 0, {{NullS, 0}, 0,
FILE_OPTIONS_STRING} FILE_OPTIONS_STRING}
}; };
@ -586,7 +587,7 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
now Lex placed in statement memory now Lex placed in statement memory
*/ */
table->view= lex= thd->lex= (LEX*) new(&thd->mem_root) st_lex_local; 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; lex->select_lex.select_number= ++thd->select_number;
old_lex->derived_tables|= DERIVED_VIEW; old_lex->derived_tables|= DERIVED_VIEW;
{ {

View File

@ -425,6 +425,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token RETURN_SYM %token RETURN_SYM
%token RETURNS_SYM %token RETURNS_SYM
%token UDF_SONAME_SYM %token UDF_SONAME_SYM
%token UDF_RETURNS_SYM
%token FUNCTION_SYM %token FUNCTION_SYM
%token UNCOMMITTED_SYM %token UNCOMMITTED_SYM
%token UNDEFINED_SYM %token UNDEFINED_SYM
@ -5730,7 +5731,6 @@ opt_insert_update:
yyerror(ER(ER_SYNTAX_ERROR)); yyerror(ER(ER_SYNTAX_ERROR));
YYABORT; YYABORT;
} }
lex->duplicates= DUP_UPDATE;
} }
KEY_SYM UPDATE_SYM update_list KEY_SYM UPDATE_SYM update_list
; ;
@ -6859,6 +6859,7 @@ keyword:
| EXPANSION_SYM {} | EXPANSION_SYM {}
| EXTENDED_SYM {} | EXTENDED_SYM {}
| FAST_SYM {} | FAST_SYM {}
| FOUND_SYM {}
| DISABLE_SYM {} | DISABLE_SYM {}
| ENABLE_SYM {} | ENABLE_SYM {}
| FULL {} | FULL {}