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/t | |
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/t')
-rw-r--r-- | mysql-test/t/case.test | 8 | ||||
-rw-r--r-- | mysql-test/t/create.test | 6 | ||||
-rw-r--r-- | mysql-test/t/ctype_collate.test | 14 | ||||
-rw-r--r-- | mysql-test/t/ctype_tis620.test | 65 | ||||
-rw-r--r-- | mysql-test/t/ctype_tis620.test-old | 64 | ||||
-rw-r--r-- | mysql-test/t/delete.test | 4 | ||||
-rw-r--r-- | mysql-test/t/derived.test | 6 | ||||
-rw-r--r-- | mysql-test/t/fulltext.test | 4 | ||||
-rw-r--r-- | mysql-test/t/func_in.test | 6 | ||||
-rw-r--r-- | mysql-test/t/func_str.test | 48 | ||||
-rw-r--r-- | mysql-test/t/func_test.test | 12 | ||||
-rw-r--r-- | mysql-test/t/grant.test | 4 | ||||
-rw-r--r-- | mysql-test/t/innodb.test | 4 | ||||
-rw-r--r-- | mysql-test/t/key_cache.test | 4 | ||||
-rw-r--r-- | mysql-test/t/myisam.test | 12 | ||||
-rw-r--r-- | mysql-test/t/row.test | 14 | ||||
-rw-r--r-- | mysql-test/t/rpl_until.test | 10 | ||||
-rw-r--r-- | mysql-test/t/subselect.test | 58 | ||||
-rw-r--r-- | mysql-test/t/subselect_innodb.test | 2 | ||||
-rw-r--r-- | mysql-test/t/union.test | 4 | ||||
-rw-r--r-- | mysql-test/t/user_var.test | 4 | ||||
-rw-r--r-- | mysql-test/t/variables.test | 5 |
22 files changed, 184 insertions, 174 deletions
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; - |