diff options
author | unknown <monty@mysql.com> | 2004-02-16 10:03:25 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-02-16 10:03:25 +0200 |
commit | a07e48eca04b1564da9868f229ba5d958994db69 (patch) | |
tree | 44dc172194086edaeef7da9c9ed059171579a886 /mysql-test | |
parent | 5b2c3126277a8eedab5bcc8a9b0ce7386ccc3dbe (diff) | |
download | mariadb-git-a07e48eca04b1564da9868f229ba5d958994db69.tar.gz |
After merge fixes
Added more DBUG statements
Ensure that we are comparing end space with BINARY strings
Use 'any_db' instead of '' to mean any database. (For HANDLER command)
Only strip ' ' when comparing CHAR, not other space-like characters (like \t)
BitKeeper/deleted/.del-ctype_tis620.result-old~3578ceb0b8284685:
Delete: mysql-test/r/ctype_tis620.result-old
BitKeeper/deleted/.del-ctype_tis620.test-old~ffb1bbd2935d1aba:
Delete: mysql-test/t/ctype_tis620.test-old
client/mysqlbinlog.cc:
Added DBUG statements
Added call of my_end() to free all used memory on exit
heap/hp_info.c:
After merge fixes
heap/hp_open.c:
After merge fixes
include/heap.h:
After merge fixes
include/m_ctype.h:
Use pchar instead of 'int' for character parameters.
Added 'my_binary_compare()'
include/m_string.h:
Fixed wrong define
innobase/ibuf/ibuf0ibuf.c:
After merge fixes
innobase/srv/srv0start.c:
After merge fixes
mysql-test/r/alter_table.result:
Fixed results after merge
mysql-test/r/auto_increment.result:
Fixed results after merge
mysql-test/r/bdb.result:
Fixed results after merge
mysql-test/r/binary.result:
Fixed results after merge
mysql-test/r/create.result:
Fixed results after merge
mysql-test/r/ctype_mb.result:
Fixed results after merge
mysql-test/r/ctype_tis620.result:
Fixed results after merge
mysql-test/r/ctype_utf8.result:
Fixed results after merge
mysql-test/r/delete.result:
Fixed results after merge
mysql-test/r/func_compress.result:
Fixed results after merge
mysql-test/r/func_gconcat.result:
Fixed results after merge
mysql-test/r/func_group.result:
Fixed results after merge
mysql-test/r/func_str.result:
Fixed results after merge
mysql-test/r/innodb.result:
Fixed results after merge
mysql-test/r/insert.result:
Fixed results after merge
mysql-test/r/insert_select.result:
Fixed results after merge
mysql-test/r/key.result:
Fixed results after merge
mysql-test/r/loaddata.result:
Fixed results after merge
mysql-test/r/lock.result:
Fixed results after merge
mysql-test/r/myisam.result:
Fixed results after merge
mysql-test/r/null.result:
Fixed results after merge
mysql-test/r/null_key.result:
Fixed results after merge
mysql-test/r/order_by.result:
Fixed results after merge
mysql-test/r/query_cache.result:
Fixed results after merge
mysql-test/r/range.result:
Fixed results after merge
mysql-test/r/rpl_multi_delete.result:
Fixed results after merge
mysql-test/r/rpl_until.result:
Fixed results after merge
mysql-test/r/subselect.result:
Fixed results after merge
mysql-test/r/subselect_innodb.result:
Fixed results after merge
mysql-test/r/type_blob.result:
Fixed results after merge
mysql-test/r/type_datetime.result:
Fixed results after merge
mysql-test/r/type_decimal.result:
Fixed results after merge
mysql-test/r/type_enum.result:
Fixed results after merge
mysql-test/r/type_float.result:
Fixed results after merge
mysql-test/r/type_ranges.result:
Fixed results after merge
mysql-test/r/type_time.result:
Fixed results after merge
mysql-test/r/type_timestamp.result:
Fixed results after merge
mysql-test/r/type_uint.result:
Fixed results after merge
mysql-test/r/type_year.result:
Fixed results after merge
mysql-test/r/variables.result:
Fixed results after merge
mysql-test/r/warnings.result:
Fixed results after merge
mysql-test/t/case.test:
Fixed shifted error messages
mysql-test/t/create.test:
Fixed shifted error messages
mysql-test/t/ctype_collate.test:
Fixed shifted error messages
mysql-test/t/ctype_tis620.test:
Merge with 4.0 ctype_tis620 test
mysql-test/t/delete.test:
Fixed shifted error messages
mysql-test/t/derived.test:
Fixed shifted error messages
mysql-test/t/fulltext.test:
Fixed shifted error messages
mysql-test/t/func_in.test:
Fixed shifted error messages
mysql-test/t/func_str.test:
Fixed shifted error messages
mysql-test/t/func_test.test:
Fixed shifted error messages
mysql-test/t/grant.test:
Fixed shifted error messages
mysql-test/t/innodb.test:
Change to 4.1 syntax
mysql-test/t/key_cache.test:
Fixed shifted error messages
mysql-test/t/myisam.test:
New test of blob and end space
mysql-test/t/row.test:
Fixed shifted error messages
mysql-test/t/rpl_until.test:
Fixed shifted error messages
mysql-test/t/subselect.test:
Fixed shifted error messages
mysql-test/t/subselect_innodb.test:
Fix test to take into account foreign key constraints
mysql-test/t/union.test:
Fixed shifted error messages
mysql-test/t/user_var.test:
Fixed shifted error messages
mysql-test/t/variables.test:
Fixed shifted error messages
mysys/my_handler.c:
Merge with 4.0 code
sql/ha_heap.cc:
After merge fixes
sql/handler.cc:
After merge fixes
sql/item.cc:
After merge fixes
sql/item_cmpfunc.cc:
Ensure that we are comparing end space with BINARY strings
sql/item_cmpfunc.h:
Ensure that we are comparing end space with BINARY strings
sql/log_event.cc:
More DBUG statements
Ensure that we use all options to LOAD DATA in replication
sql/opt_range.cc:
After merge fixes
sql/sql_db.cc:
After merge fixes
sql/sql_handler.cc:
After merge fixes
Use 'any_db' instead of '' to mean 'no database comparison'
sql/sql_parse.cc:
After merge fixes
sql/sql_select.cc:
After merge fixes
Added function comment for setup_group()
sql/sql_string.cc:
Added stringcmp() for binary comparison.
Added function comments for sortcmp() and stringcmp()
sql/sql_string.h:
Added stringcmp()
sql/sql_table.cc:
After merge fixes
sql/sql_update.cc:
After merge fixes
sql/sql_yacc.yy:
Use 'any_db' instead of '' to mean any database. Using "" causes a 'wrong db name' error.
strings/ctype-big5.c:
Strip only end space, not other space characters.
strings/ctype-bin.c:
Removed some not needed functions.
Added function comments
Don't remove end space in comparisons
Change my_wildcmp_bin() to be 'identical' with other similar code
strings/ctype-czech.c:
Strip only end space, not other space characters.
strings/ctype-gbk.c:
Strip only end space, not other space characters.
strings/ctype-latin1.c:
Strip only end space, not other space characters.
strings/ctype-mb.c:
Strip only end space, not other space characters.
strings/ctype-simple.c:
Strip only end space, not other space characters.
strings/ctype-sjis.c:
Strip only end space, not other space characters.
strings/ctype-tis620.c:
Added usage of my_instr_simple. This needs to be cleaned up!
strings/ctype-utf8.c:
Strip only end space, not other space characters.
strings/ctype-win1250ch.c:
Strip only end space, not other space characters.
Fixed indentation
strings/strto.c:
Code cleanup
Diffstat (limited to 'mysql-test')
64 files changed, 959 insertions, 570 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 1891da73d85..703cc59d9a4 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -412,18 +412,6 @@ t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE t1 0 PRIMARY 2 User A 0 NULL NULL BTREE t1 1 Host 1 Host A NULL NULL NULL BTREE disabled DROP TABLE t1; -CREATE TABLE t1 (a int PRIMARY KEY, b INT UNIQUE); -ALTER TABLE t1 DROP PRIMARY KEY; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', - `b` int(11) default NULL, - UNIQUE KEY `b` (`b`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -ALTER TABLE t1 DROP PRIMARY KEY; -ERROR 42000: Can't DROP 'PRIMARY'. Check that column/key exists -DROP TABLE t1; create table t1 (name char(15)); insert into t1 (name) values ("current"); create database mysqltest; @@ -436,7 +424,7 @@ select * from mysqltest.t1; name mysqltest alter table t1 rename mysqltest.t1; -Table 't1' already exists +ERROR 42S01: Table 't1' already exists select * from t1; name current @@ -445,3 +433,15 @@ name mysqltest drop table t1; drop database mysqltest; +CREATE TABLE t1 (a int PRIMARY KEY, b INT UNIQUE); +ALTER TABLE t1 DROP PRIMARY KEY; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL default '0', + `b` int(11) default NULL, + UNIQUE KEY `b` (`b`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +ALTER TABLE t1 DROP PRIMARY KEY; +ERROR 42000: Can't DROP 'PRIMARY'. Check that column/key exists +DROP TABLE t1; diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result index 7a7faf0db9a..8f77b306d3e 100644 --- a/mysql-test/r/auto_increment.result +++ b/mysql-test/r/auto_increment.result @@ -162,7 +162,7 @@ last_insert_id() 255 insert into t1 set i = null; Warnings: -Warning 1263 Data truncated, out of range for column 'i' at row 1 +Warning 1264 Data truncated, out of range for column 'i' at row 1 select last_insert_id(); last_insert_id() 255 @@ -213,7 +213,7 @@ a b delete from t1 where a=0; update t1 set a=NULL where b=6; Warnings: -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'a' at row 4 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 4 update t1 set a=300 where b=7; SET SQL_MODE=''; insert into t1(a,b)values(NULL,8); @@ -255,7 +255,7 @@ a b delete from t1 where a=0; update t1 set a=NULL where b=13; Warnings: -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'a' at row 9 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 9 update t1 set a=500 where b=14; select * from t1 order by b; a b diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index 44a7b4e03b2..bee40eac30d 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -1159,23 +1159,23 @@ drop table t1,t2; create table t1 (a char(10), key(a), b int not null, key(b)) engine=bdb; insert into t1 values ('a',1),('A',2); explain select a from t1; -table type possible_keys key key_len ref rows Extra -t1 ALL NULL NULL NULL NULL 2 +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 select a from t1; a a A explain select b from t1; -table type possible_keys key key_len ref rows Extra -t1 index NULL b 4 NULL 2 Using index +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL b 4 NULL 2 Using index select b from t1; b 1 2 alter table t1 modify a char(10) binary; explain select a from t1; -table type possible_keys key key_len ref rows Extra -t1 index NULL a 11 NULL 2 Using index +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 11 NULL 2 Using index select a from t1; a A diff --git a/mysql-test/r/binary.result b/mysql-test/r/binary.result index d4576791aed..9c3174ec606 100644 --- a/mysql-test/r/binary.result +++ b/mysql-test/r/binary.result @@ -59,10 +59,8 @@ concat("-",a,"-",b,"-") -hello-hello- select concat("-",a,"-",b,"-") from t1 where b="hello "; concat("-",a,"-",b,"-") --hello-hello- select concat("-",a,"-",b,"-") from t1 ignore index (b) where b="hello "; concat("-",a,"-",b,"-") --hello-hello- alter table t1 modify b tinytext not null, drop key b, add key (b(100)); select concat("-",a,"-",b,"-") from t1 where b="hello "; concat("-",a,"-",b,"-") diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 940c9e9a50b..e6a010a7542 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -11,7 +11,7 @@ create table t1 (b char(0) not null); create table if not exists t1 (b char(0) not null); insert into t1 values (""),(null); Warnings: -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'b' at row 2 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'b' at row 2 select * from t1; b diff --git a/mysql-test/r/ctype_mb.result b/mysql-test/r/ctype_mb.result index edccb047c85..5e273b3c800 100644 --- a/mysql-test/r/ctype_mb.result +++ b/mysql-test/r/ctype_mb.result @@ -17,9 +17,9 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd'); Warnings: -Warning 1264 Data truncated for column 'c1' at row 1 -Warning 1264 Data truncated for column 'c2' at row 1 -Warning 1264 Data truncated for column 'c3' at row 1 +Warning 1265 Data truncated for column 'c1' at row 1 +Warning 1265 Data truncated for column 'c2' at row 1 +Warning 1265 Data truncated for column 'c3' at row 1 SELECT * FROM t1; c1 c2 c3 aaaa aaaa aaaa diff --git a/mysql-test/r/ctype_tis620.result b/mysql-test/r/ctype_tis620.result index 811609d4ba9..77799717d44 100644 --- a/mysql-test/r/ctype_tis620.result +++ b/mysql-test/r/ctype_tis620.result @@ -1,9 +1,129 @@ drop table if exists t1; +SET @pl0= _tis620 0x000102030405060708090A0B0C0D0E0F; +SET @pl1= _tis620 0x101112131415161718191A1B1C1D1E1F; +SET @pl2= _tis620 0x202122232425262728292A2B2C2D2E2F; +SET @pl3= _tis620 0x303132333435363738393A3B3C3D3E3F; +SET @pl4= _tis620 0x404142434445464748494A4B4C4D4E4F; +SET @pl5= _tis620 0x505152535455565758595A5B5C5D5E5F; +SET @pl6= _tis620 0x606162636465666768696A6B6C6D6E6F; +SET @pl7= _tis620 0x707172737475767778797A7B7C7D7E7F; +SET @pl8= _tis620 0x808182838485868788898A8B8C8D8E8F; +SET @pl9= _tis620 0x909192939495969798999A9B9C9D9E9F; +SET @plA= _tis620 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAF; +SET @plB= _tis620 0xB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF; +SET @plC= _tis620 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECF; +SET @plD= _tis620 0xD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF; +SET @plE= _tis620 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF; +SET @plF= _tis620 0xF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF; +SELECT hex(@u0:=convert(@pl0 using utf8)); +hex(@u0:=convert(@pl0 using utf8)) +000102030405060708090A0B0C0D0E0F +SELECT hex(@u1:=convert(@pl1 using utf8)); +hex(@u1:=convert(@pl1 using utf8)) +101112131415161718191A1B1C1D1E1F +SELECT hex(@u2:=convert(@pl2 using utf8)); +hex(@u2:=convert(@pl2 using utf8)) +202122232425262728292A2B2C2D2E2F +SELECT hex(@u3:=convert(@pl3 using utf8)); +hex(@u3:=convert(@pl3 using utf8)) +303132333435363738393A3B3C3D3E3F +SELECT hex(@u4:=convert(@pl4 using utf8)); +hex(@u4:=convert(@pl4 using utf8)) +404142434445464748494A4B4C4D4E4F +SELECT hex(@u5:=convert(@pl5 using utf8)); +hex(@u5:=convert(@pl5 using utf8)) +505152535455565758595A5B5C5D5E5F +SELECT hex(@u6:=convert(@pl6 using utf8)); +hex(@u6:=convert(@pl6 using utf8)) +606162636465666768696A6B6C6D6E6F +SELECT hex(@u7:=convert(@pl7 using utf8)); +hex(@u7:=convert(@pl7 using utf8)) +707172737475767778797A7B7C7D7E7F +SELECT hex(@u8:=convert(@pl8 using utf8)); +hex(@u8:=convert(@pl8 using utf8)) +C280C281C282C283C284C285C286C287C288C289C28AC28BC28CC28DC28EC28F +SELECT hex(@u9:=convert(@pl9 using utf8)); +hex(@u9:=convert(@pl9 using utf8)) +C290C291C292C293C294C295C296C297C298C299C29AC29BC29CC29DC29EC29F +SELECT hex(@uA:=convert(@plA using utf8)); +hex(@uA:=convert(@plA using utf8)) +EFBFBDE0B881E0B882E0B883E0B884E0B885E0B886E0B887E0B888E0B889E0B88AE0B88BE0B88CE0B88DE0B88EE0B88F +SELECT hex(@uB:=convert(@plB using utf8)); +hex(@uB:=convert(@plB using utf8)) +E0B890E0B891E0B892E0B893E0B894E0B895E0B896E0B897E0B898E0B899E0B89AE0B89BE0B89CE0B89DE0B89EE0B89F +SELECT hex(@uC:=convert(@plC using utf8)); +hex(@uC:=convert(@plC using utf8)) +E0B8A0E0B8A1E0B8A2E0B8A3E0B8A4E0B8A5E0B8A6E0B8A7E0B8A8E0B8A9E0B8AAE0B8ABE0B8ACE0B8ADE0B8AEE0B8AF +SELECT hex(@uD:=convert(@plD using utf8)); +hex(@uD:=convert(@plD using utf8)) +E0B8B0E0B8B1E0B8B2E0B8B3E0B8B4E0B8B5E0B8B6E0B8B7E0B8B8E0B8B9E0B8BAEFBFBDEFBFBDEFBFBDEFBFBDE0B8BF +SELECT hex(@uE:=convert(@plE using utf8)); +hex(@uE:=convert(@plE using utf8)) +E0B980E0B981E0B982E0B983E0B984E0B985E0B986E0B987E0B988E0B989E0B98AE0B98BE0B98CE0B98DE0B98EE0B98F +SELECT hex(@uF:=convert(@plF using utf8)); +hex(@uF:=convert(@plF using utf8)) +E0B990E0B991E0B992E0B993E0B994E0B995E0B996E0B997E0B998E0B999E0B99AE0B99BEFBFBDEFBFBDEFBFBDEFBFBD +SELECT hex(convert(@u0 USING tis620)); +hex(convert(@u0 USING tis620)) +000102030405060708090A0B0C0D0E0F +SELECT hex(convert(@u1 USING tis620)); +hex(convert(@u1 USING tis620)) +101112131415161718191A1B1C1D1E1F +SELECT hex(convert(@u2 USING tis620)); +hex(convert(@u2 USING tis620)) +202122232425262728292A2B2C2D2E2F +SELECT hex(convert(@u3 USING tis620)); +hex(convert(@u3 USING tis620)) +303132333435363738393A3B3C3D3E3F +SELECT hex(convert(@u4 USING tis620)); +hex(convert(@u4 USING tis620)) +404142434445464748494A4B4C4D4E4F +SELECT hex(convert(@u5 USING tis620)); +hex(convert(@u5 USING tis620)) +505152535455565758595A5B5C5D5E5F +SELECT hex(convert(@u6 USING tis620)); +hex(convert(@u6 USING tis620)) +606162636465666768696A6B6C6D6E6F +SELECT hex(convert(@u7 USING tis620)); +hex(convert(@u7 USING tis620)) +707172737475767778797A7B7C7D7E7F +SELECT hex(convert(@u8 USING tis620)); +hex(convert(@u8 USING tis620)) +808182838485868788898A8B8C8D8E8F +SELECT hex(convert(@u9 USING tis620)); +hex(convert(@u9 USING tis620)) +909192939495969798999A9B9C9D9E9F +SELECT hex(convert(@uA USING tis620)); +hex(convert(@uA USING tis620)) +FFA1A2A3A4A5A6A7A8A9AAABACADAEAF +SELECT hex(convert(@uB USING tis620)); +hex(convert(@uB USING tis620)) +B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF +SELECT hex(convert(@uC USING tis620)); +hex(convert(@uC USING tis620)) +C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF +SELECT hex(convert(@uD USING tis620)); +hex(convert(@uD USING tis620)) +D0D1D2D3D4D5D6D7D8D9DAFFFFFFFFDF +SELECT hex(convert(@uE USING tis620)); +hex(convert(@uE USING tis620)) +E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF +SELECT hex(convert(@uF USING tis620)); +hex(convert(@uF USING tis620)) +F0F1F2F3F4F5F6F7F8F9FAFBFFFFFFFF +SET NAMES tis620; CREATE TABLE t1 ( recid int(11) NOT NULL auto_increment, dyninfo text, PRIMARY KEY (recid) ) ENGINE=MyISAM; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `recid` int(11) NOT NULL auto_increment, + `dyninfo` text, + PRIMARY KEY (`recid`) +) ENGINE=MyISAM DEFAULT CHARSET=tis620 INSERT INTO t1 VALUES (1,'color=\"STB,NPG\"\r\nengine=\"J30A13\"\r\nframe=\"MRHCG1640YP4\"\r\ngrade=\"V6\"\r\nmodel=\"ACCORD\"\r\nmodelcode=\"CG164YEN\"\r\ntype=\"VT6\"\r\n'); INSERT INTO t1 VALUES (2,'color=\"HTM,NPG,DEG,RGS\"\r\nengine=\"F23A5YP1\"\r\nframe=\"MRHCF8640YP3\"\r\ngrade=\"EXi AT\"\r\nmodel=\"ACCORD\"\r\nmodelcode=\"CF864YE\"\r\ntype=\"EXA\"\r\n'); SELECT DISTINCT diff --git a/mysql-test/r/ctype_tis620.result-old b/mysql-test/r/ctype_tis620.result-old deleted file mode 100644 index 10164cd07ef..00000000000 --- a/mysql-test/r/ctype_tis620.result-old +++ /dev/null @@ -1,113 +0,0 @@ -drop table if exists t1; -SET @pl0= _tis620 0x000102030405060708090A0B0C0D0E0F; -SET @pl1= _tis620 0x101112131415161718191A1B1C1D1E1F; -SET @pl2= _tis620 0x202122232425262728292A2B2C2D2E2F; -SET @pl3= _tis620 0x303132333435363738393A3B3C3D3E3F; -SET @pl4= _tis620 0x404142434445464748494A4B4C4D4E4F; -SET @pl5= _tis620 0x505152535455565758595A5B5C5D5E5F; -SET @pl6= _tis620 0x606162636465666768696A6B6C6D6E6F; -SET @pl7= _tis620 0x707172737475767778797A7B7C7D7E7F; -SET @pl8= _tis620 0x808182838485868788898A8B8C8D8E8F; -SET @pl9= _tis620 0x909192939495969798999A9B9C9D9E9F; -SET @plA= _tis620 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAF; -SET @plB= _tis620 0xB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF; -SET @plC= _tis620 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECF; -SET @plD= _tis620 0xD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF; -SET @plE= _tis620 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF; -SET @plF= _tis620 0xF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF; -SELECT hex(@u0:=convert(@pl0 using utf8)); -hex(@u0:=convert(@pl0 using utf8)) -000102030405060708090A0B0C0D0E0F -SELECT hex(@u1:=convert(@pl1 using utf8)); -hex(@u1:=convert(@pl1 using utf8)) -101112131415161718191A1B1C1D1E1F -SELECT hex(@u2:=convert(@pl2 using utf8)); -hex(@u2:=convert(@pl2 using utf8)) -202122232425262728292A2B2C2D2E2F -SELECT hex(@u3:=convert(@pl3 using utf8)); -hex(@u3:=convert(@pl3 using utf8)) -303132333435363738393A3B3C3D3E3F -SELECT hex(@u4:=convert(@pl4 using utf8)); -hex(@u4:=convert(@pl4 using utf8)) -404142434445464748494A4B4C4D4E4F -SELECT hex(@u5:=convert(@pl5 using utf8)); -hex(@u5:=convert(@pl5 using utf8)) -505152535455565758595A5B5C5D5E5F -SELECT hex(@u6:=convert(@pl6 using utf8)); -hex(@u6:=convert(@pl6 using utf8)) -606162636465666768696A6B6C6D6E6F -SELECT hex(@u7:=convert(@pl7 using utf8)); -hex(@u7:=convert(@pl7 using utf8)) -707172737475767778797A7B7C7D7E7F -SELECT hex(@u8:=convert(@pl8 using utf8)); -hex(@u8:=convert(@pl8 using utf8)) -C280C281C282C283C284C285C286C287C288C289C28AC28BC28CC28DC28EC28F -SELECT hex(@u9:=convert(@pl9 using utf8)); -hex(@u9:=convert(@pl9 using utf8)) -C290C291C292C293C294C295C296C297C298C299C29AC29BC29CC29DC29EC29F -SELECT hex(@uA:=convert(@plA using utf8)); -hex(@uA:=convert(@plA using utf8)) -EFBFBDE0B881E0B882E0B883E0B884E0B885E0B886E0B887E0B888E0B889E0B88AE0B88BE0B88CE0B88DE0B88EE0B88F -SELECT hex(@uB:=convert(@plB using utf8)); -hex(@uB:=convert(@plB using utf8)) -E0B890E0B891E0B892E0B893E0B894E0B895E0B896E0B897E0B898E0B899E0B89AE0B89BE0B89CE0B89DE0B89EE0B89F -SELECT hex(@uC:=convert(@plC using utf8)); -hex(@uC:=convert(@plC using utf8)) -E0B8A0E0B8A1E0B8A2E0B8A3E0B8A4E0B8A5E0B8A6E0B8A7E0B8A8E0B8A9E0B8AAE0B8ABE0B8ACE0B8ADE0B8AEE0B8AF -SELECT hex(@uD:=convert(@plD using utf8)); -hex(@uD:=convert(@plD using utf8)) -E0B8B0E0B8B1E0B8B2E0B8B3E0B8B4E0B8B5E0B8B6E0B8B7E0B8B8E0B8B9E0B8BAEFBFBDEFBFBDEFBFBDEFBFBDE0B8BF -SELECT hex(@uE:=convert(@plE using utf8)); -hex(@uE:=convert(@plE using utf8)) -E0B980E0B981E0B982E0B983E0B984E0B985E0B986E0B987E0B988E0B989E0B98AE0B98BE0B98CE0B98DE0B98EE0B98F -SELECT hex(@uF:=convert(@plF using utf8)); -hex(@uF:=convert(@plF using utf8)) -E0B990E0B991E0B992E0B993E0B994E0B995E0B996E0B997E0B998E0B999E0B99AE0B99BEFBFBDEFBFBDEFBFBDEFBFBD -SELECT hex(convert(@u0 USING tis620)); -hex(convert(@u0 USING tis620)) -000102030405060708090A0B0C0D0E0F -SELECT hex(convert(@u1 USING tis620)); -hex(convert(@u1 USING tis620)) -101112131415161718191A1B1C1D1E1F -SELECT hex(convert(@u2 USING tis620)); -hex(convert(@u2 USING tis620)) -202122232425262728292A2B2C2D2E2F -SELECT hex(convert(@u3 USING tis620)); -hex(convert(@u3 USING tis620)) -303132333435363738393A3B3C3D3E3F -SELECT hex(convert(@u4 USING tis620)); -hex(convert(@u4 USING tis620)) -404142434445464748494A4B4C4D4E4F -SELECT hex(convert(@u5 USING tis620)); -hex(convert(@u5 USING tis620)) -505152535455565758595A5B5C5D5E5F -SELECT hex(convert(@u6 USING tis620)); -hex(convert(@u6 USING tis620)) -606162636465666768696A6B6C6D6E6F -SELECT hex(convert(@u7 USING tis620)); -hex(convert(@u7 USING tis620)) -707172737475767778797A7B7C7D7E7F -SELECT hex(convert(@u8 USING tis620)); -hex(convert(@u8 USING tis620)) -808182838485868788898A8B8C8D8E8F -SELECT hex(convert(@u9 USING tis620)); -hex(convert(@u9 USING tis620)) -909192939495969798999A9B9C9D9E9F -SELECT hex(convert(@uA USING tis620)); -hex(convert(@uA USING tis620)) -FFA1A2A3A4A5A6A7A8A9AAABACADAEAF -SELECT hex(convert(@uB USING tis620)); -hex(convert(@uB USING tis620)) -B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF -SELECT hex(convert(@uC USING tis620)); -hex(convert(@uC USING tis620)) -C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF -SELECT hex(convert(@uD USING tis620)); -hex(convert(@uD USING tis620)) -D0D1D2D3D4D5D6D7D8D9DAFFFFFFFFDF -SELECT hex(convert(@uE USING tis620)); -hex(convert(@uE USING tis620)) -E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF -SELECT hex(convert(@uF USING tis620)); -hex(convert(@uF USING tis620)) -F0F1F2F3F4F5F6F7F8F9FAFBFFFFFFFF diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 815ab492fa4..4c699052113 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -83,7 +83,7 @@ set names koi8r; create table t1 (s1 char(1) character set utf8); insert into t1 values (_koi8r'ÁÂ'); Warnings: -Warning 1264 Data truncated for column 's1' at row 1 +Warning 1265 Data truncated for column 's1' at row 1 select s1,hex(s1),char_length(s1),octet_length(s1) from t1; s1 hex(s1) char_length(s1) octet_length(s1) Á D0B0 1 2 diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result index 10f2c069429..f1acc5d2dfa 100644 --- a/mysql-test/r/delete.result +++ b/mysql-test/r/delete.result @@ -93,8 +93,8 @@ a b 2 12 delete ignore t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b <> (select b from t2 where t11.a < t2.a); Warnings: -Error 1241 Subquery returns more than 1 row -Error 1241 Subquery returns more than 1 row +Error 1242 Subquery returns more than 1 row +Error 1242 Subquery returns more than 1 row select * from t11; a b 0 10 @@ -113,8 +113,8 @@ a b 2 12 delete ignore from t11 where t11.b <> (select b from t2 where t11.a < t2.a); Warnings: -Error 1241 Subquery returns more than 1 row -Error 1241 Subquery returns more than 1 row +Error 1242 Subquery returns more than 1 row +Error 1242 Subquery returns more than 1 row select * from t11; a b 0 10 diff --git a/mysql-test/r/func_compress.result b/mysql-test/r/func_compress.result index 1fcda7748b3..35c1b6ae93f 100644 --- a/mysql-test/r/func_compress.result +++ b/mysql-test/r/func_compress.result @@ -65,6 +65,6 @@ NULL 50000 NULL Warnings: -Error 1258 ZLIB: Input data was corrupted for zlib -Error 1255 Too big size of uncompressed data. The maximum size is 1048576. (probably, length of uncompressed data was corrupted) +Error 1259 ZLIB: Input data was corrupted for zlib +Error 1256 Too big size of uncompressed data. The maximum size is 1048576. (probably, length of uncompressed data was corrupted) drop table t1; diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index af6f7956fe3..5807bae6a06 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -163,10 +163,10 @@ grp group_concat(c) 4 5 NULL Warnings: -Warning 1259 1 line(s) was(were) cut by group_concat() +Warning 1260 1 line(s) was(were) cut by group_concat() show warnings; Level Code Message -Warning 1259 1 line(s) was(were) cut by group_concat() +Warning 1260 1 line(s) was(were) cut by group_concat() set group_concat_max_len = 1024; select group_concat(sum(a)) from t1 group by grp; ERROR HY000: Invalid use of group function diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index 6a704f2847d..147d7776e4d 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -551,7 +551,7 @@ id select_type table type possible_keys key key_len ref rows Extra explain select min(a1) from t1 where a1 between a3 and 'KKK'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 14 Using where +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 14 Using where explain select min(a4) from t1 where (a4 + 0.01) between 0.07 and 0.08; id select_type table type possible_keys key key_len ref rows Extra diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index ffa7191f4e5..c9eba2f2505 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -263,3 +263,355 @@ SELECT bugdesc, REPLACE(bugdesc, 'xxxxxxxxxxxxxxxxxxxx', 'bbbbbbbbbbbbbbbbbbbb') bugdesc REPLACE(bugdesc, 'xxxxxxxxxxxxxxxxxxxx', 'bbbbbbbbbbbbbbbbbbbb') aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa drop table t1; +CREATE TABLE t1 (id int(11) NOT NULL auto_increment, tmp text NOT NULL, KEY id (id)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1, 'a545f661efdd1fb66fdee3aab79945bf'); +SELECT 1 FROM t1 WHERE tmp=AES_DECRYPT(tmp,"password"); +1 +DROP TABLE t1; +CREATE TABLE t1 ( +wid int(10) unsigned NOT NULL auto_increment, +data_podp date default NULL, +status_wnio enum('nowy','podp','real','arch') NOT NULL default 'nowy', +PRIMARY KEY(wid), +); +INSERT INTO t1 VALUES (8,NULL,'real'); +INSERT INTO t1 VALUES (9,NULL,'nowy'); +SELECT elt(status_wnio,data_podp) FROM t1 GROUP BY wid; +elt(status_wnio,data_podp) +NULL +NULL +DROP TABLE t1; +CREATE TABLE t1 (title text) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('Congress reconvenes in September to debate welfare and adult education'); +INSERT INTO t1 VALUES ('House passes the CAREERS bill'); +SELECT CONCAT("</a>",RPAD("",(55 - LENGTH(title)),".")) from t1; +CONCAT("</a>",RPAD("",(55 - LENGTH(title)),".")) +NULL +</a>.......................... +DROP TABLE t1; +CREATE TABLE t1 (i int, j int); +INSERT INTO t1 VALUES (1,1),(2,2); +SELECT DISTINCT i, ELT(j, '345', '34') FROM t1; +i ELT(j, '345', '34') +1 345 +2 34 +DROP TABLE t1; +select 1=_latin1'1'; +1=_latin1'1' +1 +select _latin1'1'=1; +_latin1'1'=1 +1 +select _latin2'1'=1; +_latin2'1'=1 +1 +select 1=_latin2'1'; +1=_latin2'1' +1 +select _latin1'1'=_latin2'1'; +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation '=' +select row('a','b','c') = row('a','b','c'); +row('a','b','c') = row('a','b','c') +1 +select row('A','b','c') = row('a','b','c'); +row('A','b','c') = row('a','b','c') +1 +select row('A' COLLATE latin1_bin,'b','c') = row('a','b','c'); +row('A' COLLATE latin1_bin,'b','c') = row('a','b','c') +0 +select row('A','b','c') = row('a' COLLATE latin1_bin,'b','c'); +row('A','b','c') = row('a' COLLATE latin1_bin,'b','c') +0 +select row('A' COLLATE latin1_general_ci,'b','c') = row('a' COLLATE latin1_bin,'b','c'); +ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation '=' +select concat(_latin1'a',_latin2'a'); +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'concat' +select concat(_latin1'a',_latin2'a',_latin5'a'); +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE), (latin2_general_ci,COERCIBLE), (latin5_turkish_ci,COERCIBLE) for operation 'concat' +select concat(_latin1'a',_latin2'a',_latin5'a',_latin7'a'); +ERROR HY000: Illegal mix of collations for operation 'concat' +select FIELD('b','A','B'); +FIELD('b','A','B') +2 +select FIELD('B','A','B'); +FIELD('B','A','B') +2 +select FIELD('b' COLLATE latin1_bin,'A','B'); +FIELD('b' COLLATE latin1_bin,'A','B') +0 +select FIELD('b','A' COLLATE latin1_bin,'B'); +FIELD('b','A' COLLATE latin1_bin,'B') +0 +select FIELD(_latin2'b','A','B'); +ERROR HY000: Illegal mix of collations (latin2_general_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation 'field' +select FIELD('b',_latin2'A','B'); +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE), (latin2_general_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation 'field' +select FIELD('b',_latin2'A','B',1); +FIELD('b',_latin2'A','B',1) +1 +select POSITION(_latin1'B' IN _latin1'abcd'); +POSITION(_latin1'B' IN _latin1'abcd') +2 +select POSITION(_latin1'B' IN _latin1'abcd' COLLATE latin1_bin); +POSITION(_latin1'B' IN _latin1'abcd' COLLATE latin1_bin) +0 +select POSITION(_latin1'B' COLLATE latin1_bin IN _latin1'abcd'); +POSITION(_latin1'B' COLLATE latin1_bin IN _latin1'abcd') +0 +select POSITION(_latin1'B' COLLATE latin1_general_ci IN _latin1'abcd' COLLATE latin1_bin); +ERROR HY000: Illegal mix of collations (latin1_bin,EXPLICIT) and (latin1_general_ci,EXPLICIT) for operation 'locate' +select POSITION(_latin1'B' IN _latin2'abcd'); +ERROR HY000: Illegal mix of collations (latin2_general_ci,COERCIBLE) and (latin1_swedish_ci,COERCIBLE) for operation 'locate' +select FIND_IN_SET(_latin1'B',_latin1'a,b,c,d'); +FIND_IN_SET(_latin1'B',_latin1'a,b,c,d') +2 +select FIND_IN_SET(_latin1'B' COLLATE latin1_general_ci,_latin1'a,b,c,d' COLLATE latin1_bin); +ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'find_in_set' +select FIND_IN_SET(_latin1'B',_latin2'a,b,c,d'); +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'find_in_set' +select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin1'd',2); +SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin1'd',2) +abcdabc +select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin2'd',2); +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'substr_index' +select SUBSTRING_INDEX(_latin1'abcdabcdabcd' COLLATE latin1_general_ci,_latin1'd' COLLATE latin1_bin,2); +ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'substr_index' +select _latin1'B' between _latin1'a' and _latin1'c'; +_latin1'B' between _latin1'a' and _latin1'c' +1 +select _latin1'B' collate latin1_bin between _latin1'a' and _latin1'c'; +_latin1'B' collate latin1_bin between _latin1'a' and _latin1'c' +0 +select _latin1'B' between _latin1'a' collate latin1_bin and _latin1'c'; +_latin1'B' between _latin1'a' collate latin1_bin and _latin1'c' +0 +select _latin1'B' between _latin1'a' and _latin1'c' collate latin1_bin; +_latin1'B' between _latin1'a' and _latin1'c' collate latin1_bin +0 +select _latin2'B' between _latin1'a' and _latin1'b'; +ERROR HY000: Illegal mix of collations (latin2_general_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation 'between' +select _latin1'B' between _latin2'a' and _latin1'b'; +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE), (latin2_general_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation 'between' +select _latin1'B' between _latin1'a' and _latin2'b'; +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE), (latin2_general_ci,COERCIBLE) for operation 'between' +select _latin1'B' collate latin1_general_ci between _latin1'a' collate latin1_bin and _latin1'b'; +ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT), (latin1_bin,EXPLICIT), (latin1_swedish_ci,COERCIBLE) for operation 'between' +select _latin1'B' in (_latin1'a',_latin1'b'); +_latin1'B' in (_latin1'a',_latin1'b') +1 +select _latin1'B' collate latin1_bin in (_latin1'a',_latin1'b'); +_latin1'B' collate latin1_bin in (_latin1'a',_latin1'b') +0 +select _latin1'B' in (_latin1'a' collate latin1_bin,_latin1'b'); +_latin1'B' in (_latin1'a' collate latin1_bin,_latin1'b') +0 +select _latin1'B' in (_latin1'a',_latin1'b' collate latin1_bin); +_latin1'B' in (_latin1'a',_latin1'b' collate latin1_bin) +0 +select _latin2'B' in (_latin1'a',_latin1'b'); +ERROR HY000: Illegal mix of collations (latin2_general_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation ' IN ' +select _latin1'B' in (_latin2'a',_latin1'b'); +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE), (latin2_general_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation ' IN ' +select _latin1'B' in (_latin1'a',_latin2'b'); +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE), (latin2_general_ci,COERCIBLE) for operation ' IN ' +select _latin1'B' COLLATE latin1_general_ci in (_latin1'a' COLLATE latin1_bin,_latin1'b'); +ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT), (latin1_bin,EXPLICIT), (latin1_swedish_ci,COERCIBLE) for operation ' IN ' +select _latin1'B' COLLATE latin1_general_ci in (_latin1'a',_latin1'b' COLLATE latin1_bin); +ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT), (latin1_swedish_ci,COERCIBLE), (latin1_bin,EXPLICIT) for operation ' IN ' +select collation(bin(130)), coercibility(bin(130)); +collation(bin(130)) coercibility(bin(130)) +latin1_swedish_ci 3 +select collation(oct(130)), coercibility(oct(130)); +collation(oct(130)) coercibility(oct(130)) +latin1_swedish_ci 3 +select collation(conv(130,16,10)), coercibility(conv(130,16,10)); +collation(conv(130,16,10)) coercibility(conv(130,16,10)) +latin1_swedish_ci 3 +select collation(hex(130)), coercibility(hex(130)); +collation(hex(130)) coercibility(hex(130)) +latin1_swedish_ci 3 +select collation(char(130)), coercibility(hex(130)); +collation(char(130)) coercibility(hex(130)) +binary 3 +select collation(format(130,10)), coercibility(format(130,10)); +collation(format(130,10)) coercibility(format(130,10)) +latin1_swedish_ci 3 +select collation(lcase(_latin2'a')), coercibility(lcase(_latin2'a')); +collation(lcase(_latin2'a')) coercibility(lcase(_latin2'a')) +latin2_general_ci 3 +select collation(ucase(_latin2'a')), coercibility(ucase(_latin2'a')); +collation(ucase(_latin2'a')) coercibility(ucase(_latin2'a')) +latin2_general_ci 3 +select collation(left(_latin2'a',1)), coercibility(left(_latin2'a',1)); +collation(left(_latin2'a',1)) coercibility(left(_latin2'a',1)) +latin2_general_ci 3 +select collation(right(_latin2'a',1)), coercibility(right(_latin2'a',1)); +collation(right(_latin2'a',1)) coercibility(right(_latin2'a',1)) +latin2_general_ci 3 +select collation(substring(_latin2'a',1,1)), coercibility(substring(_latin2'a',1,1)); +collation(substring(_latin2'a',1,1)) coercibility(substring(_latin2'a',1,1)) +latin2_general_ci 3 +select collation(concat(_latin2'a',_latin2'b')), coercibility(concat(_latin2'a',_latin2'b')); +collation(concat(_latin2'a',_latin2'b')) coercibility(concat(_latin2'a',_latin2'b')) +latin2_general_ci 3 +select collation(lpad(_latin2'a',4,_latin2'b')), coercibility(lpad(_latin2'a',4,_latin2'b')); +collation(lpad(_latin2'a',4,_latin2'b')) coercibility(lpad(_latin2'a',4,_latin2'b')) +latin2_general_ci 3 +select collation(rpad(_latin2'a',4,_latin2'b')), coercibility(rpad(_latin2'a',4,_latin2'b')); +collation(rpad(_latin2'a',4,_latin2'b')) coercibility(rpad(_latin2'a',4,_latin2'b')) +latin2_general_ci 3 +select collation(concat_ws(_latin2'a',_latin2'b')), coercibility(concat_ws(_latin2'a',_latin2'b')); +collation(concat_ws(_latin2'a',_latin2'b')) coercibility(concat_ws(_latin2'a',_latin2'b')) +latin2_general_ci 3 +select collation(make_set(255,_latin2'a',_latin2'b',_latin2'c')), coercibility(make_set(255,_latin2'a',_latin2'b',_latin2'c')); +collation(make_set(255,_latin2'a',_latin2'b',_latin2'c')) coercibility(make_set(255,_latin2'a',_latin2'b',_latin2'c')) +latin2_general_ci 3 +select collation(export_set(255,_latin2'y',_latin2'n',_latin2' ')), coercibility(export_set(255,_latin2'y',_latin2'n',_latin2' ')); +collation(export_set(255,_latin2'y',_latin2'n',_latin2' ')) coercibility(export_set(255,_latin2'y',_latin2'n',_latin2' ')) +binary 3 +select collation(trim(_latin2' a ')), coercibility(trim(_latin2' a ')); +collation(trim(_latin2' a ')) coercibility(trim(_latin2' a ')) +latin2_general_ci 3 +select collation(ltrim(_latin2' a ')), coercibility(ltrim(_latin2' a ')); +collation(ltrim(_latin2' a ')) coercibility(ltrim(_latin2' a ')) +latin2_general_ci 3 +select collation(rtrim(_latin2' a ')), coercibility(rtrim(_latin2' a ')); +collation(rtrim(_latin2' a ')) coercibility(rtrim(_latin2' a ')) +latin2_general_ci 3 +select collation(trim(LEADING _latin2' ' FROM _latin2'a')), coercibility(trim(LEADING _latin2'a' FROM _latin2'a')); +collation(trim(LEADING _latin2' ' FROM _latin2'a')) coercibility(trim(LEADING _latin2'a' FROM _latin2'a')) +latin2_general_ci 3 +select collation(trim(TRAILING _latin2' ' FROM _latin2'a')), coercibility(trim(TRAILING _latin2'a' FROM _latin2'a')); +collation(trim(TRAILING _latin2' ' FROM _latin2'a')) coercibility(trim(TRAILING _latin2'a' FROM _latin2'a')) +latin2_general_ci 3 +select collation(trim(BOTH _latin2' ' FROM _latin2'a')), coercibility(trim(BOTH _latin2'a' FROM _latin2'a')); +collation(trim(BOTH _latin2' ' FROM _latin2'a')) coercibility(trim(BOTH _latin2'a' FROM _latin2'a')) +latin2_general_ci 3 +select collation(repeat(_latin2'a',10)), coercibility(repeat(_latin2'a',10)); +collation(repeat(_latin2'a',10)) coercibility(repeat(_latin2'a',10)) +latin2_general_ci 3 +select collation(reverse(_latin2'ab')), coercibility(reverse(_latin2'ab')); +collation(reverse(_latin2'ab')) coercibility(reverse(_latin2'ab')) +latin2_general_ci 3 +select collation(quote(_latin2'ab')), coercibility(quote(_latin2'ab')); +collation(quote(_latin2'ab')) coercibility(quote(_latin2'ab')) +latin2_general_ci 3 +select collation(soundex(_latin2'ab')), coercibility(soundex(_latin2'ab')); +collation(soundex(_latin2'ab')) coercibility(soundex(_latin2'ab')) +latin2_general_ci 3 +select collation(substring(_latin2'ab',1)), coercibility(substring(_latin2'ab',1)); +collation(substring(_latin2'ab',1)) coercibility(substring(_latin2'ab',1)) +latin2_general_ci 3 +select collation(insert(_latin2'abcd',2,3,_latin2'ef')), coercibility(insert(_latin2'abcd',2,3,_latin2'ef')); +collation(insert(_latin2'abcd',2,3,_latin2'ef')) coercibility(insert(_latin2'abcd',2,3,_latin2'ef')) +latin2_general_ci 3 +select collation(replace(_latin2'abcd',_latin2'b',_latin2'B')), coercibility(replace(_latin2'abcd',_latin2'b',_latin2'B')); +collation(replace(_latin2'abcd',_latin2'b',_latin2'B')) coercibility(replace(_latin2'abcd',_latin2'b',_latin2'B')) +latin2_general_ci 3 +create table t1 +select +bin(130), +oct(130), +conv(130,16,10), +hex(130), +char(130), +format(130,10), +left(_latin2'a',1), +right(_latin2'a',1), +lcase(_latin2'a'), +ucase(_latin2'a'), +substring(_latin2'a',1,1), +concat(_latin2'a',_latin2'b'), +lpad(_latin2'a',4,_latin2'b'), +rpad(_latin2'a',4,_latin2'b'), +concat_ws(_latin2'a',_latin2'b'), +make_set(255,_latin2'a',_latin2'b',_latin2'c'), +export_set(255,_latin2'y',_latin2'n',_latin2' '), +trim(_latin2' a '), +ltrim(_latin2' a '), +rtrim(_latin2' a '), +trim(LEADING _latin2' ' FROM _latin2' a '), +trim(TRAILING _latin2' ' FROM _latin2' a '), +trim(BOTH _latin2' ' FROM _latin2' a '), +repeat(_latin2'a',10), +reverse(_latin2'ab'), +quote(_latin2'ab'), +soundex(_latin2'ab'), +substring(_latin2'ab',1), +insert(_latin2'abcd',2,3,_latin2'ef'), +replace(_latin2'abcd',_latin2'b',_latin2'B') +; +Warnings: +Warning 1265 Data truncated for column 'format(130,10)' at row 1 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `bin(130)` char(64) NOT NULL default '', + `oct(130)` char(64) NOT NULL default '', + `conv(130,16,10)` char(64) NOT NULL default '', + `hex(130)` char(6) NOT NULL default '', + `char(130)` char(1) NOT NULL default '', + `format(130,10)` char(4) NOT NULL default '', + `left(_latin2'a',1)` char(1) character set latin2 NOT NULL default '', + `right(_latin2'a',1)` char(1) character set latin2 NOT NULL default '', + `lcase(_latin2'a')` char(1) character set latin2 NOT NULL default '', + `ucase(_latin2'a')` char(1) character set latin2 NOT NULL default '', + `substring(_latin2'a',1,1)` char(1) character set latin2 NOT NULL default '', + `concat(_latin2'a',_latin2'b')` char(2) character set latin2 NOT NULL default '', + `lpad(_latin2'a',4,_latin2'b')` char(4) character set latin2 NOT NULL default '', + `rpad(_latin2'a',4,_latin2'b')` char(4) character set latin2 NOT NULL default '', + `concat_ws(_latin2'a',_latin2'b')` char(1) character set latin2 NOT NULL default '', + `make_set(255,_latin2'a',_latin2'b',_latin2'c')` char(5) character set latin2 NOT NULL default '', + `export_set(255,_latin2'y',_latin2'n',_latin2' ')` char(127) character set latin2 NOT NULL default '', + `trim(_latin2' a ')` char(3) character set latin2 NOT NULL default '', + `ltrim(_latin2' a ')` char(3) character set latin2 NOT NULL default '', + `rtrim(_latin2' a ')` char(3) character set latin2 NOT NULL default '', + `trim(LEADING _latin2' ' FROM _latin2' a ')` char(3) character set latin2 NOT NULL default '', + `trim(TRAILING _latin2' ' FROM _latin2' a ')` char(3) character set latin2 NOT NULL default '', + `trim(BOTH _latin2' ' FROM _latin2' a ')` char(3) character set latin2 NOT NULL default '', + `repeat(_latin2'a',10)` char(10) character set latin2 NOT NULL default '', + `reverse(_latin2'ab')` char(2) character set latin2 NOT NULL default '', + `quote(_latin2'ab')` char(6) character set latin2 NOT NULL default '', + `soundex(_latin2'ab')` char(4) character set latin2 NOT NULL default '', + `substring(_latin2'ab',1)` char(2) character set latin2 NOT NULL default '', + `insert(_latin2'abcd',2,3,_latin2'ef')` char(6) character set latin2 NOT NULL default '', + `replace(_latin2'abcd',_latin2'b',_latin2'B')` char(4) character set latin2 NOT NULL default '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +select SUBSTR('abcdefg',3,2); +SUBSTR('abcdefg',3,2) +cd +select SUBSTRING('abcdefg',3,2); +SUBSTRING('abcdefg',3,2) +cd +select SUBSTR('abcdefg',-3,2) FROM DUAL; +SUBSTR('abcdefg',-3,2) +ef +select SUBSTR('abcdefg',-1,5) FROM DUAL; +SUBSTR('abcdefg',-1,5) +g +select SUBSTR('abcdefg',0,0) FROM DUAL; +SUBSTR('abcdefg',0,0) + +select SUBSTR('abcdefg',-1,-1) FROM DUAL; +SUBSTR('abcdefg',-1,-1) + +select SUBSTR('abcdefg',1,-1) FROM DUAL; +SUBSTR('abcdefg',1,-1) + +create table t7 (s1 char); +select * from t7 +where concat(s1 collate latin1_general_ci,s1 collate latin1_swedish_ci) = 'AA'; +ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT) and (latin1_swedish_ci,EXPLICIT) for operation 'concat' +drop table t7; +select substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2),substring_index("1abcd;2abcd;3abcd;4abcd", ';', -2); +substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2) substring_index("1abcd;2abcd;3abcd;4abcd", ';', -2) +1abcd;2abcd 3abcd;4abcd +explain extended select md5('hello'), sha('abc'), sha1('abc'), soundex(''), 'mood' sounds like 'mud', aes_decrypt(aes_encrypt('abc','1'),'1'),concat('*',space(5),'*'), reverse('abc'), rpad('a',4,'1'), lpad('a',4,'1'), concat_ws(',','',NULL,'a'),make_set(255,_latin2'a',_latin2'b',_latin2'c'),elt(2,1),locate("a","b",2),format(130,10),char(0),conv(130,16,10),hex(130),binary 'HE', export_set(255,_latin2'y',_latin2'n',_latin2' '),FIELD('b' COLLATE latin1_bin,'A','B'),FIND_IN_SET(_latin1'B',_latin1'a,b,c,d'),collation(conv(130,16,10)), coercibility(conv(130,16,10)),length('\n\t\r\b\0\_\%\\'),bit_length('\n\t\r\b\0\_\%\\'),bit_length('\n\t\r\b\0\_\%\\'),concat('monty',' was here ','again'),length('hello'),char(ascii('h')),ord('h'),quote(1/0),crc32("123"),replace('aaaa','a','b'),insert('txs',2,1,'hi'),left(_latin2'a',1),right(_latin2'a',1),lcase(_latin2'a'),ucase(_latin2'a'),SUBSTR('abcdefg',3,2),substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2),trim(_latin2' a '),ltrim(_latin2' a '),rtrim(_latin2' a '), decode(encode(repeat("a",100000),"monty"),"monty"); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select high_priority 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)`,(_latin1'HE' collate _latin1'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")` +SELECT lpad(12345, 5, "#"); +lpad(12345, 5, "#") +12345 diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 1c48f5f9048..95dc2ca3a2a 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1338,7 +1338,7 @@ CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP,INDEX stamp_idx insert into t1 values (1),(2),(3); insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ),(5,20020204230000); Warnings: -Warning 1264 Data truncated for column 'stamp' at row 3 +Warning 1265 Data truncated for column 'stamp' at row 3 SELECT col1 FROM t1 UNION SELECT col1 FROM t2 WHERE stamp < '20020204120000' GROUP BY col1; col1 diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index ff5111c552e..38e08d7fbc5 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -63,7 +63,7 @@ insert into t1 values(NULL); ERROR 23000: Column 'id' cannot be null insert into t1 values (1), (NULL), (2); Warnings: -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'id' at row 2 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'id' at row 2 select * from t1; id 1 diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index 93007a325ba..2e90f8b2d81 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -621,6 +621,9 @@ NULL 1 100 NULL 2 100 create table t2(No int not null, Field int not null, Count int not null); insert into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2; +Warnings: +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'No' at row 1 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'No' at row 2 select * from t2; No Field Count 0 1 100 diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result index d8e10fd20c7..dca7b580378 100644 --- a/mysql-test/r/key.result +++ b/mysql-test/r/key.result @@ -34,10 +34,10 @@ INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','N','N','N','N'); INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','N','N','N','N'); INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','','','',''); Warnings: -Warning 1264 Data truncated for column 'transityes' at row 1 -Warning 1264 Data truncated for column 'shopsyes' at row 1 -Warning 1264 Data truncated for column 'schoolsyes' at row 1 -Warning 1264 Data truncated for column 'petsyes' at row 1 +Warning 1265 Data truncated for column 'transityes' at row 1 +Warning 1265 Data truncated for column 'shopsyes' at row 1 +Warning 1265 Data truncated for column 'schoolsyes' at row 1 +Warning 1265 Data truncated for column 'petsyes' at row 1 INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','Y','Y','Y','Y'); INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','Y','Y','Y','Y'); INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','Y','Y','Y','Y'); @@ -156,8 +156,8 @@ CREATE TABLE t1 (c CHAR(10) NOT NULL,i INT NOT NULL AUTO_INCREMENT, UNIQUE (c,i)); INSERT INTO t1 (c) VALUES (NULL),(NULL); Warnings: -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'c' at row 1 -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'c' at row 2 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'c' at row 1 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'c' at row 2 SELECT * FROM t1; c i 1 diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 0547596dfbd..368055fed99 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -2,12 +2,12 @@ drop table if exists t1; create table t1 (a date, b date, c date not null, d date); load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; Warnings: -Warning 1264 Data truncated for column 'a' at row 1 -Warning 1264 Data truncated for column 'c' at row 1 -Warning 1264 Data truncated for column 'd' at row 1 -Warning 1264 Data truncated for column 'a' at row 2 -Warning 1264 Data truncated for column 'b' at row 2 -Warning 1264 Data truncated for column 'd' at row 2 +Warning 1265 Data truncated for column 'a' at row 1 +Warning 1265 Data truncated for column 'c' at row 1 +Warning 1265 Data truncated for column 'd' at row 1 +Warning 1265 Data truncated for column 'a' at row 2 +Warning 1265 Data truncated for column 'b' at row 2 +Warning 1265 Data truncated for column 'd' at row 2 load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES; SELECT * from t1; a b c d @@ -18,10 +18,10 @@ a b c d truncate table t1; load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d); Warnings: -Warning 1264 Data truncated for column 'c' at row 1 -Warning 1264 Data truncated for column 'd' at row 1 -Warning 1264 Data truncated for column 'b' at row 2 -Warning 1264 Data truncated for column 'd' at row 2 +Warning 1265 Data truncated for column 'c' at row 1 +Warning 1265 Data truncated for column 'd' at row 1 +Warning 1265 Data truncated for column 'b' at row 2 +Warning 1265 Data truncated for column 'd' at row 2 SELECT * from t1; a b c d NULL NULL 0000-00-00 0000-00-00 @@ -31,7 +31,7 @@ drop table t1; create table t1 (a text, b text); load data infile '../../std_data/loaddata2.dat' into table t1 fields terminated by ',' enclosed by ''''; Warnings: -Warning 1260 Row 3 doesn't contain data for all columns +Warning 1261 Row 3 doesn't contain data for all columns select concat('|',a,'|'), concat('|',b,'|') from t1; concat('|',a,'|') concat('|',b,'|') |Field A| |Field B| @@ -43,10 +43,10 @@ drop table t1; create table t1 (a int, b char(10)); load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; Warnings: -Warning 1264 Data truncated for column 'a' at row 3 -Warning 1261 Row 3 was truncated; It contained more data than there where input columns -Warning 1264 Data truncated for column 'a' at row 5 -Warning 1261 Row 5 was truncated; It contained more data than there where input columns +Warning 1265 Data truncated for column 'a' at row 3 +Warning 1262 Row 3 was truncated; It contained more data than there where input columns +Warning 1265 Data truncated for column 'a' at row 5 +Warning 1262 Row 5 was truncated; It contained more data than there where input columns select * from t1; a b 1 row 1 @@ -57,8 +57,8 @@ a b truncate table t1; load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; Warnings: -Warning 1264 Data truncated for column 'a' at row 4 -Warning 1260 Row 4 doesn't contain data for all columns +Warning 1265 Data truncated for column 'a' at row 4 +Warning 1261 Row 4 doesn't contain data for all columns select * from t1; a b 1 row 1 diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result index 2e95c25fd9c..429bc5ed352 100644 --- a/mysql-test/r/lock.result +++ b/mysql-test/r/lock.result @@ -42,7 +42,7 @@ check table t2; Table Op Msg_type Msg_text test.t2 check error Table 't2' was not locked with LOCK TABLES insert into t1 select nr from t1; -Table 't1' was not locked with LOCK TABLES +ERROR HY000: Table 't1' was not locked with LOCK TABLES unlock tables; lock tables t1 write, t1 as t1_alias read; insert into t1 select index1,nr from t1 as t1_alias; diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 4ab9a3dc8fe..278b9f41480 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -428,6 +428,22 @@ select * from t1 where a='807780' and b='477' and c='165'; a b c 807780 477 165 drop table t1; +create table t1 (a blob); +insert into t1 values('a '),('a'); +select concat(a,'.') from t1 where a='a'; +concat(a,'.') +a. +select concat(a,'.') from t1 where a='a '; +concat(a,'.') +a . +alter table t1 add key(a(2)); +select concat(a,'.') from t1 where a='a'; +concat(a,'.') +a. +select concat(a,'.') from t1 where a='a '; +concat(a,'.') +a . +drop table t1; create table t1 (a int not null auto_increment primary key, b text not null, unique b (b(20))); insert into t1 (b) values ('a'),('a '),('a '); select concat(b,'.') from t1; @@ -437,7 +453,7 @@ a . a . update t1 set b='b ' where a=2; update t1 set b='b ' where a > 1; -Duplicate entry 'b ' for key 2 +ERROR 23000: Duplicate entry 'b ' for key 2 delete from t1 where b='b'; select a,concat(b,'.') from t1; a concat(b,'.') diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index aa56bce6453..cbd949d6e72 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -91,45 +91,45 @@ drop table t1; CREATE TABLE t1 (a varchar(16) NOT NULL, b smallint(6) NOT NULL, c datetime NOT NULL, d smallint(6) NOT NULL); INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55"; Warnings: -Warning 1264 Data truncated for column 'd' at row 1 +Warning 1265 Data truncated for column 'd' at row 1 UPDATE t1 SET d=1/NULL; Warnings: -Warning 1264 Data truncated for column 'd' at row 1 +Warning 1265 Data truncated for column 'd' at row 1 UPDATE t1 SET d=NULL; Warnings: -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'd' at row 1 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'd' at row 1 INSERT INTO t1 (a) values (null); ERROR 23000: Column 'a' cannot be null INSERT INTO t1 (a) values (1/null); ERROR 23000: Column 'a' cannot be null INSERT INTO t1 (a) values (null),(null); Warnings: -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'a' at row 1 -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'a' at row 2 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 1 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 2 INSERT INTO t1 (b) values (null); ERROR 23000: Column 'b' cannot be null INSERT INTO t1 (b) values (1/null); ERROR 23000: Column 'b' cannot be null INSERT INTO t1 (b) values (null),(null); Warnings: -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'b' at row 1 -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'b' at row 2 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'b' at row 1 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'b' at row 2 INSERT INTO t1 (c) values (null); ERROR 23000: Column 'c' cannot be null INSERT INTO t1 (c) values (1/null); ERROR 23000: Column 'c' cannot be null INSERT INTO t1 (c) values (null),(null); Warnings: -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'c' at row 1 -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'c' at row 2 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'c' at row 1 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'c' at row 2 INSERT INTO t1 (d) values (null); ERROR 23000: Column 'd' cannot be null INSERT INTO t1 (d) values (1/null); ERROR 23000: Column 'd' cannot be null INSERT INTO t1 (d) values (null),(null); Warnings: -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'd' at row 1 -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'd' at row 2 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'd' at row 1 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'd' at row 2 select * from t1; a b c d 0 0000-00-00 00:00:00 0 diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result index 385108216bf..4dfd17991cc 100644 --- a/mysql-test/r/null_key.result +++ b/mysql-test/r/null_key.result @@ -337,7 +337,7 @@ index (id2) ); insert into t1 values(null,null),(1,1); Warnings: -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'id2' at row 1 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'id2' at row 1 select * from t1; id id2 NULL 0 diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index c1053087603..4033996b239 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -333,10 +333,10 @@ a b c 1 NULL NULL alter table t1 modify b int not null, modify c varchar(10) not null; Warnings: -Warning 1264 Data truncated for column 'b' at row 1 -Warning 1264 Data truncated for column 'c' at row 1 -Warning 1264 Data truncated for column 'b' at row 2 -Warning 1264 Data truncated for column 'c' at row 3 +Warning 1265 Data truncated for column 'b' at row 1 +Warning 1265 Data truncated for column 'c' at row 1 +Warning 1265 Data truncated for column 'b' at row 2 +Warning 1265 Data truncated for column 'c' at row 3 explain select * from t1 order by a, b, c; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index NULL a 18 NULL 11 Using index diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 04bcb56d48d..5bbf0bad445 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -593,7 +593,7 @@ select * from t1; a set GLOBAL query_cache_size=1024; Warnings: -Warning 1281 Query cache failed to set size 1024, new query cache size is 0 +Warning 1282 Query cache failed to set size 1024, new query cache size is 0 show global variables like "query_cache_size"; Variable_name Value query_cache_size 0 @@ -601,7 +601,7 @@ select * from t1; a set GLOBAL query_cache_size=10240; Warnings: -Warning 1281 Query cache failed to set size 10240, new query cache size is 0 +Warning 1282 Query cache failed to set size 10240, new query cache size is 0 show global variables like "query_cache_size"; Variable_name Value query_cache_size 0 @@ -609,7 +609,7 @@ select * from t1; a set GLOBAL query_cache_size=20480; Warnings: -Warning 1281 Query cache failed to set size 20480, new query cache size is 0 +Warning 1282 Query cache failed to set size 20480, new query cache size is 0 show global variables like "query_cache_size"; Variable_name Value query_cache_size 0 @@ -617,7 +617,7 @@ select * from t1; a set GLOBAL query_cache_size=40960; Warnings: -Warning 1281 Query cache failed to set size 40960, new query cache size is 0 +Warning 1282 Query cache failed to set size 40960, new query cache size is 0 show global variables like "query_cache_size"; Variable_name Value query_cache_size 0 diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index 6d924ff9f2e..ab66d786833 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -302,6 +302,7 @@ WHERE a b 15 1 47 1 +DROP TABLE t1; create table t1 (id int(10) primary key); insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9); select id from t1 where id in (2,5,9) ; diff --git a/mysql-test/r/rpl_multi_delete.result b/mysql-test/r/rpl_multi_delete.result index fa254d76393..e94a4e7947e 100644 --- a/mysql-test/r/rpl_multi_delete.result +++ b/mysql-test/r/rpl_multi_delete.result @@ -1,9 +1,9 @@ -slave stop; +stop slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -slave start; +start slave; create table t1 (a int); create table t2 (a int); insert into t1 values (1); diff --git a/mysql-test/r/rpl_until.result b/mysql-test/r/rpl_until.result index 82b1ed233ec..120c3d7a57f 100644 --- a/mysql-test/r/rpl_until.result +++ b/mysql-test/r/rpl_until.result @@ -69,4 +69,4 @@ ERROR HY000: Wrong parameter or combination of parameters for START SLAVE UNTIL start slave sql_thread; start slave until master_log_file='master-bin.000001', master_log_pos=561; Warnings: -Note 1253 Slave is already running +Note 1254 Slave is already running diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index b5ebc8d80db..f8a3251b6f9 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -6,7 +6,7 @@ explain extended select (select 2); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1248 Select 2 was reduced during optimisation +Note 1249 Select 2 was reduced during optimisation Note 1003 select high_priority 2 AS `(select 2)` SELECT (SELECT 1) UNION SELECT (SELECT 2); (SELECT 1) @@ -17,8 +17,8 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used 3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1248 Select 2 was reduced during optimisation -Note 1248 Select 4 was reduced during optimisation +Note 1249 Select 2 was reduced during optimisation +Note 1249 Select 4 was reduced during optimisation Note 1003 select high_priority 1 AS `(SELECT 1)` union select 2 AS `(SELECT 2)` SELECT (SELECT (SELECT 0 UNION SELECT 0)); (SELECT (SELECT 0 UNION SELECT 0)) @@ -29,7 +29,7 @@ id select_type table type possible_keys key key_len ref rows Extra 3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used 4 UNION NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1248 Select 2 was reduced during optimisation +Note 1249 Select 2 was reduced during optimisation Note 1003 select high_priority (select 0 AS `0` union select 0 AS `0`) AS `(SELECT (SELECT 0 UNION SELECT 0))` SELECT (SELECT 1 FROM (SELECT 1) as b HAVING a=1) as a; ERROR 42S22: Reference 'a' not supported (forward reference in item list) @@ -46,8 +46,8 @@ id select_type table type possible_keys key key_len ref rows Extra 3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used 2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1275 Field or reference 'a' of SELECT #3 was resolved in SELECT #1 -Note 1275 Field or reference 'b.a' of SELECT #3 was resolved in SELECT #1 +Note 1276 Field or reference 'a' of SELECT #3 was resolved in SELECT #1 +Note 1276 Field or reference 'b.a' of SELECT #3 was resolved in SELECT #1 Note 1003 select high_priority 1 AS `1` from (select 1 AS `a`) b having ((select b.a AS `a`) = 1) SELECT 1 FROM (SELECT 1 as a) as b HAVING (SELECT a)=1; 1 @@ -219,7 +219,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 3 Using where Warnings: -Note 1275 Field or reference 't4.a' of SELECT #3 was resolved in SELECT #1 +Note 1276 Field or reference 't4.a' of SELECT #3 was resolved in SELECT #1 Note 1003 select high_priority test.t4.b AS `b`,(select avg((test.t2.a + (select min(test.t3.a) AS `min(t3.a)` from test.t3 where (test.t3.a >= test.t4.a)))) AS `avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a))` from test.t2) AS `(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2)` from test.t4 select * from t3 where exists (select * from t2 where t2.b=t3.a); a @@ -307,8 +307,8 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 1 3 DEPENDENT UNION t5 ALL NULL NULL NULL NULL 2 Using where Warnings: -Note 1275 Field or reference 't2.a' of SELECT #2 was resolved in SELECT #1 -Note 1275 Field or reference 't2.a' of SELECT #3 was resolved in SELECT #1 +Note 1276 Field or reference 't2.a' of SELECT #2 was resolved in SELECT #1 +Note 1276 Field or reference 't2.a' of SELECT #3 was resolved in SELECT #1 Note 1003 select high_priority (select test.t1.a AS `a` from test.t1 where (test.t1.a = test.t2.a) union select test.t5.a AS `a` from test.t5 where (test.t5.a = test.t2.a)) AS `(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a)`,test.t2.a AS `a` from test.t2 select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2; ERROR 21000: Subquery returns more than 1 row @@ -326,7 +326,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t6 ALL NULL NULL NULL NULL 4 Using where 2 DEPENDENT SUBQUERY t7 eq_ref PRIMARY PRIMARY 4 test.t6.clinic_uq 1 Warnings: -Note 1275 Field or reference 'clinic_uq' of SELECT #2 was resolved in SELECT #1 +Note 1276 Field or reference 'clinic_uq' of SELECT #2 was resolved in SELECT #1 Note 1003 select high_priority test.t6.patient_uq AS `patient_uq`,test.t6.clinic_uq AS `clinic_uq` from test.t6 where exists(select test.t7.uq AS `uq`,test.t7.name AS `name` from test.t7 where (test.t7.uq = test.t6.clinic_uq) limit 1) select * from t1 where a= (select a from t2,t4 where t2.b=t4.b); ERROR 23000: Column: 'a' in field list is ambiguous @@ -707,7 +707,7 @@ EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ref id id 5 const 1 Using where; Using index Warnings: -Note 1248 Select 2 was reduced during optimisation +Note 1249 Select 2 was reduced during optimisation Note 1003 select high_priority test.t2.id AS `id` from test.t2 where (test.t2.id = 1) SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3); id @@ -719,8 +719,8 @@ EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ref id id 5 const 1 Using where; Using index Warnings: -Note 1248 Select 3 was reduced during optimisation -Note 1248 Select 2 was reduced during optimisation +Note 1249 Select 3 was reduced during optimisation +Note 1249 Select 2 was reduced during optimisation Note 1003 select high_priority test.t2.id AS `id` from test.t2 where (test.t2.id = (1 + 1)) EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3); id select_type table type possible_keys key key_len ref rows Extra @@ -852,8 +852,8 @@ explain extended select (select a+1) from t1; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Warnings: -Note 1275 Field or reference 'a' of SELECT #2 was resolved in SELECT #1 -Note 1248 Select 2 was reduced during optimisation +Note 1276 Field or reference 'a' of SELECT #2 was resolved in SELECT #1 +Note 1249 Select 2 was reduced during optimisation Note 1003 select high_priority (test.t1.a + 1) AS `(select a+1)` from test.t1 select (select a+1) from t1; (select a+1) @@ -1041,12 +1041,12 @@ UNIQUE KEY `maxnumrep` (`maxnumrep`) ) ENGINE=MyISAM CHARSET=latin1; INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test'); Warnings: -Warning 1264 Data truncated for column 'date' at row 1 -Warning 1264 Data truncated for column 'date' at row 2 +Warning 1265 Data truncated for column 'date' at row 1 +Warning 1265 Data truncated for column 'date' at row 2 INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test'); Warnings: -Warning 1264 Data truncated for column 'date' at row 1 -Warning 1264 Data truncated for column 'date' at row 2 +Warning 1265 Data truncated for column 'date' at row 1 +Warning 1265 Data truncated for column 'date' at row 2 INSERT INTO t3 VALUES (1,1); SELECT DISTINCT topic FROM t2 WHERE NOT EXISTS(SELECT * FROM t3 WHERE numeropost=topic); @@ -1238,7 +1238,7 @@ insert into t1 values (1,0), (2,0), (3,0); insert into t2 values (1,1), (2,1), (3,1), (2,2); update ignore t1 set b=(select b from t2 where t1.a=t2.a); Warnings: -Error 1241 Subquery returns more than 1 row +Error 1242 Subquery returns more than 1 row select * from t1; a b 1 1 diff --git a/mysql-test/r/subselect_innodb.result b/mysql-test/r/subselect_innodb.result index b2a055fa72c..9c1816e295c 100644 --- a/mysql-test/r/subselect_innodb.result +++ b/mysql-test/r/subselect_innodb.result @@ -62,7 +62,7 @@ processor_id (SELECT y.yod_id FROM t1 p2, t2 y WHERE p2.processor_id = p1.proces 1 1 2 2 3 3 -drop table t1,t2,t3; +drop table t2,t1,t3; CREATE TABLE t1 ( id int(11) NOT NULL default '0', b int(11) default NULL, diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index 8538263f7d6..330464fe669 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -9,9 +9,9 @@ d mediumtext YES NULL e longtext YES NULL CREATE TABLE t2 (a char(257), b varchar(70000) binary, c varchar(70000000)); Warnings: -Warning 1245 Converting column 'a' from CHAR to TEXT -Warning 1245 Converting column 'b' from CHAR to BLOB -Warning 1245 Converting column 'c' from CHAR to TEXT +Warning 1246 Converting column 'a' from CHAR to TEXT +Warning 1246 Converting column 'b' from CHAR to BLOB +Warning 1246 Converting column 'c' from CHAR to TEXT show columns from t2; Field Type Null Key Default Extra a text YES NULL diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index c1ee621697d..cc29c676283 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -2,11 +2,11 @@ drop table if exists t1; create table t1 (t datetime); insert into t1 values(101),(691231),(700101),(991231),(10000101),(99991231),(101000000),(691231000000),(700101000000),(991231235959),(10000101000000),(99991231235959),(20030102030460),(20030102036301),(20030102240401),(20030132030401),(20031302030460); Warnings: -Warning 1264 Data truncated for column 't' at row 13 -Warning 1264 Data truncated for column 't' at row 14 -Warning 1264 Data truncated for column 't' at row 15 -Warning 1264 Data truncated for column 't' at row 16 -Warning 1264 Data truncated for column 't' at row 17 +Warning 1265 Data truncated for column 't' at row 13 +Warning 1265 Data truncated for column 't' at row 14 +Warning 1265 Data truncated for column 't' at row 15 +Warning 1265 Data truncated for column 't' at row 16 +Warning 1265 Data truncated for column 't' at row 17 select * from t1; t 2000-01-01 00:00:00 diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result index fa4cd231129..dc78369f583 100644 --- a/mysql-test/r/type_decimal.result +++ b/mysql-test/r/type_decimal.result @@ -158,17 +158,17 @@ insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 1 -Warning 1263 Data truncated, out of range for column 'a' at row 2 -Warning 1263 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated, out of range for column 'a' at row 2 +Warning 1264 Data truncated, out of range for column 'a' at row 3 insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 1 -Warning 1264 Data truncated for column 'a' at row 2 -Warning 1263 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1265 Data truncated for column 'a' at row 2 +Warning 1264 Data truncated, out of range for column 'a' at row 3 insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); Warnings: -Warning 1264 Data truncated for column 'a' at row 3 +Warning 1265 Data truncated for column 'a' at row 3 select * from t1; a 0.00 @@ -201,32 +201,32 @@ drop table t1; create table t1 (a decimal(10,2) unsigned); insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 2 -Warning 1263 Data truncated, out of range for column 'a' at row 6 +Warning 1264 Data truncated, out of range for column 'a' at row 2 +Warning 1264 Data truncated, out of range for column 'a' at row 6 insert into t1 values ("-.1"),("+.1"),(".1"); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated, out of range for column 'a' at row 1 insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated, out of range for column 'a' at row 3 insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 1 -Warning 1263 Data truncated, out of range for column 'a' at row 2 -Warning 1263 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated, out of range for column 'a' at row 2 +Warning 1264 Data truncated, out of range for column 'a' at row 3 insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 1 -Warning 1263 Data truncated, out of range for column 'a' at row 2 -Warning 1263 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated, out of range for column 'a' at row 2 +Warning 1264 Data truncated, out of range for column 'a' at row 3 insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 1 -Warning 1264 Data truncated for column 'a' at row 2 -Warning 1263 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1265 Data truncated for column 'a' at row 2 +Warning 1264 Data truncated, out of range for column 'a' at row 3 insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); Warnings: -Warning 1264 Data truncated for column 'a' at row 3 +Warning 1265 Data truncated for column 'a' at row 3 select * from t1; a 0.00 @@ -259,32 +259,32 @@ drop table t1; create table t1 (a decimal(10,2) zerofill); insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 2 -Warning 1263 Data truncated, out of range for column 'a' at row 6 +Warning 1264 Data truncated, out of range for column 'a' at row 2 +Warning 1264 Data truncated, out of range for column 'a' at row 6 insert into t1 values ("-.1"),("+.1"),(".1"); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated, out of range for column 'a' at row 1 insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated, out of range for column 'a' at row 3 insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 1 -Warning 1263 Data truncated, out of range for column 'a' at row 2 -Warning 1263 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated, out of range for column 'a' at row 2 +Warning 1264 Data truncated, out of range for column 'a' at row 3 insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 1 -Warning 1263 Data truncated, out of range for column 'a' at row 2 -Warning 1263 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated, out of range for column 'a' at row 2 +Warning 1264 Data truncated, out of range for column 'a' at row 3 insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 1 -Warning 1264 Data truncated for column 'a' at row 2 -Warning 1263 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1265 Data truncated for column 'a' at row 2 +Warning 1264 Data truncated, out of range for column 'a' at row 3 insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); Warnings: -Warning 1264 Data truncated for column 'a' at row 3 +Warning 1265 Data truncated for column 'a' at row 3 select * from t1; a 00000000.00 @@ -321,13 +321,13 @@ insert into t1 values (00000000000001),(+0000000000001),(-0000000000001); insert into t1 values (+111111111.11),(111111111.11),(-11111111.11); insert into t1 values (-111111111.11),(+1111111111.11),(1111111111.11); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 1 -Warning 1263 Data truncated, out of range for column 'a' at row 2 -Warning 1263 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated, out of range for column 'a' at row 2 +Warning 1264 Data truncated, out of range for column 'a' at row 3 insert into t1 values (1e+100),(1e-100),(-1e+100); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 1 -Warning 1263 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated, out of range for column 'a' at row 3 insert into t1 values (123.4e0),(123.4e+2),(123.4e-2),(123e1),(123e+0); select * from t1; a @@ -361,8 +361,8 @@ drop table t1; create table t1 (a decimal); insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+12345678901'),(99999999999999); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 1 -Warning 1263 Data truncated, out of range for column 'a' at row 7 +Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated, out of range for column 'a' at row 7 select * from t1; a -9999999999 @@ -376,9 +376,9 @@ drop table t1; create table t1 (a decimal unsigned); insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 1 -Warning 1263 Data truncated, out of range for column 'a' at row 2 -Warning 1263 Data truncated, out of range for column 'a' at row 7 +Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated, out of range for column 'a' at row 2 +Warning 1264 Data truncated, out of range for column 'a' at row 7 select * from t1; a 0 @@ -392,9 +392,9 @@ drop table t1; create table t1 (a decimal zerofill); insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 1 -Warning 1263 Data truncated, out of range for column 'a' at row 2 -Warning 1263 Data truncated, out of range for column 'a' at row 7 +Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated, out of range for column 'a' at row 2 +Warning 1264 Data truncated, out of range for column 'a' at row 7 select * from t1; a 0000000000 @@ -408,9 +408,9 @@ drop table t1; create table t1 (a decimal unsigned zerofill); insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); Warnings: -Warning 1263 Data truncated, out of range for column 'a' at row 1 -Warning 1263 Data truncated, out of range for column 'a' at row 2 -Warning 1263 Data truncated, out of range for column 'a' at row 7 +Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated, out of range for column 'a' at row 2 +Warning 1264 Data truncated, out of range for column 'a' at row 7 select * from t1; a 0000000000 @@ -424,16 +424,16 @@ drop table t1; create table t1(a decimal(10,0)); insert into t1 values ("1e4294967295"); Warnings: -Warning 1264 Data truncated for column 'a' at row 1 -Warning 1263 Data truncated, out of range for column 'a' at row 1 +Warning 1265 Data truncated for column 'a' at row 1 +Warning 1264 Data truncated, out of range for column 'a' at row 1 select * from t1; a 99999999999 delete from t1; insert into t1 values("1e4294967297"); Warnings: -Warning 1264 Data truncated for column 'a' at row 1 -Warning 1263 Data truncated, out of range for column 'a' at row 1 +Warning 1265 Data truncated for column 'a' at row 1 +Warning 1264 Data truncated, out of range for column 'a' at row 1 select * from t1; a 99999999999 diff --git a/mysql-test/r/type_enum.result b/mysql-test/r/type_enum.result index fe8f78453b7..976c484dabf 100644 --- a/mysql-test/r/type_enum.result +++ b/mysql-test/r/type_enum.result @@ -1639,13 +1639,13 @@ drop table t1; create table t1 (a enum ('0','1')); insert into t1 set a='foobar'; Warnings: -Warning 1264 Data truncated for column 'a' at row 1 +Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a update t1 set a = replace(a,'x','y'); Warnings: -Warning 1264 Data truncated for column 'a' at row 1 +Warning 1265 Data truncated for column 'a' at row 1 select * from t1; a diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index 2a461942853..a0c0e0f5503 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -15,8 +15,8 @@ f1 float NULL YES NULL select,insert,update,references f2 double NULL YES NULL select,insert,update,references insert into t1 values(10,10),(1e+5,1e+5),(1234567890,1234567890),(1e+10,1e+10),(1e+15,1e+15),(1e+20,1e+20),(1e+50,1e+50),(1e+150,1e+150); Warnings: -Warning 1263 Data truncated, out of range for column 'f1' at row 7 -Warning 1263 Data truncated, out of range for column 'f1' at row 8 +Warning 1264 Data truncated, out of range for column 'f1' at row 7 +Warning 1264 Data truncated, out of range for column 'f1' at row 8 insert into t1 values(-10,-10),(1e-5,1e-5),(1e-10,1e-10),(1e-15,1e-15),(1e-20,1e-20),(1e-50,1e-50),(1e-150,1e-150); select * from t1; f1 f2 diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result index 512df8fbaa9..4a3206005dd 100644 --- a/mysql-test/r/type_ranges.result +++ b/mysql-test/r/type_ranges.result @@ -89,34 +89,34 @@ insert into t1 values (NULL,2,2,2,2,2,2,2,2,2,2,2,2,2,NULL,NULL,NULL,NULL,NULL,N insert into t1 values (0,1/3,3,3,3,3,3,3,3,3,3,3,3,3,NULL,'19970303','10:10:10','19970303101010','','','','3',3,3); insert into t1 values (0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,NULL,19970807,080706,19970403090807,-1,-1,-1,'-1',-1,-1); Warnings: -Warning 1263 Data truncated, out of range for column 'utiny' at row 1 -Warning 1263 Data truncated, out of range for column 'ushort' at row 1 -Warning 1263 Data truncated, out of range for column 'umedium' at row 1 -Warning 1263 Data truncated, out of range for column 'ulong' at row 1 -Warning 1264 Data truncated for column 'options' at row 1 -Warning 1264 Data truncated for column 'flags' at row 1 +Warning 1264 Data truncated, out of range for column 'utiny' at row 1 +Warning 1264 Data truncated, out of range for column 'ushort' at row 1 +Warning 1264 Data truncated, out of range for column 'umedium' at row 1 +Warning 1264 Data truncated, out of range for column 'ulong' at row 1 +Warning 1265 Data truncated for column 'options' at row 1 +Warning 1265 Data truncated for column 'flags' at row 1 insert into t1 values (0,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,NULL,0,0,0,-4294967295,-4294967295,-4294967295,'-4294967295',0,"one,two,tree"); Warnings: -Warning 1264 Data truncated for column 'string' at row 1 -Warning 1263 Data truncated, out of range for column 'tiny' at row 1 -Warning 1263 Data truncated, out of range for column 'short' at row 1 -Warning 1263 Data truncated, out of range for column 'medium' at row 1 -Warning 1263 Data truncated, out of range for column 'long_int' at row 1 -Warning 1263 Data truncated, out of range for column 'utiny' at row 1 -Warning 1263 Data truncated, out of range for column 'ushort' at row 1 -Warning 1263 Data truncated, out of range for column 'umedium' at row 1 -Warning 1263 Data truncated, out of range for column 'ulong' at row 1 -Warning 1264 Data truncated for column 'options' at row 1 +Warning 1265 Data truncated for column 'string' at row 1 +Warning 1264 Data truncated, out of range for column 'tiny' at row 1 +Warning 1264 Data truncated, out of range for column 'short' at row 1 +Warning 1264 Data truncated, out of range for column 'medium' at row 1 +Warning 1264 Data truncated, out of range for column 'long_int' at row 1 +Warning 1264 Data truncated, out of range for column 'utiny' at row 1 +Warning 1264 Data truncated, out of range for column 'ushort' at row 1 +Warning 1264 Data truncated, out of range for column 'umedium' at row 1 +Warning 1264 Data truncated, out of range for column 'ulong' at row 1 +Warning 1265 Data truncated for column 'options' at row 1 insert into t1 values (0,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,NULL,0,0,0,4294967295,4294967295,4294967295,'4294967295',0,0); Warnings: -Warning 1263 Data truncated, out of range for column 'tiny' at row 1 -Warning 1263 Data truncated, out of range for column 'short' at row 1 -Warning 1263 Data truncated, out of range for column 'medium' at row 1 -Warning 1263 Data truncated, out of range for column 'long_int' at row 1 -Warning 1263 Data truncated, out of range for column 'utiny' at row 1 -Warning 1263 Data truncated, out of range for column 'ushort' at row 1 -Warning 1263 Data truncated, out of range for column 'umedium' at row 1 -Warning 1264 Data truncated for column 'options' at row 1 +Warning 1264 Data truncated, out of range for column 'tiny' at row 1 +Warning 1264 Data truncated, out of range for column 'short' at row 1 +Warning 1264 Data truncated, out of range for column 'medium' at row 1 +Warning 1264 Data truncated, out of range for column 'long_int' at row 1 +Warning 1264 Data truncated, out of range for column 'utiny' at row 1 +Warning 1264 Data truncated, out of range for column 'ushort' at row 1 +Warning 1264 Data truncated, out of range for column 'umedium' at row 1 +Warning 1265 Data truncated for column 'options' at row 1 insert into t1 (tiny) values (1); select auto,string,tiny,short,medium,long_int,longlong,real_float,real_double,utiny,ushort,umedium,ulong,ulonglong,mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000),date_field,time_field,date_time,blob_col,tinyblob_col,mediumblob_col,longblob_col from t1; auto string tiny short medium long_int longlong real_float real_double utiny ushort umedium ulong ulonglong mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000) date_field time_field date_time blob_col tinyblob_col mediumblob_col longblob_col @@ -165,12 +165,12 @@ PRIMARY KEY (auto) ); INSERT INTO t2 (string,mediumblob_col,new_field) SELECT string,mediumblob_col,new_field from t1 where auto > 10; Warnings: -Warning 1264 Data truncated for column 'new_field' at row 2 -Warning 1264 Data truncated for column 'new_field' at row 3 -Warning 1264 Data truncated for column 'new_field' at row 4 -Warning 1264 Data truncated for column 'new_field' at row 5 -Warning 1264 Data truncated for column 'new_field' at row 6 -Warning 1264 Data truncated for column 'new_field' at row 7 +Warning 1265 Data truncated for column 'new_field' at row 2 +Warning 1265 Data truncated for column 'new_field' at row 3 +Warning 1265 Data truncated for column 'new_field' at row 4 +Warning 1265 Data truncated for column 'new_field' at row 5 +Warning 1265 Data truncated for column 'new_field' at row 6 +Warning 1265 Data truncated for column 'new_field' at row 7 select * from t2; auto string mediumblob_col new_field 1 2 2 ne @@ -202,9 +202,9 @@ one one drop table t2; create table t2 select * from t1; Warnings: -Warning 1264 Data truncated for column 'options' at row 4 -Warning 1264 Data truncated for column 'options' at row 5 -Warning 1264 Data truncated for column 'options' at row 6 +Warning 1265 Data truncated for column 'options' at row 4 +Warning 1265 Data truncated for column 'options' at row 5 +Warning 1265 Data truncated for column 'options' at row 6 update t2 set string="changed" where auto=16; show full columns from t1; Field Type Collation Null Key Default Extra Privileges Comment diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result index 5666e865518..0830179902d 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -25,9 +25,9 @@ t 36:30:31 insert into t1 values("10.22.22"),(1234567),(123456789),(123456789.10),("10 22:22"),("12.45a"); Warnings: -Warning 1263 Data truncated, out of range for column 't' at row 2 -Warning 1263 Data truncated, out of range for column 't' at row 3 -Warning 1263 Data truncated, out of range for column 't' at row 4 +Warning 1264 Data truncated, out of range for column 't' at row 2 +Warning 1264 Data truncated, out of range for column 't' at row 3 +Warning 1264 Data truncated, out of range for column 't' at row 4 select * from t1; t 10:22:33 diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index f704add4ebc..72640a4a802 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -45,11 +45,11 @@ drop table t1; create table t1 (ix timestamp); insert into t1 values (19991101000000),(19990102030405),(19990630232922),(19990601000000),(19990930232922),(19990531232922),(19990501000000),(19991101000000),(19990501000000),(20030101010160),(20030101016001),(20030101240101),(20030132010101),(20031301010101); Warnings: -Warning 1264 Data truncated for column 'ix' at row 10 -Warning 1264 Data truncated for column 'ix' at row 11 -Warning 1264 Data truncated for column 'ix' at row 12 -Warning 1264 Data truncated for column 'ix' at row 13 -Warning 1264 Data truncated for column 'ix' at row 14 +Warning 1265 Data truncated for column 'ix' at row 10 +Warning 1265 Data truncated for column 'ix' at row 11 +Warning 1265 Data truncated for column 'ix' at row 12 +Warning 1265 Data truncated for column 'ix' at row 13 +Warning 1265 Data truncated for column 'ix' at row 14 select ix+0 from t1; ix+0 19991101000000 @@ -138,31 +138,31 @@ t1 t2 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `t1` timestamp(14) NOT NULL, - `t2` timestamp(14) NOT NULL default '2003-01-01 00:00:00' -) TYPE=MyISAM + `t1` timestamp NOT NULL, + `t2` timestamp NOT NULL default '2003-01-01 00:00:00' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 show columns from t1; Field Type Null Key Default Extra -t1 timestamp(14) YES NULL -t2 timestamp(14) YES 2003-01-01 00:00:00 +t1 timestamp YES NULL +t2 timestamp YES 2003-01-01 00:00:00 show columns from t1 like 't2'; Field Type Null Key Default Extra -t2 timestamp(14) YES 2003-01-01 00:00:00 +t2 timestamp YES 2003-01-01 00:00:00 create table t2 (select * from t1); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `t1` timestamp(14) NOT NULL, - `t2` timestamp(14) NOT NULL default '2003-01-01 00:00:00' -) TYPE=MyISAM + `t1` timestamp NOT NULL, + `t2` timestamp NOT NULL default '2003-01-01 00:00:00' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 add column t0 timestamp first; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `t0` timestamp(14) NOT NULL, - `t1` timestamp(14) NOT NULL default '2003-01-01 00:00:00', - `t2` timestamp(14) NOT NULL default '2003-01-01 00:00:00' -) TYPE=MyISAM + `t0` timestamp NOT NULL, + `t1` timestamp NOT NULL default '2003-01-01 00:00:00', + `t2` timestamp NOT NULL default '2003-01-01 00:00:00' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1,t2; create table t1 (ts1 timestamp, ts2 timestamp); set TIMESTAMP=1000000000; diff --git a/mysql-test/r/type_uint.result b/mysql-test/r/type_uint.result index d948ca47972..f312e9b7f64 100644 --- a/mysql-test/r/type_uint.result +++ b/mysql-test/r/type_uint.result @@ -4,7 +4,7 @@ create table t1 (this int unsigned); insert into t1 values (1); insert into t1 values (-1); Warnings: -Warning 1263 Data truncated, out of range for column 'this' at row 1 +Warning 1264 Data truncated, out of range for column 'this' at row 1 select * from t1; this 1 diff --git a/mysql-test/r/type_year.result b/mysql-test/r/type_year.result index 5ef3c1bba81..84b688429db 100644 --- a/mysql-test/r/type_year.result +++ b/mysql-test/r/type_year.result @@ -28,6 +28,8 @@ y y2 drop table t1; create table t1 (y year); insert into t1 values (now()); +Warnings: +Warning 1265 Data truncated for column 'y' at row 1 select if(y = now(), 1, 0) from t1; if(y = now(), 1, 0) 1 diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 801b9ccf80f..5355e7ffadc 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -236,7 +236,7 @@ ERROR HY000: Unknown collation: 'UNKNOWN_COLLATION' set global autocommit=1; ERROR HY000: Variable 'autocommit' is a LOCAL variable and can't be used with SET GLOBAL select @@global.timestamp; -ERROR HY000: Variable 'timestamp' is a LOCAL variable and can't be used with SET GLOBAL +ERROR HY000: Variable 'timestamp' is a LOCAL variable set @@version=''; ERROR HY000: Unknown system variable 'version' set @@concurrent_insert=1; @@ -244,7 +244,7 @@ ERROR HY000: Variable 'concurrent_insert' is a GLOBAL variable and should be set set @@global.sql_auto_is_null=1; ERROR HY000: Variable 'sql_auto_is_null' is a LOCAL variable and can't be used with SET GLOBAL select @@global.sql_auto_is_null; -ERROR HY000: Variable 'sql_auto_is_null' is a LOCAL variable and can't be used with SET GLOBAL +ERROR HY000: Variable 'sql_auto_is_null' is a LOCAL variable set myisam_max_sort_file_size=100; ERROR HY000: Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL set myisam_max_extra_sort_file_size=100; @@ -381,7 +381,7 @@ select 1; 1 1 select @@session.key_buffer_size; -Variable 'key_buffer_size' is a GLOBAL variable +ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable select @@global.max_user_connections,@@local.max_join_size; @@global.max_user_connections @@session.max_join_size 100 200 diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index b675d189d30..bff950584a1 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -4,19 +4,19 @@ create table t1 (a int); insert into t1 values (1); insert into t1 values ("hej"); Warnings: -Warning 1264 Data truncated for column 'a' at row 1 +Warning 1265 Data truncated for column 'a' at row 1 insert into t1 values ("hej"),("då"); Warnings: -Warning 1264 Data truncated for column 'a' at row 1 -Warning 1264 Data truncated for column 'a' at row 2 +Warning 1265 Data truncated for column 'a' at row 1 +Warning 1265 Data truncated for column 'a' at row 2 set SQL_WARNINGS=1; insert into t1 values ("hej"); Warnings: -Warning 1264 Data truncated for column 'a' at row 1 +Warning 1265 Data truncated for column 'a' at row 1 insert into t1 values ("hej"),("då"); Warnings: -Warning 1264 Data truncated for column 'a' at row 1 -Warning 1264 Data truncated for column 'a' at row 2 +Warning 1265 Data truncated for column 'a' at row 1 +Warning 1265 Data truncated for column 'a' at row 2 drop table t1; set SQL_WARNINGS=0; drop temporary table if exists not_exists; @@ -43,13 +43,13 @@ drop table t1; create table t1(a tinyint, b int not null, c date, d char(5)); load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ','; Warnings: -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'b' at row 2 -Warning 1264 Data truncated for column 'd' at row 3 -Warning 1264 Data truncated for column 'c' at row 4 -Warning 1260 Row 5 doesn't contain data for all columns -Warning 1264 Data truncated for column 'b' at row 6 -Warning 1261 Row 7 was truncated; It contained more data than there where input columns -Warning 1263 Data truncated, out of range for column 'a' at row 8 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'b' at row 2 +Warning 1265 Data truncated for column 'd' at row 3 +Warning 1265 Data truncated for column 'c' at row 4 +Warning 1261 Row 5 doesn't contain data for all columns +Warning 1265 Data truncated for column 'b' at row 6 +Warning 1262 Row 7 was truncated; It contained more data than there where input columns +Warning 1264 Data truncated, out of range for column 'a' at row 8 select @@warning_count; @@warning_count 7 @@ -57,44 +57,44 @@ drop table t1; create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5)); insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test'); Warnings: -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'a' at row 1 -Warning 1263 Data truncated, out of range for column 'b' at row 2 -Warning 1264 Data truncated for column 'c' at row 2 -Warning 1263 Data truncated, out of range for column 'a' at row 3 -Warning 1263 Data truncated, out of range for column 'b' at row 3 -Warning 1264 Data truncated for column 'c' at row 3 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 1 +Warning 1264 Data truncated, out of range for column 'b' at row 2 +Warning 1265 Data truncated for column 'c' at row 2 +Warning 1264 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated, out of range for column 'b' at row 3 +Warning 1265 Data truncated for column 'c' at row 3 alter table t1 modify c char(4); Warnings: -Warning 1264 Data truncated for column 'c' at row 1 -Warning 1264 Data truncated for column 'c' at row 2 +Warning 1265 Data truncated for column 'c' at row 1 +Warning 1265 Data truncated for column 'c' at row 2 alter table t1 add d char(2); update t1 set a=NULL where a=10; Warnings: -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'a' at row 2 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 2 update t1 set c='mysql ab' where c='test'; Warnings: -Warning 1264 Data truncated for column 'c' at row 4 +Warning 1265 Data truncated for column 'c' at row 4 update t1 set d=c; Warnings: -Warning 1264 Data truncated for column 'd' at row 1 -Warning 1264 Data truncated for column 'd' at row 2 -Warning 1264 Data truncated for column 'd' at row 3 -Warning 1264 Data truncated for column 'd' at row 4 +Warning 1265 Data truncated for column 'd' at row 1 +Warning 1265 Data truncated for column 'd' at row 2 +Warning 1265 Data truncated for column 'd' at row 3 +Warning 1265 Data truncated for column 'd' at row 4 create table t2(a tinyint NOT NULL, b char(3)); insert into t2 select b,c from t1; Warnings: -Warning 1264 Data truncated for column 'b' at row 1 -Warning 1264 Data truncated for column 'b' at row 2 -Warning 1264 Data truncated for column 'b' at row 3 -Warning 1262 Data truncated, NULL supplied to NOT NULL column 'a' at row 4 -Warning 1264 Data truncated for column 'b' at row 4 +Warning 1265 Data truncated for column 'b' at row 1 +Warning 1265 Data truncated for column 'b' at row 2 +Warning 1265 Data truncated for column 'b' at row 3 +Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 4 +Warning 1265 Data truncated for column 'b' at row 4 insert into t2(b) values('mysqlab'); Warnings: -Warning 1264 Data truncated for column 'b' at row 1 +Warning 1265 Data truncated for column 'b' at row 1 set sql_warnings=1; insert into t2(b) values('mysqlab'); Warnings: -Warning 1264 Data truncated for column 'b' at row 1 +Warning 1265 Data truncated for column 'b' at row 1 set sql_warnings=0; drop table t1, t2; create table t1(a char(10)); @@ -102,34 +102,34 @@ alter table t1 add b char; set max_error_count=10; update t1 set b=a; Warnings: -Warning 1264 Data truncated for column 'b' at row 1 -Warning 1264 Data truncated for column 'b' at row 2 -Warning 1264 Data truncated for column 'b' at row 3 -Warning 1264 Data truncated for column 'b' at row 4 -Warning 1264 Data truncated for column 'b' at row 5 -Warning 1264 Data truncated for column 'b' at row 6 -Warning 1264 Data truncated for column 'b' at row 7 -Warning 1264 Data truncated for column 'b' at row 8 -Warning 1264 Data truncated for column 'b' at row 9 -Warning 1264 Data truncated for column 'b' at row 10 +Warning 1265 Data truncated for column 'b' at row 1 +Warning 1265 Data truncated for column 'b' at row 2 +Warning 1265 Data truncated for column 'b' at row 3 +Warning 1265 Data truncated for column 'b' at row 4 +Warning 1265 Data truncated for column 'b' at row 5 +Warning 1265 Data truncated for column 'b' at row 6 +Warning 1265 Data truncated for column 'b' at row 7 +Warning 1265 Data truncated for column 'b' at row 8 +Warning 1265 Data truncated for column 'b' at row 9 +Warning 1265 Data truncated for column 'b' at row 10 select @@warning_count; @@warning_count 50 drop table t1; create table t1 (id int) engine=isam; Warnings: -Warning 1265 Using storage engine MyISAM for table 't1' +Warning 1266 Using storage engine MyISAM for table 't1' alter table t1 engine=isam; Warnings: -Warning 1265 Using storage engine MyISAM for table 't1' +Warning 1266 Using storage engine MyISAM for table 't1' drop table t1; create table t1 (id int) type=heap; Warnings: -Warning 1286 'TYPE=storage_engine' is deprecated. Use 'ENGINE=storage_engine' instead. +Warning 1287 'TYPE=storage_engine' is deprecated. Use 'ENGINE=storage_engine' instead. alter table t1 type=myisam; Warnings: -Warning 1286 'TYPE=storage_engine' is deprecated. Use 'ENGINE=storage_engine' instead. +Warning 1287 'TYPE=storage_engine' is deprecated. Use 'ENGINE=storage_engine' instead. drop table t1; set table_type=MYISAM; Warnings: -Warning 1286 'table_type' is deprecated. Use 'storage_engine' instead. +Warning 1287 'table_type' is deprecated. Use 'storage_engine' instead. diff --git a/mysql-test/t/case.test b/mysql-test/t/case.test index 9377c6c4aef..87e456baba7 100644 --- a/mysql-test/t/case.test +++ b/mysql-test/t/case.test @@ -63,14 +63,14 @@ CREATE TABLE t1 SELECT SHOW CREATE TABLE t1; DROP TABLE t1; ---error 1266 +--error 1267 SELECT CASE WHEN 1 THEN _latin1'a' COLLATE latin1_danish_ci ELSE _latin1'a' COLLATE latin1_swedish_ci END; ---error 1269 +--error 1270 SELECT CASE _latin1'a' COLLATE latin1_general_ci WHEN _latin1'a' COLLATE latin1_danish_ci THEN 1 WHEN _latin1'a' COLLATE latin1_swedish_ci THEN 2 @@ -93,9 +93,9 @@ CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_bin THEN '1' ELSE 2 END # # Check COALESCE argument types aggregation ---error 1266 +--error 1267 CREATE TABLE t1 SELECT COALESCE(_latin1'a',_latin2'a'); ---error 1266 +--error 1267 CREATE TABLE t1 SELECT COALESCE('a' COLLATE latin1_swedish_ci,'b' COLLATE latin1_bin); CREATE TABLE t1 SELECT COALESCE(1), COALESCE(1.0),COALESCE('a'), diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 64134fe9990..70fa4173c76 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -74,7 +74,7 @@ create table `` (a int); drop table if exists ``; --error 1166 create table t1 (`` int); ---error 1279 +--error 1280 create table t1 (i int, index `` (i)); # @@ -157,7 +157,7 @@ SELECT @@storage_engine; CREATE TABLE t1 (a int not null); show create table t1; drop table t1; ---error 1285 +--error 1286 SET SESSION storage_engine="gemini"; SELECT @@storage_engine; CREATE TABLE t1 (a int not null); @@ -277,7 +277,7 @@ SELECT @@storage_engine; CREATE TABLE t1 (a int not null); show create table t1; drop table t1; ---error 1285 +--error 1286 SET SESSION storage_engine="gemini"; SELECT @@storage_engine; CREATE TABLE t1 (a int not null); diff --git a/mysql-test/t/ctype_collate.test b/mysql-test/t/ctype_collate.test index 5916e3da241..3599beeacc4 100644 --- a/mysql-test/t/ctype_collate.test +++ b/mysql-test/t/ctype_collate.test @@ -7,12 +7,12 @@ CREATE TABLE t1 ( latin1_f CHAR(32) CHARACTER SET latin1 NOT NULL ); ---error 1252 +--error 1253 CREATE TABLE t2 ( latin1_f CHAR(32) CHARACTER SET latin1 COLLATE koi8r_general_ci NOT NULL ); ---error 1272 +--error 1273 CREATE TABLE t2 ( latin1_f CHAR(32) CHARACTER SET latin1 COLLATE some_non_existing_col NOT NULL ); @@ -66,7 +66,7 @@ SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE latin1_swedish_ci; SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE latin1_german2_ci; SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE latin1_general_ci; SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE latin1_bin; ---error 1252 +--error 1253 SELECT latin1_f FROM t1 ORDER BY latin1_f COLLATE koi8r_general_ci; --SELECT latin1_f COLLATE koi8r FROM t1 ; @@ -76,7 +76,7 @@ SELECT latin1_f COLLATE latin1_swedish_ci AS latin1_f_as FROM t1 ORDER BY latin1 SELECT latin1_f COLLATE latin1_german2_ci AS latin1_f_as FROM t1 ORDER BY latin1_f_as; SELECT latin1_f COLLATE latin1_general_ci AS latin1_f_as FROM t1 ORDER BY latin1_f_as; SELECT latin1_f COLLATE latin1_bin AS latin1_f_as FROM t1 ORDER BY latin1_f_as; ---error 1252 +--error 1253 SELECT latin1_f COLLATE koi8r_general_ci AS latin1_f_as FROM t1 ORDER BY latin1_f_as; @@ -87,7 +87,7 @@ SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE latin1_swedish_ci; SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE latin1_german2_ci; SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE latin1_general_ci; SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE latin1_bin; ---error 1252 +--error 1253 SELECT latin1_f,count(*) FROM t1 GROUP BY latin1_f COLLATE koi8r_general_ci; @@ -98,7 +98,7 @@ SELECT DISTINCT latin1_f COLLATE latin1_swedish_ci FROM t1; SELECT DISTINCT latin1_f COLLATE latin1_german2_ci FROM t1; SELECT DISTINCT latin1_f COLLATE latin1_general_ci FROM t1; SELECT DISTINCT latin1_f COLLATE latin1_bin FROM t1; ---error 1272 +--error 1273 SELECT DISTINCT latin1_f COLLATE koi8r FROM t1; @@ -153,7 +153,7 @@ DROP TABLE t1; CREATE TABLE t1 (s1 CHAR(5) COLLATE latin1_german1_ci, s2 CHAR(5) COLLATE latin1_swedish_ci); ---error 1266 +--error 1267 SELECT * FROM t1 WHERE s1 = s2; DROP TABLE t1; diff --git a/mysql-test/t/ctype_tis620.test b/mysql-test/t/ctype_tis620.test index 7314b52e301..b30a5fbc95a 100644 --- a/mysql-test/t/ctype_tis620.test +++ b/mysql-test/t/ctype_tis620.test @@ -1,13 +1,78 @@ +-- source include/have_tis620.inc + +# +# Tests with the big5 character set +# --disable_warnings drop table if exists t1; --enable_warnings +# +# Bug 1552: tis620 <-> unicode conversion crashed +# Check tis620 -> utf8 -> tis620 round trip conversion +# + +SET @pl0= _tis620 0x000102030405060708090A0B0C0D0E0F; +SET @pl1= _tis620 0x101112131415161718191A1B1C1D1E1F; +SET @pl2= _tis620 0x202122232425262728292A2B2C2D2E2F; +SET @pl3= _tis620 0x303132333435363738393A3B3C3D3E3F; +SET @pl4= _tis620 0x404142434445464748494A4B4C4D4E4F; +SET @pl5= _tis620 0x505152535455565758595A5B5C5D5E5F; +SET @pl6= _tis620 0x606162636465666768696A6B6C6D6E6F; +SET @pl7= _tis620 0x707172737475767778797A7B7C7D7E7F; +SET @pl8= _tis620 0x808182838485868788898A8B8C8D8E8F; +SET @pl9= _tis620 0x909192939495969798999A9B9C9D9E9F; +SET @plA= _tis620 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAF; +SET @plB= _tis620 0xB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF; +SET @plC= _tis620 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECF; +SET @plD= _tis620 0xD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF; +SET @plE= _tis620 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF; +SET @plF= _tis620 0xF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF; + +SELECT hex(@u0:=convert(@pl0 using utf8)); +SELECT hex(@u1:=convert(@pl1 using utf8)); +SELECT hex(@u2:=convert(@pl2 using utf8)); +SELECT hex(@u3:=convert(@pl3 using utf8)); +SELECT hex(@u4:=convert(@pl4 using utf8)); +SELECT hex(@u5:=convert(@pl5 using utf8)); +SELECT hex(@u6:=convert(@pl6 using utf8)); +SELECT hex(@u7:=convert(@pl7 using utf8)); +SELECT hex(@u8:=convert(@pl8 using utf8)); +SELECT hex(@u9:=convert(@pl9 using utf8)); +SELECT hex(@uA:=convert(@plA using utf8)); +SELECT hex(@uB:=convert(@plB using utf8)); +SELECT hex(@uC:=convert(@plC using utf8)); +SELECT hex(@uD:=convert(@plD using utf8)); +SELECT hex(@uE:=convert(@plE using utf8)); +SELECT hex(@uF:=convert(@plF using utf8)); + +SELECT hex(convert(@u0 USING tis620)); +SELECT hex(convert(@u1 USING tis620)); +SELECT hex(convert(@u2 USING tis620)); +SELECT hex(convert(@u3 USING tis620)); +SELECT hex(convert(@u4 USING tis620)); +SELECT hex(convert(@u5 USING tis620)); +SELECT hex(convert(@u6 USING tis620)); +SELECT hex(convert(@u7 USING tis620)); +SELECT hex(convert(@u8 USING tis620)); +SELECT hex(convert(@u9 USING tis620)); +SELECT hex(convert(@uA USING tis620)); +SELECT hex(convert(@uB USING tis620)); +SELECT hex(convert(@uC USING tis620)); +SELECT hex(convert(@uD USING tis620)); +SELECT hex(convert(@uE USING tis620)); +SELECT hex(convert(@uF USING tis620)); + +SET NAMES tis620; + CREATE TABLE t1 ( recid int(11) NOT NULL auto_increment, dyninfo text, PRIMARY KEY (recid) ) ENGINE=MyISAM; +show create table t1; + INSERT INTO t1 VALUES (1,'color=\"STB,NPG\"\r\nengine=\"J30A13\"\r\nframe=\"MRHCG1640YP4\"\r\ngrade=\"V6\"\r\nmodel=\"ACCORD\"\r\nmodelcode=\"CG164YEN\"\r\ntype=\"VT6\"\r\n'); INSERT INTO t1 VALUES (2,'color=\"HTM,NPG,DEG,RGS\"\r\nengine=\"F23A5YP1\"\r\nframe=\"MRHCF8640YP3\"\r\ngrade=\"EXi AT\"\r\nmodel=\"ACCORD\"\r\nmodelcode=\"CF864YE\"\r\ntype=\"EXA\"\r\n'); diff --git a/mysql-test/t/ctype_tis620.test-old b/mysql-test/t/ctype_tis620.test-old deleted file mode 100644 index 82c660dfea0..00000000000 --- a/mysql-test/t/ctype_tis620.test-old +++ /dev/null @@ -1,64 +0,0 @@ --- source include/have_tis620.inc - -# -# Tests with the big5 character set -# ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Bug 1552: tis620 <-> unicode conversion crashed -# Check tis620 -> utf8 -> tis620 round trip conversion -# - -SET @pl0= _tis620 0x000102030405060708090A0B0C0D0E0F; -SET @pl1= _tis620 0x101112131415161718191A1B1C1D1E1F; -SET @pl2= _tis620 0x202122232425262728292A2B2C2D2E2F; -SET @pl3= _tis620 0x303132333435363738393A3B3C3D3E3F; -SET @pl4= _tis620 0x404142434445464748494A4B4C4D4E4F; -SET @pl5= _tis620 0x505152535455565758595A5B5C5D5E5F; -SET @pl6= _tis620 0x606162636465666768696A6B6C6D6E6F; -SET @pl7= _tis620 0x707172737475767778797A7B7C7D7E7F; -SET @pl8= _tis620 0x808182838485868788898A8B8C8D8E8F; -SET @pl9= _tis620 0x909192939495969798999A9B9C9D9E9F; -SET @plA= _tis620 0xA0A1A2A3A4A5A6A7A8A9AAABACADAEAF; -SET @plB= _tis620 0xB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF; -SET @plC= _tis620 0xC0C1C2C3C4C5C6C7C8C9CACBCCCDCECF; -SET @plD= _tis620 0xD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF; -SET @plE= _tis620 0xE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF; -SET @plF= _tis620 0xF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF; - -SELECT hex(@u0:=convert(@pl0 using utf8)); -SELECT hex(@u1:=convert(@pl1 using utf8)); -SELECT hex(@u2:=convert(@pl2 using utf8)); -SELECT hex(@u3:=convert(@pl3 using utf8)); -SELECT hex(@u4:=convert(@pl4 using utf8)); -SELECT hex(@u5:=convert(@pl5 using utf8)); -SELECT hex(@u6:=convert(@pl6 using utf8)); -SELECT hex(@u7:=convert(@pl7 using utf8)); -SELECT hex(@u8:=convert(@pl8 using utf8)); -SELECT hex(@u9:=convert(@pl9 using utf8)); -SELECT hex(@uA:=convert(@plA using utf8)); -SELECT hex(@uB:=convert(@plB using utf8)); -SELECT hex(@uC:=convert(@plC using utf8)); -SELECT hex(@uD:=convert(@plD using utf8)); -SELECT hex(@uE:=convert(@plE using utf8)); -SELECT hex(@uF:=convert(@plF using utf8)); - -SELECT hex(convert(@u0 USING tis620)); -SELECT hex(convert(@u1 USING tis620)); -SELECT hex(convert(@u2 USING tis620)); -SELECT hex(convert(@u3 USING tis620)); -SELECT hex(convert(@u4 USING tis620)); -SELECT hex(convert(@u5 USING tis620)); -SELECT hex(convert(@u6 USING tis620)); -SELECT hex(convert(@u7 USING tis620)); -SELECT hex(convert(@u8 USING tis620)); -SELECT hex(convert(@u9 USING tis620)); -SELECT hex(convert(@uA USING tis620)); -SELECT hex(convert(@uB USING tis620)); -SELECT hex(convert(@uC USING tis620)); -SELECT hex(convert(@uD USING tis620)); -SELECT hex(convert(@uE USING tis620)); -SELECT hex(convert(@uF USING tis620)); diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test index bd5d9e5c0d9..e370b545eff 100644 --- a/mysql-test/t/delete.test +++ b/mysql-test/t/delete.test @@ -84,7 +84,7 @@ insert into t2 values (1, 21),(2, 12),(3, 23); select * from t11; select * from t12; select * from t2; --- error 1241 +-- error 1242 delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b <> (select b from t2 where t11.a < t2.a); select * from t11; select * from t12; @@ -92,7 +92,7 @@ delete ignore t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b <> (select select * from t11; select * from t12; insert into t11 values (2, 12); --- error 1241 +-- error 1242 delete from t11 where t11.b <> (select b from t2 where t11.a < t2.a); select * from t11; delete ignore from t11 where t11.b <> (select b from t2 where t11.a < t2.a); diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index a9341ada416..0ef56191b7c 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -116,7 +116,7 @@ select mail_id, if(folder.f_description!='', folder.f_description, folder.f_nam # create table t1 (a int); insert into t1 values (1),(2),(3); --- error 1287 +-- error 1288 update (select * from t1) as t1 set a = 5; -- error 1064 delete from (select * from t1); @@ -151,13 +151,13 @@ CREATE TABLE `t1` ( INSERT INTO `t1` (N, M) VALUES (1, 0),(1, 0),(1, 0),(2, 0),(2, 0),(3, 0); UPDATE `t1` AS P1 INNER JOIN (SELECT N FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N SET P1.M = 2; select * from t1; --- error 1287 +-- error 1288 UPDATE `t1` AS P1 INNER JOIN (SELECT N FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N SET P1.M = 2, P2.N = 2; -- error 1054 UPDATE `t1` AS P1 INNER JOIN (SELECT aaaa FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N SET P1.M = 2; delete P1.* from `t1` AS P1 INNER JOIN (SELECT N FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N; select * from t1; --- error 1287 +-- error 1288 delete P1.*,P2.* from `t1` AS P1 INNER JOIN (SELECT N FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N; -- error 1054 delete P1.* from `t1` AS P1 INNER JOIN (SELECT aaa FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N; diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index be75d5ee7cc..98b9eb114ab 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -145,9 +145,9 @@ select * from t2 having MATCH inhalt AGAINST ('foobar'); # check of fulltext errors # ---error 1282 +--error 1283 CREATE TABLE t3 (t int(11),i text,fulltext tix (t,i)); ---error 1282 +--error 1283 CREATE TABLE t3 (t int(11),i text, j varchar(200) CHARACTER SET latin2, fulltext tix (i,j)); diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test index 9ff768ec76b..855a7cbd28f 100644 --- a/mysql-test/t/func_in.test +++ b/mysql-test/t/func_in.test @@ -61,11 +61,11 @@ c char(1) character set latin1 collate latin1_danish_ci ); insert into t1 values ('A','B','C'); insert into t1 values ('a','c','c'); ---error 1266 +--error 1267 select * from t1 where a in (b); ---error 1269 -select * from t1 where a in (b,c); --error 1270 +select * from t1 where a in (b,c); +--error 1271 select * from t1 where 'a' in (a,b,c); select * from t1 where 'a' in (a); select * from t1 where a in ('a'); diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 233b58ea9b6..a9c2895206d 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -177,23 +177,22 @@ select 1=_latin1'1'; select _latin1'1'=1; select _latin2'1'=1; select 1=_latin2'1'; ---error 1266 +--error 1267 select _latin1'1'=_latin2'1'; select row('a','b','c') = row('a','b','c'); select row('A','b','c') = row('a','b','c'); select row('A' COLLATE latin1_bin,'b','c') = row('a','b','c'); select row('A','b','c') = row('a' COLLATE latin1_bin,'b','c'); ---error 1266 +--error 1267 select row('A' COLLATE latin1_general_ci,'b','c') = row('a' COLLATE latin1_bin,'b','c'); ---error 1266 +--error 1267 select concat(_latin1'a',_latin2'a'); ---error 1269 -select concat(_latin1'a',_latin2'a',_latin5'a'); --error 1270 +select concat(_latin1'a',_latin2'a',_latin5'a'); +--error 1271 select concat(_latin1'a',_latin2'a',_latin5'a',_latin7'a'); - # # Test FIELD() and collations # @@ -201,65 +200,64 @@ select FIELD('b','A','B'); select FIELD('B','A','B'); select FIELD('b' COLLATE latin1_bin,'A','B'); select FIELD('b','A' COLLATE latin1_bin,'B'); ---error 1269 +--error 1270 select FIELD(_latin2'b','A','B'); ---error 1269 +--error 1270 select FIELD('b',_latin2'A','B'); select FIELD('b',_latin2'A','B',1); - select POSITION(_latin1'B' IN _latin1'abcd'); select POSITION(_latin1'B' IN _latin1'abcd' COLLATE latin1_bin); select POSITION(_latin1'B' COLLATE latin1_bin IN _latin1'abcd'); ---error 1266 +--error 1267 select POSITION(_latin1'B' COLLATE latin1_general_ci IN _latin1'abcd' COLLATE latin1_bin); ---error 1266 +--error 1267 select POSITION(_latin1'B' IN _latin2'abcd'); select FIND_IN_SET(_latin1'B',_latin1'a,b,c,d'); --fix this: --select FIND_IN_SET(_latin1'B',_latin1'a,b,c,d' COLLATE latin1_bin); --select FIND_IN_SET(_latin1'B' COLLATE latin1_bin,_latin1'a,b,c,d'); ---error 1266 +--error 1267 select FIND_IN_SET(_latin1'B' COLLATE latin1_general_ci,_latin1'a,b,c,d' COLLATE latin1_bin); ---error 1266 +--error 1267 select FIND_IN_SET(_latin1'B',_latin2'a,b,c,d'); select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin1'd',2); --fix this: --select SUBSTRING_INDEX(_latin1'abcdabcdabcd' COLLATE latin1_bin,_latin1'd',2); --select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin1'd' COLLATE latin1_bin,2); ---error 1266 +--error 1267 select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin2'd',2); ---error 1266 +--error 1267 select SUBSTRING_INDEX(_latin1'abcdabcdabcd' COLLATE latin1_general_ci,_latin1'd' COLLATE latin1_bin,2); select _latin1'B' between _latin1'a' and _latin1'c'; select _latin1'B' collate latin1_bin between _latin1'a' and _latin1'c'; select _latin1'B' between _latin1'a' collate latin1_bin and _latin1'c'; select _latin1'B' between _latin1'a' and _latin1'c' collate latin1_bin; ---error 1269 +--error 1270 select _latin2'B' between _latin1'a' and _latin1'b'; ---error 1269 +--error 1270 select _latin1'B' between _latin2'a' and _latin1'b'; ---error 1269 +--error 1270 select _latin1'B' between _latin1'a' and _latin2'b'; ---error 1269 +--error 1270 select _latin1'B' collate latin1_general_ci between _latin1'a' collate latin1_bin and _latin1'b'; select _latin1'B' in (_latin1'a',_latin1'b'); select _latin1'B' collate latin1_bin in (_latin1'a',_latin1'b'); select _latin1'B' in (_latin1'a' collate latin1_bin,_latin1'b'); select _latin1'B' in (_latin1'a',_latin1'b' collate latin1_bin); ---error 1269 +--error 1270 select _latin2'B' in (_latin1'a',_latin1'b'); ---error 1269 +--error 1270 select _latin1'B' in (_latin2'a',_latin1'b'); ---error 1269 +--error 1270 select _latin1'B' in (_latin1'a',_latin2'b'); ---error 1269 +--error 1270 select _latin1'B' COLLATE latin1_general_ci in (_latin1'a' COLLATE latin1_bin,_latin1'b'); ---error 1269 +--error 1270 select _latin1'B' COLLATE latin1_general_ci in (_latin1'a',_latin1'b' COLLATE latin1_bin); select collation(bin(130)), coercibility(bin(130)); @@ -345,7 +343,7 @@ select SUBSTR('abcdefg',1,-1) FROM DUAL; # when an error on a lower level (in concat) has accured: # create table t7 (s1 char); ---error 1266 +--error 1267 select * from t7 where concat(s1 collate latin1_general_ci,s1 collate latin1_swedish_ci) = 'AA'; drop table t7; diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test index 0d055549866..44047491862 100644 --- a/mysql-test/t/func_test.test +++ b/mysql-test/t/func_test.test @@ -51,9 +51,9 @@ explain extended select _koi8r'a' = _koi8r'A' COLLATE koi8r_general_ci; select _koi8r'a' = _koi8r'A' COLLATE koi8r_bin; select _koi8r'a' COLLATE koi8r_general_ci = _koi8r'A'; select _koi8r'a' COLLATE koi8r_bin = _koi8r'A'; ---error 1266 +--error 1267 select _koi8r'a' COLLATE koi8r_bin = _koi8r'A' COLLATE koi8r_general_ci; ---error 1266 +--error 1267 select _koi8r'a' = _latin1'A'; select strcmp(_koi8r'a', _koi8r'A'); @@ -61,9 +61,9 @@ select strcmp(_koi8r'a', _koi8r'A' COLLATE koi8r_general_ci); select strcmp(_koi8r'a', _koi8r'A' COLLATE koi8r_bin); select strcmp(_koi8r'a' COLLATE koi8r_general_ci, _koi8r'A'); select strcmp(_koi8r'a' COLLATE koi8r_bin, _koi8r'A'); ---error 1266 +--error 1267 select strcmp(_koi8r'a' COLLATE koi8r_general_ci, _koi8r'A' COLLATE koi8r_bin); ---error 1266 +--error 1267 select strcmp(_koi8r'a', _latin1'A'); select _koi8r'a' LIKE _koi8r'A'; @@ -71,9 +71,9 @@ select _koi8r'a' LIKE _koi8r'A' COLLATE koi8r_general_ci; select _koi8r'a' LIKE _koi8r'A' COLLATE koi8r_bin; select _koi8r'a' COLLATE koi8r_general_ci LIKE _koi8r'A'; select _koi8r'a' COLLATE koi8r_bin LIKE _koi8r'A'; ---error 1266 +--error 1267 select _koi8r'a' COLLATE koi8r_general_ci LIKE _koi8r'A' COLLATE koi8r_bin; ---error 1266 +--error 1267 select _koi8r'a' LIKE _latin1'A'; # diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index 78221fa4e40..5cf3e10f972 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -110,14 +110,14 @@ show grants for drop_user@localhost; revoke all privileges, grant from drop_user@localhost; show grants for drop_user@localhost; drop user drop_user@localhost; ---error 1268 +--error 1269 revoke all privileges, grant from drop_user@localhost; grant select(a) on test.t1 to drop_user1@localhost; grant select on test.t1 to drop_user2@localhost; grant select on test.* to drop_user3@localhost; grant select on *.* to drop_user4@localhost; ---error 1267 +--error 1268 drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, drop_user4@localhost; revoke all privileges, grant from drop_user1@localhost, drop_user2@localhost, diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 92ab6008840..ada2771fdc2 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -936,8 +936,8 @@ drop table t1; # Test dictionary handling with spaceand quoting # -CREATE TABLE t1 (`id 1` INT NOT NULL, PRIMARY KEY (`id 1`)) TYPE=INNODB; -CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (`t1_id`) REFERENCES `t1`(`id 1`) ON DELETE CASCADE ) TYPE=INNODB; +CREATE TABLE t1 (`id 1` INT NOT NULL, PRIMARY KEY (`id 1`)) ENGINE=INNODB; +CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (`t1_id`) REFERENCES `t1`(`id 1`) ON DELETE CASCADE ) ENGINE=INNODB; #show create table t2; drop table t2,t1; diff --git a/mysql-test/t/key_cache.test b/mysql-test/t/key_cache.test index d9a2200a636..2bf5cdbcf6f 100644 --- a/mysql-test/t/key_cache.test +++ b/mysql-test/t/key_cache.test @@ -41,7 +41,7 @@ SET @@global.key_buffer_size=@save_key_buffer; --error 1064 SELECT @@default.key_buffer_size; ---error 1271 +--error 1272 SELECT @@skr.storage_engine="test"; select @@keycache1.key_cache_block_size; @@ -99,7 +99,7 @@ explain select a from t2; select a from t2; # Test some error conditions ---error 1283 +--error 1284 cache index t1 in unknown_key_cache; cache index t1 key (unknown_key) in keycache1; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 6ced608344b..c407cba4800 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -423,6 +423,18 @@ select * from t1 where a='807780' and b='477' and c='165'; drop table t1; # +# Verify blob handling +# +create table t1 (a blob); +insert into t1 values('a '),('a'); +select concat(a,'.') from t1 where a='a'; +select concat(a,'.') from t1 where a='a '; +alter table t1 add key(a(2)); +select concat(a,'.') from t1 where a='a'; +select concat(a,'.') from t1 where a='a '; +drop table t1; + +# # Test text and unique # create table t1 (a int not null auto_increment primary key, b text not null, unique b (b(20))); diff --git a/mysql-test/t/row.test b/mysql-test/t/row.test index ecb0c6adfc1..62e8eb7991c 100644 --- a/mysql-test/t/row.test +++ b/mysql-test/t/row.test @@ -15,7 +15,7 @@ select row('b',1.5,3) IN (row(3,NULL,3), row('a',1.5,3), row(1,3,3)); select row('b',1.5,3) IN (row('b',NULL,3), row('a',1.5,3), row(1,3,3)); select row('b',1.5,3) IN (row('b',NULL,4), row('a',1.5,3), row(1,3,3)); select (1,2,(3,4)) IN ((3,2,(3,4)), (1,2,(3,4))); --- error 1240 +-- error 1241 select row(1,2,row(3,4)) IN (row(3,2,row(3,4)), row(1,2,4)); select row(1,2,row(3,4)) IN (row(3,2,row(3,4)), row(1,2,row(3,NULL))); explain extended select row(1,2,row(3,4)) IN (row(3,2,row(3,4)), row(1,2,row(3,NULL))); @@ -37,12 +37,12 @@ SELECT ROW(NULL,2,3)=ROW(NULL,2,3); SELECT ROW(NULL,2,3)<=>ROW(NULL,2,3); SELECT ROW(1,2,ROW(3,4,5))=ROW(1,2,ROW(3,4,5)); SELECT ROW('test',2,3.33)=ROW('test',2,3.33); --- error 1240 +-- error 1241 SELECT ROW('test',2,3.33)=ROW('test',2,3.33,4); SELECT ROW('test',2,ROW(3,33))=ROW('test',2,ROW(3,33)); SELECT ROW('test',2,ROW(3,33))=ROW('test',2,ROW(3,3)); SELECT ROW('test',2,ROW(3,33))=ROW('test',2,ROW(3,NULL)); --- error 1240 +-- error 1241 SELECT ROW('test',2,ROW(3,33))=ROW('test',2,4); create table t1 ( a int, b int, c int); @@ -56,15 +56,15 @@ select ROW(a,b,c) IN(row(1,2,3), row(3,2,1)) from t1; select ROW(1,2,3) IN(row(a,b,c), row(1,2,3)) from t1; drop table t1; --- error 1240 +-- error 1241 select ROW(1,1); create table t1 (i int); --- error 1240 +-- error 1241 select 1 from t1 where ROW(1,1); --- error 1240 +-- error 1241 select count(*) from t1 order by ROW(1,1); --- error 1240 +-- error 1241 select count(*) from t1 having (1,1) order by i; drop table t1; diff --git a/mysql-test/t/rpl_until.test b/mysql-test/t/rpl_until.test index 40d36110296..5eaec0727b6 100644 --- a/mysql-test/t/rpl_until.test +++ b/mysql-test/t/rpl_until.test @@ -67,15 +67,15 @@ real_sleep 4 show slave status; #testing various error conditions ---error 1276 +--error 1277 start slave until master_log_file='master-bin', master_log_pos=561; ---error 1276 +--error 1277 start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; ---error 1276 +--error 1277 start slave until master_log_file='master-bin.000001'; ---error 1276 +--error 1277 start slave until relay_log_file='slave-relay-bin.000002'; ---error 1276 +--error 1277 start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; start slave sql_thread; diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 6c53c70c9a0..c5e4ce42ffe 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -9,12 +9,12 @@ SELECT (SELECT 1) UNION SELECT (SELECT 2); explain extended SELECT (SELECT 1) UNION SELECT (SELECT 2); SELECT (SELECT (SELECT 0 UNION SELECT 0)); explain extended SELECT (SELECT (SELECT 0 UNION SELECT 0)); --- error 1246 +-- error 1247 SELECT (SELECT 1 FROM (SELECT 1) as b HAVING a=1) as a; --- error 1246 +-- error 1247 SELECT (SELECT 1 FROM (SELECT 1) as b HAVING b=1) as a,(SELECT 1 FROM (SELECT 1) as c HAVING a=1) as b; SELECT (SELECT 1),MAX(1) FROM (SELECT 1) as a; --- error 1246 +-- error 1247 SELECT (SELECT a) as a; EXPLAIN EXTENDED SELECT 1 FROM (SELECT 1 as a) as b HAVING (SELECT a)=1; SELECT 1 FROM (SELECT 1 as a) as b HAVING (SELECT a)=1; @@ -24,7 +24,7 @@ SELECT 1 as a FROM (SELECT 1) as b HAVING (SELECT a)=1; -- error 1054 SELECT 1 FROM (SELECT (SELECT a) b) c; SELECT * FROM (SELECT 1 as id) b WHERE id IN (SELECT * FROM (SELECT 1 as id) c ORDER BY id); --- error 1240 +-- error 1241 SELECT * FROM (SELECT 1) a WHERE 1 IN (SELECT 1,1); SELECT 1 IN (SELECT 1); SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a)); @@ -51,7 +51,7 @@ SELECT (SELECT 'b',2,'a') = ROW(1.5,2,'a'); SELECT (SELECT 1.5,2,'a') = ROW(1.5,'c','a'); SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a'); --- error 1240 +-- error 1241 SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a); SELECT 1 as a,(SELECT a+a) b,(SELECT b); @@ -63,7 +63,7 @@ create table t4 (a int not null, b int not null); insert into t1 values (2); insert into t2 values (1,7),(2,7); insert into t4 values (4,8),(3,8),(5,9); --- error 1246 +-- error 1247 select (select a from t1 where t1.a = a1) as a2, (select b from t2 where t2.b=a2) as a1; select (select a from t1 where t1.a=t2.a), a from t2; select (select a from t1 where t1.a=t2.b), a from t2; @@ -103,9 +103,9 @@ select * from t3 where a >= any (select b from t2); explain extended select * from t3 where a >= any (select b from t2); select * from t3 where a >= all (select b from t2); delete from t2 where a=100; --- error 1240 +-- error 1241 select * from t3 where a in (select a,b from t2); --- error 1240 +-- error 1241 select * from t3 where a in (select * from t2); insert into t4 values (12,7),(1,7),(10,9),(9,6),(7,6),(3,9),(1,10); -- empty set @@ -121,7 +121,7 @@ select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a) insert into t5 values (2); select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2; explain extended select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2; --- error 1241 +-- error 1242 select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2; create table t6 (patient_uq int, clinic_uq int, index i1 (clinic_uq)); create table t7( uq int primary key, name char(25)); @@ -158,14 +158,14 @@ INSERT INTO t8 (pseudo,email) VALUES ('joce','test'); INSERT INTO t8 (pseudo,email) VALUES ('joce1','test1'); INSERT INTO t8 (pseudo,email) VALUES ('2joce1','2test1'); EXPLAIN EXTENDED SELECT pseudo,(SELECT email FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce')) FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce'); --- error 1240 +-- error 1241 SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo,email FROM t8 WHERE pseudo='joce'); --- error 1240 +-- error 1241 SELECT pseudo FROM t8 WHERE pseudo=(SELECT * FROM t8 WHERE pseudo='joce'); SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce'); --- error 1241 +-- error 1242 SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo LIKE '%joce%'); drop table if exists t1,t2,t3,t4,t5,t6,t7,t8; @@ -185,7 +185,7 @@ EXPLAIN EXTENDED SELECT (SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'); SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'; SELECT (SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'); SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION SELECT 1) UNION ALL SELECT 1; --- error 1241 +-- error 1242 SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION ALL SELECT 1) UNION SELECT 1; EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION SELECT 1); drop table t1; @@ -242,9 +242,9 @@ CREATE TABLE `t1` ( ) ENGINE=MyISAM ROW_FORMAT=FIXED; INSERT INTO t1 (numeropost,maxnumrep) VALUES (1,0),(2,1); --- error 1241 +-- error 1242 select numeropost as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1); --- error 1241 +-- error 1242 select numeropost as a FROM t1 ORDER BY (SELECT 1 FROM t1 HAVING a=1); drop table t1; @@ -256,7 +256,7 @@ drop table t1; #iftest CREATE TABLE t1 (field char(1) NOT NULL DEFAULT 'b'); INSERT INTO t1 VALUES (); --- error 1241 +-- error 1242 SELECT field FROM t1 WHERE 1=(SELECT 1 UNION ALL SELECT 1 FROM (SELECT 1) a HAVING field='b'); drop table t1; @@ -269,13 +269,13 @@ CREATE TABLE `t1` ( UNIQUE KEY `numreponse` (`numreponse`), KEY `pseudo` (`pseudo`,`numeropost`) ) ENGINE=MyISAM; --- error 1246 +-- error 1247 SELECT (SELECT numeropost FROM t1 HAVING numreponse=a),numreponse FROM (SELECT * FROM t1) as a; -- error 1054 SELECT numreponse, (SELECT numeropost FROM t1 HAVING numreponse=a) FROM (SELECT * FROM t1) as a; SELECT numreponse, (SELECT numeropost FROM t1 HAVING numreponse=1) FROM (SELECT * FROM t1) as a; INSERT INTO t1 (numeropost,numreponse,pseudo) VALUES (1,1,'joce'),(1,2,'joce'),(1,3,'test'); --- error 1241 +-- error 1242 EXPLAIN EXTENDED SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM t1 WHERE numeropost='1'); EXPLAIN EXTENDED SELECT MAX(numreponse) FROM t1 WHERE numeropost='1'; EXPLAIN EXTENDED SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT MAX(numreponse) FROM t1 WHERE numeropost='1'); @@ -294,7 +294,7 @@ insert into t2 values (1, 21),(2, 22),(3, 23); select * from t1; -- error 1093 update t1 set b= (select b from t1); --- error 1241 +-- error 1242 update t1 set b= (select b from t2); update t1 set b= (select b from t2 where t1.a = t2.a); select * from t1; @@ -309,7 +309,7 @@ select * from t1; select * from t1 where b = (select b from t2 where t1.a = t2.a); -- error 1093 delete from t1 where b = (select b from t1); --- error 1241 +-- error 1242 delete from t1 where b = (select b from t2); delete from t1 where b = (select b from t2 where t1.a = t2.a); select * from t1; @@ -327,7 +327,7 @@ select * from t11; select * from t12; -- error 1093 delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t12 where t11.a = t12.a); --- error 1241 +-- error 1242 delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2); delete t11.*, t12.* from t11,t12 where t11.a = t12.a and t11.b = (select b from t2 where t11.a = t2.a); select * from t11; @@ -342,7 +342,7 @@ insert into t2 values (1); insert into t3 values (1),(2); -- error 1093 INSERT INTO t1 (x) VALUES ((SELECT x FROM t1)); --- error 1241 +-- error 1242 INSERT INTO t1 (x) VALUES ((SELECT b FROM t3)); INSERT INTO t1 (x) VALUES ((SELECT a FROM t2)); select * from t1; @@ -373,7 +373,7 @@ insert into t3 values (1),(2); select * from t1; -- error 1093 replace into t1 (x, y) VALUES ((SELECT x FROM t1), (SELECT a+1 FROM t2)); --- error 1241 +-- error 1242 replace into t1 (x, y) VALUES ((SELECT a FROM t3), (SELECT a+1 FROM t2)); replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2)); select * from t1; @@ -409,7 +409,7 @@ INSERT INTO t2 VALUES ((SELECT id FROM t2)); SELECT * FROM t2; CREATE TABLE t1 (id int(11) default NULL, KEY id (id)) ENGINE=MyISAM CHARSET=latin1; INSERT INTO t1 values (1),(1); --- error 1241 +-- error 1242 UPDATE t2 SET id=(SELECT * FROM t1); drop table t2, t1; @@ -867,9 +867,9 @@ DROP TABLE t1, t2; CREATE TABLE t1 (s1 CHAR(5) COLLATE latin1_german1_ci, s2 CHAR(5) COLLATE latin1_swedish_ci); INSERT INTO t1 VALUES ('z','?'); --- error 1266 +-- error 1267 select * from t1 where s1 > (select max(s2) from t1); --- error 1266 +-- error 1267 select * from t1 where s1 > any (select max(s2) from t1); drop table t1; @@ -887,7 +887,7 @@ drop table t1, t2; # row union # create table t1 (s1 char(5)); --- error 1240 +-- error 1241 select (select 'a','b' from t1 union select 'a','b' from t1) from t1; insert into t1 values ('tttt'); select * from t1 where ('a','b')=(select 'a','b' from t1 union select 'a','b' from t1); @@ -952,7 +952,7 @@ CREATE TABLE t1 (id int(11) default NULL) ENGINE=MyISAM CHARSET=latin1; INSERT INTO t1 VALUES (1),(5); CREATE TABLE t2 (id int(11) default NULL) ENGINE=MyISAM CHARSET=latin1; INSERT INTO t2 VALUES (2),(6); --- error 1240 +-- error 1241 select * from t1 where (1,2,6) in (select * from t2); DROP TABLE t1,t2; @@ -962,7 +962,7 @@ DROP TABLE t1,t2; create table t1 (s1 int); insert into t1 values (1); insert into t1 values (2); --- error 1241 +-- error 1242 set sort_buffer_size = (select s1 from t1); do (select * from t1); drop table t1; diff --git a/mysql-test/t/subselect_innodb.test b/mysql-test/t/subselect_innodb.test index 8e8d41f7653..47642832158 100644 --- a/mysql-test/t/subselect_innodb.test +++ b/mysql-test/t/subselect_innodb.test @@ -67,7 +67,7 @@ INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t3 VALUES (1,1),(2,2),(3,3); INSERT INTO t2 VALUES (1,1),(2,2),(3,3); SELECT distinct p1.processor_id, (SELECT y.yod_id FROM t1 p2, t2 y WHERE p2.processor_id = p1.processor_id and p2.processor_id = y.processor_id) FROM t1 p1; -drop table t1,t2,t3; +drop table t2,t1,t3; # # innodb locking diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index 8ce4aa997fc..55f53fb4c17 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -23,7 +23,7 @@ select 't1',b,count(*) from t1 group by b UNION select 't2',b,count(*) from t2 g (select a,b from t1 limit 2) union all (select a,b from t2 order by a) limit 4; (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1); (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc; ---error 1249 +--error 1250 (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by t1.b; explain extended (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc; (select sql_calc_found_rows a,b from t1 limit 2) union all (select a,b from t2 order by a) limit 2; @@ -420,7 +420,7 @@ create table t1 select 1 union select -1; select * from t1; show create table t1; drop table t1; --- error 1266 +-- error 1267 create table t1 select _latin1"test" union select _latin2"testt" ; create table t1 select _latin2"test" union select _latin2"testt" ; show create table t1; diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test index 32ed6fe33db..a28b327cf58 100644 --- a/mysql-test/t/user_var.test +++ b/mysql-test/t/user_var.test @@ -84,7 +84,7 @@ select @a=_latin2'TEST' collate latin2_bin; set @a=_latin2'test' collate latin2_general_ci; select charset(@a),collation(@a),coercibility(@a); select @a=_latin2'TEST'; ---error 1266 +--error 1267 select @a=_latin2'TEST' collate latin2_bin; # @@ -97,5 +97,5 @@ select collation(@a:=_latin2'test' collate latin2_bin); select coercibility(@a:=_latin2'test' collate latin2_bin); select (@a:=_latin2'test' collate latin2_bin) = _latin2'TEST'; select charset(@a),collation(@a),coercibility(@a); ---error 1266 +--error 1267 select (@a:=_latin2'test' collate latin2_bin) = _latin2'TEST' collate latin2_general_ci; diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 2fec3535739..05ac0427a92 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -124,7 +124,7 @@ set big_tables="OFFF"; set unknown_variable=1; --error 1232 set max_join_size="hello"; ---error 1285 +--error 1286 set storage_engine=UNKNOWN_TABLE_TYPE; --error 1231 set storage_engine=INNODB, big_tables=2; @@ -135,7 +135,7 @@ set SESSION query_cache_size=10000; set GLOBAL storage_engine=DEFAULT; --error 1115 set character_set_client=UNKNOWN_CHARACTER_SET; ---error 1272 +--error 1273 set collation_connection=UNKNOWN_COLLATION; --error 1228 set global autocommit=1; @@ -285,4 +285,3 @@ select @@global.max_user_connections,@@local.max_join_size; set @a=1, @b=2; set @a=@b, @b=@a; select @a, @b; - |