summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-08-19 00:08:08 +0300
committerunknown <monty@mashka.mysql.fi>2003-08-19 00:08:08 +0300
commit2901c3b8fa7d4095445c6ca2070367d2f61af2d1 (patch)
treedf4f8c8cf4d399e322333c5516d5c19507b1fda8 /mysql-test/t
parent034b44cb9ff914ceb6d32706a3a284eda00891b3 (diff)
downloadmariadb-git-2901c3b8fa7d4095445c6ca2070367d2f61af2d1.tar.gz
After merge fixes
Use server character set if --default-character-set is not used Added convert_string() for more efficient alloc+character-set convert of strings BitKeeper/deleted/.del-convert.result~a3b56e1db6f498e9: Delete: mysql-test/r/convert.result BitKeeper/deleted/.del-convert.test~f4ceb743194dfe72: Delete: mysql-test/t/convert.test BitKeeper/deleted/.del-make_win_src_distribution.old~5c9ebdc4a852b43b: Delete: scripts/make_win_src_distribution.old client/mysql.cc: Use server character set if --default-character-set is not used client/mysqltest.c: Code cleanup (merge identical code) More debug messages heap/hp_create.c: After merge fix include/m_ctype.h: After merge fix include/my_global.h: Remove size_str (we already have size_s) include/mysql_com.h: After merge fix libmysql/libmysql.c: After merge fix libmysqld/Makefile.am: After merge fix mysql-test/r/auto_increment.result: After merge fix mysql-test/r/create.result: After merge fix mysql-test/r/ctype_latin1_de.result: After merge fix mysql-test/r/distinct.result: After merge fix mysql-test/r/drop.result: After merge fix mysql-test/r/fulltext.result: After merge fix mysql-test/r/func_gconcat.result: After merge fix mysql-test/r/func_str.result: After merge fix mysql-test/r/func_test.result: After merge fix mysql-test/r/grant.result: After merge fix mysql-test/r/group_by.result: After merge fix mysql-test/r/handler.result: After merge fix mysql-test/r/heap.result: After merge fix mysql-test/r/heap_btree.result: After merge fix mysql-test/r/heap_hash.result: After merge fix mysql-test/r/innodb.result: After merge fix mysql-test/r/insert.result: After merge fix mysql-test/r/insert_select.result: After merge fix mysql-test/r/join_outer.result: After merge fix mysql-test/r/key.result: After merge fix mysql-test/r/key_cache.result: After merge fix mysql-test/r/loaddata.result: After merge fix mysql-test/r/myisam.result: After merge fix mysql-test/r/null.result: After merge fix mysql-test/r/null_key.result: After merge fix mysql-test/r/order_by.result: After merge fix mysql-test/r/rpl_do_grant.result: After merge fix mysql-test/r/rpl_error_ignored_table.result: After merge fix mysql-test/r/rpl_ignore_grant.result: After merge fix mysql-test/r/rpl_loaddata.result: After merge fix mysql-test/r/rpl_log.result: After merge fix mysql-test/r/rpl_log_pos.result: After merge fix mysql-test/r/rpl_max_relay_size.result: After merge fix mysql-test/r/rpl_replicate_do.result: After merge fix mysql-test/r/rpl_reset_slave.result: After merge fix mysql-test/r/rpl_rotate_logs.result: After merge fix mysql-test/r/rpl_user_variables.result: After merge fix mysql-test/r/select.result: After merge fix mysql-test/r/select_safe.result: After merge fix mysql-test/r/subselect.result: After merge fix mysql-test/r/type_blob.result: After merge fix mysql-test/r/type_decimal.result: After merge fix mysql-test/r/type_float.result: After merge fix mysql-test/r/type_ranges.result: After merge fix mysql-test/r/type_time.result: After merge fix mysql-test/r/type_uint.result: After merge fix mysql-test/r/union.result: After merge fix mysql-test/r/warnings.result: After merge fix mysql-test/t/auto_increment.test: After merge fix mysql-test/t/case.test: After merge fix mysql-test/t/ctype_collate.test: After merge fix mysql-test/t/ctype_latin1_de.test: After merge fix mysql-test/t/drop.test: After merge fix mysql-test/t/func_in.test: After merge fix mysql-test/t/func_set.test: After merge fix mysql-test/t/func_str.test: After merge fix mysql-test/t/func_test.test: After merge fix mysql-test/t/grant.test: After merge fix mysql-test/t/group_by.test: After merge fix mysql-test/t/handler.test: After merge fix mysql-test/t/heap.test: After merge fix mysql-test/t/heap_btree.test: After merge fix mysql-test/t/heap_hash.test: After merge fix mysql-test/t/innodb.test: After merge fix mysql-test/t/insert_select.test: After merge fix mysql-test/t/key.test: After merge fix mysql-test/t/key_cache.test: After merge fix mysql-test/t/lock_tables_lost_commit-master.opt: After merge fix mysql-test/t/lock_tables_lost_commit.test: After merge fix mysql-test/t/myisam.test: After merge fix mysql-test/t/row.test: After merge fix mysql-test/t/subselect.test: After merge fix mysql-test/t/type_decimal.test: After merge fix mysql-test/t/type_ranges.test: After merge fix mysql-test/t/type_uint.test: After merge fix mysql-test/t/variables.test: After merge fix mysql-test/t/warnings.test: After merge fix scripts/make_win_src_distribution.sh: after merge fixes sql-common/client.c: After merge fix Change my_connect() to use poll() If character set is not given, use servers character set. sql/field.cc: After merge fix Don't give warnings when storing data in fields in optimizer. sql/ha_myisammrg.h: After merge fix sql/log.cc: After merge fix sql/log_event.cc: After merge fix sql/mysqld.cc: After merge fix sql/opt_range.cc: After merge fix sql/set_var.cc: Code cleanup Fixed wrong usage of base_names (like medium.key_buffer) that caused core dumps sql/set_var.h: Fixed wrong usage of base_names (like medium.key_buffer) that caused core dumps sql/slave.cc: After merge fix sql/sql_acl.cc: After merge fix Code cleanup sql/sql_class.cc: Added convert_string() for more efficient alloc+character-set convert of strings Add cached flags to avoid calling mysql_charset_same() during parsing. sql/sql_class.h: Added convert_string() for more efficient alloc+character-set convert of strings Add cached flags to avoid calling mysql_charset_same() during parsing. sql/sql_handler.cc: After merge fix sql/sql_lex.h: After merge fix sql/sql_parse.cc: Optimize and fix memory reference errors reported by valgrind sql/sql_repl.cc: After merge fix sql/sql_yacc.yy: After merge fix Avoid calling mysql_charset_same() when parsing identifiers strings/ctype-latin1.c: Port latin_de conversion code from 4.0
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/auto_increment.test1
-rw-r--r--mysql-test/t/case.test8
-rw-r--r--mysql-test/t/convert.test11
-rw-r--r--mysql-test/t/ctype_collate.test15
-rw-r--r--mysql-test/t/ctype_latin1_de.test4
-rw-r--r--mysql-test/t/drop.test2
-rw-r--r--mysql-test/t/func_in.test6
-rw-r--r--mysql-test/t/func_set.test2
-rw-r--r--mysql-test/t/func_str.test46
-rw-r--r--mysql-test/t/func_test.test30
-rw-r--r--mysql-test/t/grant.test16
-rw-r--r--mysql-test/t/group_by.test2
-rw-r--r--mysql-test/t/handler.test6
-rw-r--r--mysql-test/t/heap.test2
-rw-r--r--mysql-test/t/heap_btree.test2
-rw-r--r--mysql-test/t/heap_hash.test2
-rw-r--r--mysql-test/t/innodb.test2
-rw-r--r--mysql-test/t/insert_select.test1
-rw-r--r--mysql-test/t/key.test9
-rw-r--r--mysql-test/t/key_cache.test2
-rw-r--r--mysql-test/t/lock_tables_lost_commit-master.opt2
-rw-r--r--mysql-test/t/lock_tables_lost_commit.test2
-rw-r--r--mysql-test/t/myisam.test3
-rw-r--r--mysql-test/t/row.test14
-rw-r--r--mysql-test/t/subselect.test51
-rw-r--r--mysql-test/t/type_decimal.test1
-rw-r--r--mysql-test/t/type_ranges.test1
-rw-r--r--mysql-test/t/type_uint.test1
-rw-r--r--mysql-test/t/variables.test2
-rw-r--r--mysql-test/t/warnings.test1
30 files changed, 125 insertions, 122 deletions
diff --git a/mysql-test/t/auto_increment.test b/mysql-test/t/auto_increment.test
index b46993ec6dd..a036121f297 100644
--- a/mysql-test/t/auto_increment.test
+++ b/mysql-test/t/auto_increment.test
@@ -4,6 +4,7 @@
--disable_warnings
drop table if exists t1;
--enable_warnings
+SET SQL_WARNINGS=1;
create table t1 (a int not null auto_increment,b int, primary key (a)) type=myisam auto_increment=3;
insert into t1 values (1,1),(NULL,3),(NULL,4);
diff --git a/mysql-test/t/case.test b/mysql-test/t/case.test
index 8aa17061174..4d4ceb062e4 100644
--- a/mysql-test/t/case.test
+++ b/mysql-test/t/case.test
@@ -60,14 +60,14 @@ CREATE TABLE t1 SELECT
SHOW CREATE TABLE t1;
DROP TABLE t1;
---error 1265
+--error 1266
SELECT CASE
WHEN 1
THEN _latin1'a' COLLATE latin1_danish_ci
ELSE _latin1'a' COLLATE latin1_swedish_ci
END;
---error 1268
+--error 1269
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
@@ -90,9 +90,9 @@ CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_bin THEN '1' ELSE 2 END
#
# Check COALESCE argument types aggregation
---error 1265
+--error 1266
CREATE TABLE t1 SELECT COALESCE(_latin1'a',_latin2'a');
---error 1265
+--error 1266
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/convert.test b/mysql-test/t/convert.test
deleted file mode 100644
index f26ef3a8c72..00000000000
--- a/mysql-test/t/convert.test
+++ /dev/null
@@ -1,11 +0,0 @@
-# Test of character set conversions
-
-# Test that SET DEFAULT works
-
-select @@convert_character_set;
-select @@global.convert_character_set;
-show variables like "%convert_character_set%";
-SET CHARACTER SET cp1251_koi8;
-select @@convert_character_set;
-SET CHARACTER SET DEFAULT;
-select @@convert_character_set;
diff --git a/mysql-test/t/ctype_collate.test b/mysql-test/t/ctype_collate.test
index 23039a4b116..d42696e693b 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 1251
+--error 1252
CREATE TABLE t2 (
latin1_f CHAR(32) CHARACTER SET latin1 COLLATE koi8r_general_ci NOT NULL
);
---error 1271
+--error 1272
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 1251
+--error 1252
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 1251
+--error 1252
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 1251
+--error 1252
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 1271
+--error 1272
SELECT DISTINCT latin1_f COLLATE koi8r FROM t1;
@@ -152,7 +152,6 @@ DROP TABLE t1;
CREATE TABLE t1
(s1 CHAR(5) COLLATE latin1_german1_ci,
s2 CHAR(5) COLLATE latin1_swedish_ci);
---error 1265
+--error 1266
SELECT * FROM t1 WHERE s1 = s2;
DROP TABLE t1;
- \ No newline at end of file
diff --git a/mysql-test/t/ctype_latin1_de.test b/mysql-test/t/ctype_latin1_de.test
index afad89729b4..52ee227b011 100644
--- a/mysql-test/t/ctype_latin1_de.test
+++ b/mysql-test/t/ctype_latin1_de.test
@@ -1,9 +1,13 @@
#
# Test latin_de character set
#
+
+select @@collation_connection;
+
--disable_warnings
drop table if exists t1;
--enable_warnings
+
create table t1 (a char (20) not null, b int not null auto_increment, index (a,b));
insert into t1 (a) values ('ä'),('ac'),('ae'),('ad'),('Äc'),('aeb');
insert into t1 (a) values ('üc'),('uc'),('ue'),('ud'),('Ü'),('ueb'),('uf');
diff --git a/mysql-test/t/drop.test b/mysql-test/t/drop.test
index e624ded0102..a55cbb45fd9 100644
--- a/mysql-test/t/drop.test
+++ b/mysql-test/t/drop.test
@@ -1,6 +1,7 @@
# Initialise
--disable_warnings
drop table if exists t1;
+drop database if exists mysqltest;
--enable_warnings
--error 1051;
@@ -17,7 +18,6 @@ select * from t1;
# now test for a bug in drop database - it is important that the name
# of the table is the same as the name of the database - in the original
# code this triggered a bug
-drop database if exists mysqltest;
create database mysqltest;
drop database if exists mysqltest;
create database mysqltest;
diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test
index 105612bf238..689b061f88d 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 1265
+--error 1266
select * from t1 where a in (b);
---error 1268
-select * from t1 where a in (b,c);
--error 1269
+select * from t1 where a in (b,c);
+--error 1270
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_set.test b/mysql-test/t/func_set.test
index e462e0a96c3..b152c94096c 100644
--- a/mysql-test/t/func_set.test
+++ b/mysql-test/t/func_set.test
@@ -15,6 +15,7 @@ select export_set(9,"Y","N","-",5),export_set(9,"Y","N"),export_set(9,"Y","N",""
select elt(2,1),field(NULL,"a","b","c");
select find_in_set("","a,b,c"),find_in_set("","a,b,c,"),find_in_set("",",a,b,c");
select find_in_set("abc","abc"),find_in_set("ab","abc"),find_in_set("abcd","abc");
+select interval(null, 1, 10, 100);
#
# test for a bug with elt()
@@ -33,4 +34,3 @@ insert into t2 values (1,1),(2,1),(3,1),(4,2);
select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id;
select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id order by one.id;
drop table t1,t2;
-select interval(null, 1, 10, 100);
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 14267976104..b421f47e5b8 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -143,20 +143,20 @@ select 1=_latin1'1';
select _latin1'1'=1;
select _latin2'1'=1;
select 1=_latin2'1';
---error 1265
+--error 1266
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 1265
+--error 1266
select row('A' COLLATE latin1_general_ci,'b','c') = row('a' COLLATE latin1_bin,'b','c');
---error 1265
+--error 1266
select concat(_latin1'a',_latin2'a');
---error 1268
-select concat(_latin1'a',_latin2'a',_latin5'a');
--error 1269
+select concat(_latin1'a',_latin2'a',_latin5'a');
+--error 1270
select concat(_latin1'a',_latin2'a',_latin5'a',_latin7'a');
@@ -167,9 +167,9 @@ 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 1268
+--error 1269
select FIELD(_latin2'b','A','B');
---error 1268
+--error 1269
select FIELD('b',_latin2'A','B');
select FIELD('b',_latin2'A','B',1);
@@ -177,55 +177,55 @@ 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 1265
+--error 1266
select POSITION(_latin1'B' COLLATE latin1_general_ci IN _latin1'abcd' COLLATE latin1_bin);
---error 1265
+--error 1266
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 1265
+--error 1266
select FIND_IN_SET(_latin1'B' COLLATE latin1_general_ci,_latin1'a,b,c,d' COLLATE latin1_bin);
---error 1265
+--error 1266
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 1265
+--error 1266
select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin2'd',2);
---error 1265
+--error 1266
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 1268
+--error 1269
select _latin2'B' between _latin1'a' and _latin1'b';
---error 1268
+--error 1269
select _latin1'B' between _latin2'a' and _latin1'b';
---error 1268
+--error 1269
select _latin1'B' between _latin1'a' and _latin2'b';
---error 1268
+--error 1269
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 1268
+--error 1269
select _latin2'B' in (_latin1'a',_latin1'b');
---error 1268
+--error 1269
select _latin1'B' in (_latin2'a',_latin1'b');
---error 1268
+--error 1269
select _latin1'B' in (_latin1'a',_latin2'b');
---error 1268
+--error 1269
select _latin1'B' COLLATE latin1_general_ci in (_latin1'a' COLLATE latin1_bin,_latin1'b');
---error 1268
+--error 1269
select _latin1'B' COLLATE latin1_general_ci in (_latin1'a',_latin1'b' COLLATE latin1_bin);
select collation(bin(130)), coercibility(bin(130));
@@ -311,7 +311,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 1265
+--error 1266
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 4f44ec8fef1..ae1963dd3f5 100644
--- a/mysql-test/t/func_test.test
+++ b/mysql-test/t/func_test.test
@@ -26,6 +26,14 @@ select * from t1 where 1 xor 1;
drop table t1;
#
+# Wrong usage of functions
+#
+
+select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1;
+select 1 and 2 between 2 and 10, 2 between 2 and 10 and 1;
+select 1 and 0 or 2, 2 or 1 and 0;
+
+#
# Coercibility
#
select _koi8r'a' = _koi8r'A';
@@ -33,9 +41,9 @@ 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 1265
+--error 1266
select _koi8r'a' COLLATE koi8r_bin = _koi8r'A' COLLATE koi8r_general_ci;
---error 1265
+--error 1266
select _koi8r'a' = _latin1'A';
select strcmp(_koi8r'a', _koi8r'A');
@@ -43,9 +51,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 1265
+--error 1266
select strcmp(_koi8r'a' COLLATE koi8r_general_ci, _koi8r'A' COLLATE koi8r_bin);
---error 1265
+--error 1266
select strcmp(_koi8r'a', _latin1'A');
select _koi8r'a' LIKE _koi8r'A';
@@ -53,17 +61,7 @@ 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 1265
+--error 1266
select _koi8r'a' COLLATE koi8r_general_ci LIKE _koi8r'A' COLLATE koi8r_bin;
---error 1265
+--error 1266
select _koi8r'a' LIKE _latin1'A';
-
-
-
-#
-# Wrong usage of functions
-#
-
-select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1;
-select 1 and 2 between 2 and 10, 2 between 2 and 10 and 1;
-select 1 and 0 or 2, 2 or 1 and 0;
diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test
index b1338b790fd..f48ada33866 100644
--- a/mysql-test/t/grant.test
+++ b/mysql-test/t/grant.test
@@ -1,9 +1,10 @@
+# Test of GRANT commands
+
+# Cleanup
--disable_warnings
drop table if exists t1;
--enable_warnings
-create table t1 (a int);
-
#
# Test that SSL options works properly
#
@@ -74,13 +75,19 @@ delete from mysql.tables_priv where user='mysqltest_1';
delete from mysql.columns_priv where user='mysqltest_1';
flush privileges;
drop table t1;
+
+#
+# Test some error conditions
+#
--error 1221
GRANT FILE on mysqltest.* to mysqltest_1@localhost;
+select 1; -- To test that the previous command didn't cause problems
#
# Test for 'drop user', 'revoke privileges, grant'
#
+create table t1 (a int);
grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION;
show grants for drop_user2@localhost;
revoke all privileges, grant from drop_user2@localhost;
@@ -93,19 +100,18 @@ 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 1267
+--error 1268
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 1266
+--error 1267
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,
drop_user3@localhost, drop_user4@localhost;
drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost,
drop_user4@localhost;
-
drop table t1;
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index d99c7a87f88..1153622a40f 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -132,7 +132,7 @@ CREATE TABLE t1 (
assigned_to mediumint(9) DEFAULT '0' NOT NULL,
bug_file_loc text,
bug_severity enum('blocker','critical','major','normal','minor','trivial','enhancement') DEFAULT 'blocker' NOT NULL,
- bug_status enum('NEW','ASSIGNED','REOPENED','RESOLVED','VERIFIED','CLOSED') DEFAULT 'NEW' NOT NULL,
+ bug_status enum('','NEW','ASSIGNED','REOPENED','RESOLVED','VERIFIED','CLOSED') DEFAULT 'NEW' NOT NULL,
creation_ts datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
delta_ts timestamp(14),
short_desc mediumtext,
diff --git a/mysql-test/t/handler.test b/mysql-test/t/handler.test
index 09dd06c817c..99ca858990c 100644
--- a/mysql-test/t/handler.test
+++ b/mysql-test/t/handler.test
@@ -86,9 +86,8 @@ handler t2 read first;
drop table t1;
#
-# test case for the bug #787
+# Test case for the bug #787
#
-
create table t1 (a int);
insert into t1 values (1),(2),(3),(4),(5),(6);
delete from t1 limit 2;
@@ -101,7 +100,7 @@ handler t1 read first;
drop table t1;
#
-#test for #751
+# Test for #751
#
create table t1(a int, index(a));
insert into t1 values (1), (2), (3);
@@ -111,4 +110,3 @@ handler t1 read a=(W);
--error 1210
handler t1 read a=(a);
drop table t1;
-
diff --git a/mysql-test/t/heap.test b/mysql-test/t/heap.test
index c708ea2baf6..797472e7769 100644
--- a/mysql-test/t/heap.test
+++ b/mysql-test/t/heap.test
@@ -105,7 +105,7 @@ insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("a"),("
explain select * from t1 where btn like "q%";
select * from t1 where btn like "q%";
alter table t1 add column new_col char(1) not null, add key (btn,new_col), drop key btn;
-update t1 set new_col=btn;
+update t1 set new_col=left(btn,1);
explain select * from t1 where btn="a";
explain select * from t1 where btn="a" and new_col="a";
drop table t1;
diff --git a/mysql-test/t/heap_btree.test b/mysql-test/t/heap_btree.test
index 80a7753d4b1..34aeeec0a11 100644
--- a/mysql-test/t/heap_btree.test
+++ b/mysql-test/t/heap_btree.test
@@ -113,7 +113,7 @@ insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("a"),("
explain select * from t1 where btn like "q%";
select * from t1 where btn like "q%";
alter table t1 add column new_col char(1) not null, add key using BTREE (btn,new_col), drop key btn;
-update t1 set new_col=btn;
+update t1 set new_col=left(btn,1);
explain select * from t1 where btn="a";
explain select * from t1 where btn="a" and new_col="a";
drop table t1;
diff --git a/mysql-test/t/heap_hash.test b/mysql-test/t/heap_hash.test
index 7b375fdfa3c..f339a10efc6 100644
--- a/mysql-test/t/heap_hash.test
+++ b/mysql-test/t/heap_hash.test
@@ -105,7 +105,7 @@ insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("a"),("
explain select * from t1 where btn like "q%";
select * from t1 where btn like "q%";
alter table t1 add column new_col char(1) not null, add key using HASH (btn,new_col), drop key btn;
-update t1 set new_col=btn;
+update t1 set new_col=left(btn,1);
explain select * from t1 where btn="a";
explain select * from t1 where btn="a" and new_col="a";
drop table t1;
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index 5ca357efe90..6e7eb0ea06f 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -489,8 +489,8 @@ DROP TABLE t1;
#
# Test prefix key
#
---error 1089
create table t1 (a char(20), unique (a(5))) type=innodb;
+drop table t1;
create table t1 (a char(20), index (a(5))) type=innodb;
show create table t1;
drop table t1;
diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test
index 4ac5a69a508..556b1ac9c8f 100644
--- a/mysql-test/t/insert_select.test
+++ b/mysql-test/t/insert_select.test
@@ -87,7 +87,6 @@ let $VERSION=`select version()`;
--replace_result $VERSION VERSION
show binlog events;
drop table t1, t2;
-drop table if exists t1, t2;
#
# Test of insert ... select from same table
diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test
index de97c639812..3b4cd7358cc 100644
--- a/mysql-test/t/key.test
+++ b/mysql-test/t/key.test
@@ -1,10 +1,11 @@
-#
-# This failed for Elizabeth Mattijsen
-#
-
--disable_warnings
drop table if exists t1,t2,t3;
--enable_warnings
+SET SQL_WARNINGS=1;
+
+#
+# This failed for Elizabeth Mattijsen
+#
CREATE TABLE t1 (
ID CHAR(32) NOT NULL,
diff --git a/mysql-test/t/key_cache.test b/mysql-test/t/key_cache.test
index 2da18b68624..fb6b6b0027f 100644
--- a/mysql-test/t/key_cache.test
+++ b/mysql-test/t/key_cache.test
@@ -38,5 +38,5 @@ SET @@global.key_buffer_size=@save_key_buffer;
--error 1064
SELECT @@default.key_buffer_size;
---error 1270
+--error 1271
SELECT @@skr.table_type="test";
diff --git a/mysql-test/t/lock_tables_lost_commit-master.opt b/mysql-test/t/lock_tables_lost_commit-master.opt
index d357a51cb27..51ccb915ef0 100644
--- a/mysql-test/t/lock_tables_lost_commit-master.opt
+++ b/mysql-test/t/lock_tables_lost_commit-master.opt
@@ -1 +1 @@
---binlog-ignore-db=test innodb \ No newline at end of file
+--binlog-ignore-db=test
diff --git a/mysql-test/t/lock_tables_lost_commit.test b/mysql-test/t/lock_tables_lost_commit.test
index a12ee7369cb..a8a7a65bd76 100644
--- a/mysql-test/t/lock_tables_lost_commit.test
+++ b/mysql-test/t/lock_tables_lost_commit.test
@@ -4,7 +4,9 @@ connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
connection con1;
+--disable_warnings
drop table if exists t1;
+--enable_warnings
create table t1(a int) type=innodb;
lock tables t1 write;
insert into t1 values(10);
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 80d46d1ef0c..5267b57259b 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -6,6 +6,7 @@
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
+SET SQL_WARNINGS=1;
#
# Test problem with CHECK TABLE;
@@ -33,11 +34,13 @@ create table t1 (a tinyint not null auto_increment, b blob not null, primary key
let $1=100;
disable_query_log;
+SET SQL_WARNINGS=0;
while ($1)
{
eval insert into t1 (b) values(repeat(char(65+$1),65550-$1));
dec $1;
}
+SET SQL_WARNINGS=1;
enable_query_log;
check table t1;
repair table t1;
diff --git a/mysql-test/t/row.test b/mysql-test/t/row.test
index fb5fff86b11..252830cfc98 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 1239
+-- error 1240
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)));
@@ -36,12 +36,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 1239
+-- error 1240
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 1239
+-- error 1240
SELECT ROW('test',2,ROW(3,33))=ROW('test',2,4);
create table t1 ( a int, b int, c int);
@@ -55,15 +55,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 1239
+-- error 1240
select ROW(1,1);
create table t1 (i int);
--- error 1239
+-- error 1240
select 1 from t1 where ROW(1,1);
--- error 1239
+-- error 1240
select count(*) from t1 order by ROW(1,1);
--- error 1239
+-- error 1240
select count(*) from t1 having (1,1) order by i;
drop table t1;
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index 1d7da94d455..a23db3584de 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 SELECT (SELECT 1) UNION SELECT (SELECT 2);
SELECT (SELECT (SELECT 0 UNION SELECT 0));
explain SELECT (SELECT (SELECT 0 UNION SELECT 0));
--- error 1245
+-- error 1246
SELECT (SELECT 1 FROM (SELECT 1) as b HAVING a=1) as a;
--- error 1245
+-- error 1246
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 1245
+-- error 1246
SELECT (SELECT a) as a;
EXPLAIN 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 1239
+-- error 1240
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 1239
+-- error 1240
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 1245
+-- error 1246
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;
@@ -102,9 +102,9 @@ select * from t3 where a < all (select b from t2);
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 1239
+-- error 1240
select * from t3 where a in (select a,b from t2);
--- error 1239
+-- error 1240
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
@@ -120,7 +120,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 select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2;
--- error 1240
+-- error 1241
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));
@@ -157,14 +157,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 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 1239
+-- error 1240
SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo,email FROM
t8 WHERE pseudo='joce');
--- error 1239
+-- error 1240
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 1240
+-- error 1241
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;
@@ -184,7 +184,7 @@ EXPLAIN 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 1240
+-- error 1241
SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION ALL SELECT 1) UNION SELECT 1;
EXPLAIN SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION SELECT 1);
drop table t1;
@@ -241,9 +241,9 @@ CREATE TABLE `t1` (
) TYPE=MyISAM ROW_FORMAT=FIXED;
INSERT INTO t1 (numeropost,maxnumrep) VALUES (1,0),(2,1);
--- error 1240
+-- error 1241
select numeropost as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1);
--- error 1240
+-- error 1241
select numeropost as a FROM t1 ORDER BY (SELECT 1 FROM t1 HAVING a=1);
drop table t1;
@@ -255,7 +255,7 @@ drop table t1;
#iftest
CREATE TABLE t1 (field char(1) NOT NULL DEFAULT 'b');
INSERT INTO t1 VALUES ();
--- error 1240
+-- error 1241
SELECT field FROM t1 WHERE 1=(SELECT 1 UNION ALL SELECT 1 FROM (SELECT 1) a HAVING field='b');
drop table t1;
@@ -268,13 +268,13 @@ CREATE TABLE `t1` (
UNIQUE KEY `numreponse` (`numreponse`),
KEY `pseudo` (`pseudo`,`numeropost`)
) TYPE=MyISAM;
--- error 1245
+-- error 1246
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 1240
+-- error 1241
EXPLAIN SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM t1 WHERE numeropost='1');
EXPLAIN SELECT MAX(numreponse) FROM t1 WHERE numeropost='1';
EXPLAIN SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT MAX(numreponse) FROM t1 WHERE numeropost='1');
@@ -293,7 +293,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 1240
+-- error 1241
update t1 set b= (select b from t2);
update t1 set b= (select b from t2 where t1.a = t2.a);
select * from t1;
@@ -308,7 +308,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 1240
+-- error 1241
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;
@@ -326,7 +326,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 1240
+-- error 1241
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;
@@ -341,7 +341,7 @@ insert into t2 values (1);
insert into t3 values (1),(2);
-- error 1093
INSERT INTO t1 (x) VALUES ((SELECT x FROM t1));
--- error 1240
+-- error 1241
INSERT INTO t1 (x) VALUES ((SELECT b FROM t3));
INSERT INTO t1 (x) VALUES ((SELECT a FROM t2));
select * from t1;
@@ -351,7 +351,6 @@ INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2));
select * from t1;
INSERT INTO t1 (x) select (SELECT SUM(a)+1 FROM t2) FROM t2;
select * from t1;
--- error 1093
INSERT INTO t1 (x) select (SELECT SUM(x)+2 FROM t1) FROM t2;
-- error 1054
INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t2));
@@ -373,7 +372,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 1240
+-- error 1241
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 +408,7 @@ INSERT INTO t2 VALUES ((SELECT id FROM t2));
SELECT * FROM t2;
CREATE TABLE t1 (id int(11) default NULL, KEY id (id)) TYPE=MyISAM CHARSET=latin1;
INSERT INTO t1 values (1),(1);
--- error 1240
+-- error 1241
UPDATE t2 SET id=(SELECT * FROM t1);
drop table t2, t1;
@@ -688,7 +687,7 @@ INSERT INTO t1 VALUES (1);
UPDATE t1 SET i=i+(SELECT MAX(i) FROM (SELECT 1) t) WHERE i=(SELECT MAX(i));
-- error 1111
UPDATE t1 SET i=i+1 WHERE i=(SELECT MAX(i));
---error 1109
+-- error 1109
UPDATE t1 SET t.i=i+(SELECT MAX(i) FROM (SELECT 1) t);
drop table t1;
diff --git a/mysql-test/t/type_decimal.test b/mysql-test/t/type_decimal.test
index acbc738995f..36bd8eb48e4 100644
--- a/mysql-test/t/type_decimal.test
+++ b/mysql-test/t/type_decimal.test
@@ -3,6 +3,7 @@
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
+SET SQL_WARNINGS=1;
CREATE TABLE t1 (
id int(11) NOT NULL auto_increment,
diff --git a/mysql-test/t/type_ranges.test b/mysql-test/t/type_ranges.test
index ea7fa7be8c1..09b5867e7a8 100644
--- a/mysql-test/t/type_ranges.test
+++ b/mysql-test/t/type_ranges.test
@@ -5,6 +5,7 @@
--disable_warnings
drop table if exists t1,t2,t3;
--enable_warnings
+SET SQL_WARNINGS=1;
CREATE TABLE t1 (
auto int(5) unsigned NOT NULL auto_increment,
diff --git a/mysql-test/t/type_uint.test b/mysql-test/t/type_uint.test
index b4c88eae95d..ee5f5e8123b 100644
--- a/mysql-test/t/type_uint.test
+++ b/mysql-test/t/type_uint.test
@@ -5,6 +5,7 @@
--disable_warnings
drop table if exists t1;
--enable_warnings
+SET SQL_WARNINGS=1;
create table t1 (this int unsigned);
insert into t1 values (1);
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index 16a192f1276..22f8406cba5 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -120,7 +120,7 @@ set SESSION query_cache_size=10000;
set GLOBAL table_type=DEFAULT;
--error 1115
set character_set_client=UNKNOWN_CHARACTER_SET;
---error 1271
+--error 1272
set collation_connection=UNKNOWN_COLLATION;
--error 1228
set global autocommit=1;
diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test
index 41aa02e925f..050449f0f5b 100644
--- a/mysql-test/t/warnings.test
+++ b/mysql-test/t/warnings.test
@@ -4,6 +4,7 @@
--disable-warnings
drop table if exists t1, t2;
--enable-warnings
+SET SQL_WARNINGS=1;
create table t1 (a int);
insert into t1 values (1);