summaryrefslogtreecommitdiff
path: root/mysql-test/r
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/r
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/r')
-rw-r--r--mysql-test/r/auto_increment.result7
-rw-r--r--mysql-test/r/convert.result17
-rw-r--r--mysql-test/r/create.result6
-rw-r--r--mysql-test/r/ctype_latin1_de.result3
-rw-r--r--mysql-test/r/distinct.result4
-rw-r--r--mysql-test/r/drop.result6
-rw-r--r--mysql-test/r/fulltext.result46
-rw-r--r--mysql-test/r/func_gconcat.result4
-rw-r--r--mysql-test/r/func_str.result6
-rw-r--r--mysql-test/r/func_test.result28
-rw-r--r--mysql-test/r/grant.result40
-rw-r--r--mysql-test/r/group_by.result60
-rw-r--r--mysql-test/r/handler.result23
-rw-r--r--mysql-test/r/heap.result12
-rw-r--r--mysql-test/r/heap_btree.result8
-rw-r--r--mysql-test/r/heap_hash.result10
-rw-r--r--mysql-test/r/innodb.result61
-rw-r--r--mysql-test/r/insert.result4
-rw-r--r--mysql-test/r/insert_select.result7
-rw-r--r--mysql-test/r/join_outer.result2
-rw-r--r--mysql-test/r/key.result17
-rw-r--r--mysql-test/r/key_cache.result2
-rw-r--r--mysql-test/r/loaddata.result20
-rw-r--r--mysql-test/r/myisam.result37
-rw-r--r--mysql-test/r/null.result20
-rw-r--r--mysql-test/r/null_key.result4
-rw-r--r--mysql-test/r/order_by.result14
-rw-r--r--mysql-test/r/rpl_do_grant.result4
-rw-r--r--mysql-test/r/rpl_error_ignored_table.result10
-rw-r--r--mysql-test/r/rpl_ignore_grant.result6
-rw-r--r--mysql-test/r/rpl_loaddata.result12
-rw-r--r--mysql-test/r/rpl_log.result2
-rw-r--r--mysql-test/r/rpl_log_pos.result4
-rw-r--r--mysql-test/r/rpl_max_relay_size.result30
-rw-r--r--mysql-test/r/rpl_replicate_do.result2
-rw-r--r--mysql-test/r/rpl_reset_slave.result20
-rw-r--r--mysql-test/r/rpl_rotate_logs.result4
-rw-r--r--mysql-test/r/rpl_user_variables.result12
-rw-r--r--mysql-test/r/select.result56
-rw-r--r--mysql-test/r/select_safe.result14
-rw-r--r--mysql-test/r/subselect.result29
-rw-r--r--mysql-test/r/type_blob.result6
-rw-r--r--mysql-test/r/type_decimal.result109
-rw-r--r--mysql-test/r/type_float.result4
-rw-r--r--mysql-test/r/type_ranges.result66
-rw-r--r--mysql-test/r/type_time.result6
-rw-r--r--mysql-test/r/type_uint.result3
-rw-r--r--mysql-test/r/union.result9
-rw-r--r--mysql-test/r/warnings.result91
49 files changed, 467 insertions, 500 deletions
diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result
index 03cfcc50e17..8c898bae699 100644
--- a/mysql-test/r/auto_increment.result
+++ b/mysql-test/r/auto_increment.result
@@ -1,4 +1,5 @@
drop table if exists t1;
+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);
delete from t1 where a=4;
@@ -130,7 +131,7 @@ last_insert_id()
255
insert into t1 set i = null;
Warnings:
-Warning 1262 Data truncated, out of range for column 'i' at row 1
+Warning 1263 Data truncated, out of range for column 'i' at row 1
select last_insert_id();
last_insert_id()
255
@@ -181,7 +182,7 @@ a b
delete from t1 where a=0;
update t1 set a=NULL where b=6;
Warnings:
-Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 4
+Warning 1262 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);
@@ -223,7 +224,7 @@ a b
delete from t1 where a=0;
update t1 set a=NULL where b=13;
Warnings:
-Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 9
+Warning 1262 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/convert.result b/mysql-test/r/convert.result
deleted file mode 100644
index f8dad8c69ba..00000000000
--- a/mysql-test/r/convert.result
+++ /dev/null
@@ -1,17 +0,0 @@
-select @@convert_character_set;
-@@convert_character_set
-
-select @@global.convert_character_set;
-@@global.convert_character_set
-
-show variables like "%convert_character_set%";
-Variable_name Value
-convert_character_set
-SET CHARACTER SET cp1251_koi8;
-select @@convert_character_set;
-@@convert_character_set
-cp1251_koi8
-SET CHARACTER SET DEFAULT;
-select @@convert_character_set;
-@@convert_character_set
-
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 2f907880cbe..b51836f39e0 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -10,7 +10,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 1261 Data truncated, NULL supplied to NOT NULL column 'b' at row 2
+Warning 1262 Data truncated, NULL supplied to NOT NULL column 'b' at row 2
select * from t1;
b
@@ -193,7 +193,7 @@ SELECT @@table_type;
GEMINI
CREATE TABLE t1 (a int not null);
Warnings:
-Warning 1264 Using storage engine MYISAM for table 't1'
+Warning 1265 Using storage engine MYISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -302,7 +302,7 @@ SELECT @@table_type;
GEMINI
CREATE TABLE t1 (a int not null);
Warnings:
-Warning 1264 Using storage engine MYISAM for table 't1'
+Warning 1265 Using storage engine MYISAM for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/ctype_latin1_de.result b/mysql-test/r/ctype_latin1_de.result
index 7f116c1fc52..3db2f3d5519 100644
--- a/mysql-test/r/ctype_latin1_de.result
+++ b/mysql-test/r/ctype_latin1_de.result
@@ -1,3 +1,6 @@
+select @@collation_connection;
+@@collation_connection
+latin1_german2_ci
drop table if exists t1;
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');
diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result
index 3c6769e797b..c7ce157a670 100644
--- a/mysql-test/r/distinct.result
+++ b/mysql-test/r/distinct.result
@@ -173,9 +173,9 @@ INSERT INTO t2 values (1),(2),(3);
INSERT INTO t3 VALUES (1,'1'),(2,'2'),(1,'1'),(2,'2');
explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 2 Using temporary
-1 SIMPLE t2 ref a a 4 test.t1.a 2 Using index
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4 Using temporary
1 SIMPLE t3 ref a a 5 test.t1.b 2 Using where; Using index
+1 SIMPLE t2 index a a 4 NULL 4 Using where; Using index; Distinct
SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
a
1
diff --git a/mysql-test/r/drop.result b/mysql-test/r/drop.result
index 6029cc90d1d..367b28e9bf7 100644
--- a/mysql-test/r/drop.result
+++ b/mysql-test/r/drop.result
@@ -1,4 +1,5 @@
drop table if exists t1;
+drop database if exists mysqltest;
drop table t1;
ERROR 42S02: Unknown table 't1'
create table t1(n int);
@@ -11,9 +12,6 @@ drop table t1;
select * from t1;
n
1
-drop database if exists mysqltest;
-Warnings:
-Note 1008 Can't drop database 'mysqltest'; database doesn't exist
create database mysqltest;
drop database if exists mysqltest;
create database mysqltest;
@@ -25,8 +23,6 @@ n
drop database if exists mysqltest;
create database mysqltest;
drop database mysqltest;
-Warnings:
-Note 1008 Can't drop database 'mysqltest'; database doesn't exist
flush tables with read lock;
create database mysqltest;
Got one of the listed errors
diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result
index 157beec2c01..e2d35973383 100644
--- a/mysql-test/r/fulltext.result
+++ b/mysql-test/r/fulltext.result
@@ -23,6 +23,36 @@ a b
Only MyISAM tables support collections
Full-text indexes are called collections
Full-text indexes are called collections
+explain select * from t1 where MATCH(a,b) AGAINST ("collections");
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 fulltext a a 0 1 Using where
+explain select * from t1 where MATCH(a,b) AGAINST ("collections")>0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 fulltext a a 0 1 Using where
+explain select * from t1 where MATCH(a,b) AGAINST ("collections")>1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 fulltext a a 0 1 Using where
+explain select * from t1 where MATCH(a,b) AGAINST ("collections")>=0;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain select * from t1 where MATCH(a,b) AGAINST ("collections")>=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 fulltext a a 0 1 Using where
+explain select * from t1 where 0<MATCH(a,b) AGAINST ("collections");
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 fulltext a a 0 1 Using where
+explain select * from t1 where 1<MATCH(a,b) AGAINST ("collections");
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 fulltext a a 0 1 Using where
+explain select * from t1 where 0<=MATCH(a,b) AGAINST ("collections");
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+explain select * from t1 where 1<=MATCH(a,b) AGAINST ("collections");
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 fulltext a a 0 1 Using where
+explain select * from t1 where MATCH(a,b) AGAINST ("collections")>0 and a like '%ll%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 fulltext a a 0 1 Using where
select * from t1 where MATCH(a,b) AGAINST("support -collections" IN BOOLEAN MODE);
a b
MySQL has now support for full-text search
@@ -97,6 +127,11 @@ select * from t1 where MATCH b AGAINST ("sear*" IN BOOLEAN MODE);
a b
MySQL has now support for full-text search
Function MATCH ... AGAINST() is used to do a search
+select * from t1 where MATCH(a,b) AGAINST ("collections") UNION ALL select * from t1 where MATCH(a,b) AGAINST ("indexes");
+a b
+Only MyISAM tables support collections
+Full-text indexes are called collections
+Full-text indexes are called collections
delete from t1 where a like "MySQL%";
update t1 set a='some test foobar' where MATCH a,b AGAINST ('model');
delete from t1 where MATCH(a,b) AGAINST ("indexes");
@@ -226,3 +261,14 @@ select ref_mag from t1 where match ref_mag against ('+test' in boolean mode);
ref_mag
test
drop table t1;
+create table t1 (t1_id int(11) primary key, name varchar(32));
+insert into t1 values (1, 'data1');
+insert into t1 values (2, 'data2');
+create table t2 (t2_id int(11) primary key, t1_id int(11), name varchar(32));
+insert into t2 values (1, 1, 'xxfoo');
+insert into t2 values (2, 1, 'xxbar');
+insert into t2 values (3, 1, 'xxbuz');
+select * from t1 join t2 using(`t1_id`) where match (t1.name, t2.name) against('xxfoo' in boolean mode);
+t1_id name t2_id t1_id name
+1 data1 1 1 xxfoo
+drop table t1,t2;
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result
index 15b406bcdda..a4493e7c95c 100644
--- a/mysql-test/r/func_gconcat.result
+++ b/mysql-test/r/func_gconcat.result
@@ -148,10 +148,10 @@ grp group_concat(c)
4
5 NULL
Warnings:
-Warning 1258 1 line(s) was(were) cut by group_concat()
+Warning 1259 1 line(s) was(were) cut by group_concat()
show warnings;
Level Code Message
-Warning 1258 1 line(s) was(were) cut by group_concat()
+Warning 1259 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_str.result b/mysql-test/r/func_str.result
index 06f63b525cd..82f68cdaa84 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -496,7 +496,7 @@ insert(_latin2'abcd',2,3,_latin2'ef'),
replace(_latin2'abcd',_latin2'b',_latin2'B')
;
Warnings:
-Warning 1263 Data truncated for column 'format(130,10)' at row 1
+Warning 1264 Data truncated for column 'format(130,10)' at row 1
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -571,9 +571,7 @@ elt(status_wnio,data_podp)
NULL
NULL
DROP TABLE t1;
-CREATE TABLE t1 (
-title text
-) TYPE=MyISAM;
+CREATE TABLE t1 (title text) TYPE=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;
diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result
index 9ae7b0c3ef1..e3a0d066a85 100644
--- a/mysql-test/r/func_test.result
+++ b/mysql-test/r/func_test.result
@@ -52,6 +52,20 @@ select 10 % 7, 10 mod 7, 10 div 3;
select (1 << 64)-1, ((1 << 64)-1) DIV 1, ((1 << 64)-1) DIV 2;
(1 << 64)-1 ((1 << 64)-1) DIV 1 ((1 << 64)-1) DIV 2
18446744073709551615 18446744073709551615 9223372036854775807
+create table t1 (a int);
+insert t1 values (1);
+select * from t1 where 1 xor 1;
+a
+drop table t1;
+select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1;
+5 between 0 and 10 between 0 and 1 (5 between 0 and 10) between 0 and 1
+0 1
+select 1 and 2 between 2 and 10, 2 between 2 and 10 and 1;
+1 and 2 between 2 and 10 2 between 2 and 10 and 1
+1 1
+select 1 and 0 or 2, 2 or 1 and 0;
+1 and 0 or 2 2 or 1 and 0
+1 1
select _koi8r'a' = _koi8r'A';
_koi8r'a' = _koi8r'A'
1
@@ -109,17 +123,3 @@ select _koi8r'a' COLLATE koi8r_general_ci LIKE _koi8r'A' COLLATE koi8r_bin;
ERROR HY000: Illegal mix of collations (koi8r_general_ci,EXPLICIT) and (koi8r_bin,EXPLICIT) for operation 'like'
select _koi8r'a' LIKE _latin1'A';
ERROR HY000: Illegal mix of collations (koi8r_general_ci,COERCIBLE) and (latin1_swedish_ci,COERCIBLE) for operation 'like'
-create table t1 (a int);
-insert t1 values (1);
-select * from t1 where 1 xor 1;
-a
-drop table t1;
-select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1;
-5 between 0 and 10 between 0 and 1 (5 between 0 and 10) between 0 and 1
-0 1
-select 1 and 2 between 2 and 10, 2 between 2 and 10 and 1;
-1 and 2 between 2 and 10 2 between 2 and 10 and 1
-1 1
-select 1 and 0 or 2, 2 or 1 and 0;
-1 and 0 or 2 2 or 1 and 0
-1 1
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result
index 09c2b2042b3..7d3aeb62227 100644
--- a/mysql-test/r/grant.result
+++ b/mysql-test/r/grant.result
@@ -1,5 +1,4 @@
drop table if exists t1;
-create table t1 (a int);
delete from mysql.user where user='mysqltest_1';
delete from mysql.db where user='mysqltest_1';
flush privileges;
@@ -108,4 +107,41 @@ delete from mysql.columns_priv where user='mysqltest_1';
flush privileges;
drop table t1;
GRANT FILE on mysqltest.* to mysqltest_1@localhost;
-Wrong usage of DB GRANT and GLOBAL PRIVILEGES
+ERROR HY000: Wrong usage of DB GRANT and GLOBAL PRIVILEGES
+select 1;
+1
+1
+create table t1 (a int);
+grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION;
+show grants for drop_user2@localhost;
+Grants for drop_user2@localhost
+GRANT ALL PRIVILEGES ON *.* TO 'drop_user2'@'localhost' WITH GRANT OPTION
+revoke all privileges, grant from drop_user2@localhost;
+drop user drop_user2@localhost;
+grant ALL PRIVILEGES on *.* to drop_user@localhost with GRANT OPTION;
+grant ALL PRIVILEGES on test.* to drop_user@localhost with GRANT OPTION;
+grant select(a) on test.t1 to drop_user@localhost;
+show grants for drop_user@localhost;
+Grants for drop_user@localhost
+GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION
+GRANT ALL PRIVILEGES ON `test`.* TO 'drop_user'@'localhost' WITH GRANT OPTION
+GRANT SELECT (a) ON `test`.`t1` TO 'drop_user'@'localhost'
+revoke all privileges, grant from drop_user@localhost;
+show grants for drop_user@localhost;
+Grants for drop_user@localhost
+GRANT USAGE ON *.* TO 'drop_user'@'localhost'
+drop user drop_user@localhost;
+revoke all privileges, grant from drop_user@localhost;
+ERROR HY000: Can't revoke all privileges, grant for one or more of the requested users
+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;
+drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost,
+drop_user4@localhost;
+ERROR HY000: Can't drop one or more of the requested users
+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/r/group_by.result b/mysql-test/r/group_by.result
index de0407a8907..3cb9c59cc57 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -115,7 +115,7 @@ groupset bigint(20) DEFAULT '0' NOT NULL,
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,
@@ -150,92 +150,34 @@ KEY qa_contact (qa_contact),
KEY votes (votes)
);
INSERT INTO t1 VALUES (1,0,0,'','normal','','2000-02-10 09:25:12',20000321114747,'','','Linux','P1','TestProduct','PC',3,'other','TestComponent','','M1',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (9,0,0,'','enhancement','','2000-03-10 11:49:36',20000321114747,'','','All','P5','AAAAA','PC',3,'2.00 CD - Pre','BBBBBBBBBBBBB - conversion','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (10,0,0,'','enhancement','','2000-03-10 18:10:16',20000321114747,'','','All','P4','AAAAA','PC',3,'2.00 CD - Pre','BBBBBBBBBBBBB - conversion','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (7,0,0,'','critical','','2000-03-09 10:50:21',20000321114747,'','','All','P1','AAAAA','PC',3,'2.00 CD - Pre','BBBBBBBBBBBBB - generic','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (6,0,0,'','normal','','2000-03-09 10:42:44',20000321114747,'','','All','P2','AAAAA','PC',3,'2.00 CD - Pre','kkkkkkkkkkk lllllllllll','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (8,0,0,'','major','','2000-03-09 11:32:14',20000321114747,'','','All','P3','AAAAA','PC',3,'2.00 CD - Pre','kkkkkkkkkkk lllllllllll','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (5,0,0,'','enhancement','','2000-03-09 10:38:59',20000321114747,'','','All','P5','CCC/CCCCCC','PC',5,'7.00','Administration','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (4,0,0,'','normal','','2000-03-08 18:32:14',20000321114747,'','','other','P2','TestProduct','Other',3,'other','TestComponent2','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (3,0,0,'','normal','','2000-03-08 18:30:52',20000321114747,'','','other','P2','TestProduct','Other',3,'other','TestComponent','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (2,0,0,'','enhancement','','2000-03-08 18:24:51',20000321114747,'','','All','P2','TestProduct','Other',4,'other','TestComponent2','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (11,0,0,'','blocker','','2000-03-13 09:43:41',20000321114747,'','','All','P2','CCC/CCCCCC','PC',5,'7.00','DDDDDDDDD','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (12,0,0,'','normal','','2000-03-13 16:14:31',20000321114747,'','','All','P2','AAAAA','PC',3,'2.00 CD - Pre','kkkkkkkkkkk lllllllllll','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (13,0,0,'','normal','','2000-03-15 16:20:44',20000321114747,'','','other','P2','TestProduct','Other',3,'other','TestComponent','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (14,0,0,'','blocker','','2000-03-15 18:13:47',20000321114747,'','','All','P1','AAAAA','PC',3,'2.00 CD - Pre','BBBBBBBBBBBBB - generic','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (15,0,0,'','minor','','2000-03-16 18:03:28',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','DDDDDDDDD','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (16,0,0,'','normal','','2000-03-16 18:33:41',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','Administration','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (17,0,0,'','normal','','2000-03-16 18:34:18',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','Administration','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (18,0,0,'','normal','','2000-03-16 18:34:56',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','Administration','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (19,0,0,'','enhancement','','2000-03-16 18:35:34',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','Administration','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (20,0,0,'','enhancement','','2000-03-16 18:36:23',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','Administration','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (21,0,0,'','enhancement','','2000-03-16 18:37:23',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','Administration','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (22,0,0,'','enhancement','','2000-03-16 18:38:16',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','Administration','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (23,0,0,'','normal','','2000-03-16 18:58:12',20000321114747,'','','All','P2','CCC/CCCCCC','Other',5,'7.00','DDDDDDDDD','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (24,0,0,'','normal','','2000-03-17 11:08:10',20000321114747,'','','All','P2','AAAAAAAA-AAA','PC',3,'2.8','Web Interface','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (25,0,0,'','normal','','2000-03-17 11:10:45',20000321114747,'','','All','P2','AAAAAAAA-AAA','PC',3,'2.8','Web Interface','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (26,0,0,'','normal','','2000-03-17 11:15:47',20000321114747,'','','All','P2','AAAAAAAA-AAA','PC',3,'2.8','Web Interface','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (27,0,0,'','normal','','2000-03-17 17:45:41',20000321114747,'','','All','P2','CCC/CCCCCC','PC',5,'7.00','DDDDDDDDD','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (28,0,0,'','normal','','2000-03-20 09:51:45',20000321114747,'','','Windows NT','P2','TestProduct','PC',8,'other','TestComponent','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
INSERT INTO t1 VALUES (29,0,0,'','normal','','2000-03-20 11:15:09',20000321114747,'','','All','P5','AAAAAAAA-AAA','PC',3,'2.8','Web Interface','','',0,'',0);
-Warnings:
-Warning 1263 Data truncated for column 'bug_status' at row 1
CREATE TABLE t2 (
value tinytext,
program varchar(64),
diff --git a/mysql-test/r/handler.result b/mysql-test/r/handler.result
index bf68057a9aa..78ccf941b88 100644
--- a/mysql-test/r/handler.result
+++ b/mysql-test/r/handler.result
@@ -167,30 +167,11 @@ handler t1 read first;
a
6
drop table t1;
-create table t1 (a int);
-insert into t1 values (1),(2),(3),(4),(5),(6);
-delete from t1 limit 2;
-handler t1 open;
-handler t1 read first;
-a
-3
-handler t1 read first limit 1,1;
-a
-4
-handler t1 read first limit 2,2;
-a
-5
-6
-delete from t1 limit 3;
-handler t1 read first;
-a
-6
-drop table t1;
create table t1(a int, index(a));
insert into t1 values (1), (2), (3);
handler t1 open;
handler t1 read a=(W);
-Unknown column 'W' in 'field list'
+ERROR 42S22: Unknown column 'W' in 'field list'
handler t1 read a=(a);
-Wrong arguments to HANDLER ... READ
+ERROR HY000: Wrong arguments to HANDLER ... READ
drop table t1;
diff --git a/mysql-test/r/heap.result b/mysql-test/r/heap.result
index 4f73cfb6d72..6c5ef8f3441 100644
--- a/mysql-test/r/heap.result
+++ b/mysql-test/r/heap.result
@@ -163,13 +163,7 @@ id select_type table type possible_keys key key_len ref rows Extra
select * from t1 where btn like "q%";
btn
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;
-Warnings:
-Warning 1263 Data truncated for column 'new_col' at row 1
-Warning 1263 Data truncated for column 'new_col' at row 2
-Warning 1263 Data truncated for column 'new_col' at row 3
-Warning 1263 Data truncated for column 'new_col' at row 4
-Warning 1263 Data truncated for column 'new_col' at row 5
+update t1 set new_col=left(btn,1);
explain select * from t1 where btn="a";
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL btn NULL NULL NULL 11 Using where
@@ -209,8 +203,8 @@ key a (a)
) TYPE=HEAP;
INSERT INTO t1 VALUES (10), (10), (10);
EXPLAIN SELECT * FROM t1 WHERE a=10;
-table type possible_keys key key_len ref rows Extra
-t1 ref a a 5 const 10 Using where
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref a a 5 const 10 Using where
SELECT * FROM t1 WHERE a=10;
a
10
diff --git a/mysql-test/r/heap_btree.result b/mysql-test/r/heap_btree.result
index 1ba8d429fc4..c42c5e60675 100644
--- a/mysql-test/r/heap_btree.result
+++ b/mysql-test/r/heap_btree.result
@@ -179,13 +179,7 @@ id select_type table type possible_keys key key_len ref rows Extra
select * from t1 where btn like "q%";
btn
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;
-Warnings:
-Warning 1263 Data truncated for column 'new_col' at row 1
-Warning 1263 Data truncated for column 'new_col' at row 2
-Warning 1263 Data truncated for column 'new_col' at row 3
-Warning 1263 Data truncated for column 'new_col' at row 4
-Warning 1263 Data truncated for column 'new_col' at row 5
+update t1 set new_col=left(btn,1);
explain select * from t1 where btn="a";
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref btn btn 10 const 1 Using where
diff --git a/mysql-test/r/heap_hash.result b/mysql-test/r/heap_hash.result
index 72278c5da67..7ecd1db7447 100644
--- a/mysql-test/r/heap_hash.result
+++ b/mysql-test/r/heap_hash.result
@@ -163,16 +163,10 @@ id select_type table type possible_keys key key_len ref rows Extra
select * from t1 where btn like "q%";
btn
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;
-Warnings:
-Warning 1263 Data truncated for column 'new_col' at row 1
-Warning 1263 Data truncated for column 'new_col' at row 2
-Warning 1263 Data truncated for column 'new_col' at row 3
-Warning 1263 Data truncated for column 'new_col' at row 4
-Warning 1263 Data truncated for column 'new_col' at row 5
+update t1 set new_col=left(btn,1);
explain select * from t1 where btn="a";
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL btn NULL NULL NULL 14 Using where
+1 SIMPLE t1 ALL btn NULL NULL NULL 11 Using where
explain select * from t1 where btn="a" and new_col="a";
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref btn btn 11 const,const 10 Using where
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index 69268f1d5c5..8592393fd42 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -1,4 +1,5 @@
drop table if exists t1,t2,t3;
+drop database if exists mysqltest;
create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) type=innodb;
insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt');
select id, code, name from t1 order by id;
@@ -138,6 +139,15 @@ id parent_id level
1008 102 2
1010 102 2
1015 102 2
+explain select level from t1 where level=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref level level 1 const # Using where; Using index
+explain select level,id from t1 where level=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref level level 1 const # Using where; Using index
+explain select level,id,parent_id from t1 where level=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref level level 1 const # Using where
select level,id from t1 where level=1;
level id
1 1002
@@ -156,7 +166,7 @@ level id parent_id
1 1007 101
optimize table t1;
Table Op Msg_type Msg_text
-test.t1 optimize error The storage engine for the table doesn't support optimize
+test.t1 optimize status OK
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 0 PRIMARY 1 id A # NULL NULL BTREE
@@ -180,7 +190,7 @@ create table t1 (a int) type=innodb;
insert into t1 values (1), (2);
optimize table t1;
Table Op Msg_type Msg_text
-test.t1 optimize error The storage engine for the table doesn't support optimize
+test.t1 optimize status OK
delete from t1 where a = 1;
select * from t1;
a
@@ -202,7 +212,7 @@ Table Op Msg_type Msg_text
test.t1 analyze status OK
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 1 skr 1 a A 3 NULL NULL YES BTREE
+t1 1 skr 1 a A # NULL NULL YES BTREE
drop table t1;
create table t1 (a int,b varchar(20),key(a)) type=innodb;
insert into t1 values (1,""), (2,"testing");
@@ -345,12 +355,12 @@ CREATE TABLE t1 (a int not null, b int not null,c int not null,
key(a),primary key(a,b), unique(c),key(a),unique(b));
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 0 PRIMARY 1 a A NULL NULL NULL BTREE
-t1 0 PRIMARY 2 b A 0 NULL NULL BTREE
-t1 0 c 1 c A 0 NULL NULL BTREE
-t1 0 b 1 b A 0 NULL NULL BTREE
-t1 1 a 1 a A NULL NULL NULL BTREE
-t1 1 a_2 1 a A NULL NULL NULL BTREE
+t1 0 PRIMARY 1 a A # NULL NULL BTREE
+t1 0 PRIMARY 2 b A # NULL NULL BTREE
+t1 0 c 1 c A # NULL NULL BTREE
+t1 0 b 1 b A # NULL NULL BTREE
+t1 1 a 1 a A # NULL NULL BTREE
+t1 1 a_2 1 a A # NULL NULL BTREE
drop table t1;
create table t1 (col1 int not null, col2 char(4) not null, primary key(col1));
alter table t1 type=innodb;
@@ -586,6 +596,9 @@ id parent_id level
1009 102 2
1025 102 2
1016 102 2
+explain select level from t1 where level=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref level level 1 const # Using where; Using index
select level,id from t1 where level=1;
level id
1 1004
@@ -712,10 +725,10 @@ world 2
hello 1
optimize table t1;
Table Op Msg_type Msg_text
-test.t1 optimize error The storage engine for the table doesn't support optimize
+test.t1 optimize status OK
show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
-t1 0 PRIMARY 1 a A 2 NULL NULL BTREE
+t1 0 PRIMARY 1 a A # NULL NULL BTREE
drop table t1;
create table t1 (i int, j int ) TYPE=innodb;
insert into t1 values (1,2);
@@ -747,7 +760,7 @@ create table t1 (a int primary key,b int, c int, d int, e int, f int, g int, h
insert into t1 values (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
explain select * from t1 where a > 0 and a < 50;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL # Using where
drop table t1;
create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) type=innodb;
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
@@ -788,13 +801,13 @@ id id3
UNLOCK TABLES;
DROP TABLE t1;
create table t1 (a char(20), unique (a(5))) type=innodb;
-ERROR HY000: Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the storage engine doesn't support unique sub keys
+drop table t1;
create table t1 (a char(20), index (a(5))) type=innodb;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(20) default NULL,
- KEY `a` (`a`)
+ KEY `a` (`a`(5))
) TYPE=InnoDB CHARSET=latin1
drop table t1;
create temporary table t1 (a int not null auto_increment, primary key(a)) type=innodb;
@@ -881,28 +894,28 @@ create table t1 (a int not null, b int not null, c int not null, primary key (a)
insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
explain select * from t1 order by a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 4 NULL 4
+1 SIMPLE t1 index NULL PRIMARY 4 NULL #
explain select * from t1 order by b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL b 4 NULL 4
+1 SIMPLE t1 index NULL b 4 NULL #
explain select * from t1 order by c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort
+1 SIMPLE t1 ALL NULL NULL NULL NULL # Using filesort
explain select a from t1 order by a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 4 NULL 4 Using index
+1 SIMPLE t1 index NULL PRIMARY 4 NULL # Using index
explain select b from t1 order by b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL b 4 NULL 4 Using index
+1 SIMPLE t1 index NULL b 4 NULL # Using index
explain select a,b from t1 order by b;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL b 4 NULL 4 Using index
+1 SIMPLE t1 index NULL b 4 NULL # Using index
explain select a,b from t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL b 4 NULL 4 Using index
+1 SIMPLE t1 index NULL b 4 NULL # Using index
explain select a,b,c from t1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 4
+1 SIMPLE t1 ALL NULL NULL NULL NULL #
drop table t1;
create table t1 (t int not null default 1, key (t)) type=innodb;
desc t1;
@@ -1249,11 +1262,11 @@ count(*)
29267
explain select * from t1 where c between 1 and 10000;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range c c 5 NULL 1 Using where
+1 SIMPLE t1 range c c 5 NULL # Using where
update t1 set c=a;
explain select * from t1 where c between 1 and 10000;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL c NULL NULL NULL 29537 Using where
+1 SIMPLE t1 ALL c NULL NULL NULL # Using where
drop table t1,t2;
create table t1 (id int primary key auto_increment, fk int, index index_fk (fk)) type=innodb;
insert into t1 (id) values (null),(null),(null),(null),(null);
diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result
index 59c598265c0..b84c846b132 100644
--- a/mysql-test/r/insert.result
+++ b/mysql-test/r/insert.result
@@ -60,8 +60,10 @@ test 2
drop table t1;
create table t1 (id int NOT NULL DEFAULT 8);
insert into t1 values(NULL);
-Column 'id' cannot be 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
select * from t1;
id
1
diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result
index d5b9b9a2117..82d5ee872a2 100644
--- a/mysql-test/r/insert_select.result
+++ b/mysql-test/r/insert_select.result
@@ -64,7 +64,7 @@ bulk_insert_buffer_size 8388608
INSERT INTO t1 (numeropost,icone,contenu,pseudo,date,signature,ip)
SELECT 1718,icone,contenu,pseudo,date,signature,ip FROM t2
WHERE numeropost=9 ORDER BY numreponse ASC;
-DROP TABLE IF EXISTS t1,t2;
+DROP TABLE t1,t2;
create table t1(a int, unique(a));
insert into t1 values(2);
create table t2(a int);
@@ -76,7 +76,6 @@ show binlog events;
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
drop table t1, t2;
-drop table if exists t1, t2;
create table t1 (a int not null);
create table t2 (a int not null);
insert into t1 values (1);
@@ -566,14 +565,14 @@ a
5
5
insert into t1 select * from t1,t1;
-Not unique table/alias: 't1'
+ERROR 42000: Not unique table/alias: 't1'
drop table t1,t2;
create table t1 (a int not null primary key, b char(10));
create table t2 (a int not null, b char(10));
insert into t1 values (1,"t1:1"),(3,"t1:3");
insert into t2 values (2,"t2:2"), (3,"t2:3");
insert into t1 select * from t2;
-Duplicate entry '3' for key 1
+ERROR 23000: Duplicate entry '3' for key 1
select * from t1;
a b
1 t1:1
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result
index b7d3f94cb33..b060fdfb85c 100644
--- a/mysql-test/r/join_outer.result
+++ b/mysql-test/r/join_outer.result
@@ -663,5 +663,5 @@ create table t3 (f3 integer,f5 integer);
select * from t1
left outer join t2 using (f2)
left outer join t3 using (f3);
-Unknown column 'test.t2.f3' in 'on clause'
+ERROR 42S22: Unknown column 'test.t2.f3' in 'on clause'
drop table t1,t2,t3;
diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result
index e0b2b84ac16..89deab4bb1f 100644
--- a/mysql-test/r/key.result
+++ b/mysql-test/r/key.result
@@ -1,4 +1,5 @@
drop table if exists t1,t2,t3;
+SET SQL_WARNINGS=1;
CREATE TABLE t1 (
ID CHAR(32) NOT NULL,
name CHAR(32) NOT NULL,
@@ -33,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 1263 Data truncated for column 'transityes' at row 1
-Warning 1263 Data truncated for column 'shopsyes' at row 1
-Warning 1263 Data truncated for column 'schoolsyes' at row 1
-Warning 1263 Data truncated for column 'petsyes' at row 1
+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
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');
@@ -94,13 +95,9 @@ INSERT t1 VALUES(NULL,'/');
INSERT t1 VALUES(NULL,'[T,U]_axpby');
SELECT * FROM t1 WHERE name='[T,U]_axpy';
name_id name
-Warnings:
-Warning 1263 Data truncated for column 'name' at row 1
SELECT * FROM t1 WHERE name='[T,U]_axpby';
name_id name
2 [T,U]_axpby
-Warnings:
-Warning 1263 Data truncated for column 'name' at row 1
create table t2
(
name_id int not null auto_increment,
@@ -159,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 1261 Data truncated, NULL supplied to NOT NULL column 'c' at row 1
-Warning 1261 Data truncated, NULL supplied to NOT NULL column 'c' at row 2
+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
SELECT * FROM t1;
c i
1
diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result
index 8ec507b2a3f..dd45cb51d33 100644
--- a/mysql-test/r/key_cache.result
+++ b/mysql-test/r/key_cache.result
@@ -35,7 +35,7 @@ SELECT @@small.key_buffer_size;
1048576
SELECT @@medium.key_buffer_size;
@@medium.key_buffer_size
-4194304
+0
SET @@global.key_buffer_size=@save_key_buffer;
SELECT @@default.key_buffer_size;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'default.key_buffer_size' at line 1
diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result
index 3cd62d8b678..508e1844d84 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 1263 Data truncated for column 'a' at row 1
-Warning 1263 Data truncated for column 'c' at row 1
-Warning 1263 Data truncated for column 'd' at row 1
-Warning 1263 Data truncated for column 'a' at row 2
-Warning 1263 Data truncated for column 'b' at row 2
-Warning 1263 Data truncated for column 'd' at row 2
+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
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 1263 Data truncated for column 'c' at row 1
-Warning 1263 Data truncated for column 'd' at row 1
-Warning 1263 Data truncated for column 'b' at row 2
-Warning 1263 Data truncated for column 'd' at row 2
+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
SELECT * from t1;
a b c d
NULL NULL 0000-00-00 0000-00-00
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 59af9b3e7f3..d158c39cba8 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -1,4 +1,5 @@
drop table if exists t1,t2;
+SET SQL_WARNINGS=1;
CREATE TABLE t1 (
STRING_DATA char(255) default NULL,
KEY string_data (STRING_DATA)
@@ -14,34 +15,6 @@ Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a));
-Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
@@ -361,8 +334,8 @@ t1 1 c_2 1 c A 5 NULL NULL YES BTREE
t1 1 c_2 2 a A 5 NULL NULL BTREE
explain select * from t1,t2 where t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL a NULL NULL NULL 2 Using where
-1 SIMPLE t1 ALL a NULL NULL NULL 4
+1 SIMPLE t2 ALL a NULL NULL NULL 2
+1 SIMPLE t1 ALL a NULL NULL NULL 4 Using where
explain select * from t1,t2 force index(a) where t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL a NULL NULL NULL 2
@@ -377,8 +350,8 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref b b 5 test.t2.b 1 Using where
explain select * from t1,t2 force index(c) where t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
-1 SIMPLE t1 ALL a NULL NULL NULL 4
+1 SIMPLE t2 ALL NULL NULL NULL NULL 2
+1 SIMPLE t1 ALL a NULL NULL NULL 4 Using where
explain select * from t1 where a=0 or a=2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where
diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result
index 0dd9754d0c5..479a7f049d9 100644
--- a/mysql-test/r/null.result
+++ b/mysql-test/r/null.result
@@ -77,42 +77,42 @@ CREATE TABLE t1 (a varchar(16) NOT NULL, b smallint(6) NOT NULL, c datetime NOT
INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55";
UPDATE t1 SET d=1/NULL;
Warnings:
-Warning 1263 Data truncated for column 'd' at row 1
+Warning 1264 Data truncated for column 'd' at row 1
UPDATE t1 SET d=NULL;
Warnings:
-Warning 1261 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 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 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 1
-Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 2
+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
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 1261 Data truncated, NULL supplied to NOT NULL column 'b' at row 1
-Warning 1261 Data truncated, NULL supplied to NOT NULL column 'b' at row 2
+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
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 1261 Data truncated, NULL supplied to NOT NULL column 'c' at row 1
-Warning 1261 Data truncated, NULL supplied to NOT NULL column 'c' at row 2
+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
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 1261 Data truncated, NULL supplied to NOT NULL column 'd' at row 1
-Warning 1261 Data truncated, NULL supplied to NOT NULL column 'd' at row 2
+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
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 7dc0b4bfdd3..9aaea0d800b 100644
--- a/mysql-test/r/null_key.result
+++ b/mysql-test/r/null_key.result
@@ -153,7 +153,7 @@ a b
7 NULL
explain select * from t1 where (a = 7 or a is null) and (b=7 or b is null);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a,b a 10 NULL 4 Using where; Using index
+1 SIMPLE t1 range a,b a 10 NULL 3 Using where; Using index
select * from t1 where (a = 7 or a is null) and (b=7 or b is null);
a b
NULL 7
@@ -337,7 +337,7 @@ index (id2)
);
insert into t1 values(null,null),(1,1);
Warnings:
-Warning 1261 Data truncated, NULL supplied to NOT NULL column 'id2' at row 1
+Warning 1262 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 5470b9387e3..79ccf833f40 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -306,17 +306,17 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 9 NULL 8 Using where; Using index
explain select * from t1 where a = 2 and b >0 order by a desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 9 NULL 4 Using where; Using index
+1 SIMPLE t1 range a a 9 NULL 5 Using where; Using index
explain select * from t1 where a = 2 and b is null order by a desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 9 const,const 1 Using where; Using index; Using filesort
explain select * from t1 where a = 2 and (b is null or b > 0) order by a
desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 9 NULL 5 Using where; Using index
+1 SIMPLE t1 range a a 9 NULL 6 Using where; Using index
explain select * from t1 where a = 2 and b > 0 order by a desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 9 NULL 4 Using where; Using index
+1 SIMPLE t1 range a a 9 NULL 5 Using where; Using index
explain select * from t1 where a = 2 and b < 2 order by a desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 9 NULL 2 Using where; Using index
@@ -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 1263 Data truncated for column 'b' at row 1
-Warning 1263 Data truncated for column 'c' at row 1
-Warning 1263 Data truncated for column 'b' at row 2
-Warning 1263 Data truncated for column 'c' at row 3
+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
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/rpl_do_grant.result b/mysql-test/r/rpl_do_grant.result
index fec935ae7ac..983cdf46620 100644
--- a/mysql-test/r/rpl_do_grant.result
+++ b/mysql-test/r/rpl_do_grant.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;
delete from mysql.user where user='rpl_do_grant';
delete from mysql.db where user='rpl_do_grant';
flush privileges;
diff --git a/mysql-test/r/rpl_error_ignored_table.result b/mysql-test/r/rpl_error_ignored_table.result
index e1486220542..f22b62838bb 100644
--- a/mysql-test/r/rpl_error_ignored_table.result
+++ b/mysql-test/r/rpl_error_ignored_table.result
@@ -1,15 +1,15 @@
-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 primary key);
insert into t1 values (1),(1);
-Duplicate entry '1' for key 1
+ERROR 23000: Duplicate entry '1' for key 1
show slave status;
-Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 master-bin.001 213 slave-relay-bin.002 254 master-bin.001 Yes Yes 0 0 213 254
+Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
+127.0.0.1 root MASTER_PORT 1 master-bin.000001 213 slave-relay-bin.000002 257 master-bin.000001 Yes Yes test.t1 0 0 213 257
show tables like 't1';
Tables_in_test (t1)
drop table t1;
diff --git a/mysql-test/r/rpl_ignore_grant.result b/mysql-test/r/rpl_ignore_grant.result
index 6cd7d5b4c00..5e970e71d0b 100644
--- a/mysql-test/r/rpl_ignore_grant.result
+++ b/mysql-test/r/rpl_ignore_grant.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;
delete from mysql.user where user='rpl_ignore_grant';
delete from mysql.db where user='rpl_ignore_grant';
flush privileges;
@@ -17,7 +17,7 @@ Grants for rpl_ignore_grant@localhost
GRANT SELECT ON *.* TO 'rpl_ignore_grant'@'localhost'
GRANT DROP ON `test`.* TO 'rpl_ignore_grant'@'localhost'
show grants for rpl_ignore_grant@localhost;
-There is no such grant defined for user 'rpl_ignore_grant' on host 'localhost'
+ERROR 42000: There is no such grant defined for user 'rpl_ignore_grant' on host 'localhost'
select count(*) from mysql.user where user='rpl_ignore_grant';
count(*)
0
diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result
index fb3921eb677..55dcf2f4f0f 100644
--- a/mysql-test/r/rpl_loaddata.result
+++ b/mysql-test/r/rpl_loaddata.result
@@ -28,8 +28,8 @@ load data infile '../../std_data/rpl_loaddata.dat' into table t1;
set global sql_slave_skip_counter=1;
start slave;
show slave status;
-Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 master-bin.001 1311 slave-relay-bin.002 1352 master-bin.001 Yes Yes 0 0 1311 1352
+Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
+127.0.0.1 root MASTER_PORT 1 master-bin.000001 1311 slave-relay-bin.000002 1355 master-bin.000001 Yes Yes 0 0 1311 1355
set sql_log_bin=0;
delete from t1;
set sql_log_bin=1;
@@ -38,8 +38,8 @@ stop slave;
change master to master_user='test';
change master to master_user='root';
show slave status;
-Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 master-bin.001 1442 slave-relay-bin.001 4 master-bin.001 No No 0 0 1442 4
+Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
+127.0.0.1 root MASTER_PORT 1 master-bin.000001 1442 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 1442 4
set global sql_slave_skip_counter=1;
start slave;
set sql_log_bin=0;
@@ -49,5 +49,5 @@ load data infile '../../std_data/rpl_loaddata.dat' into table t1;
stop slave;
reset slave;
show slave status;
-Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.001 4 No No 0 0 0 4
+Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
+127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.000001 4 No No 0 0 0 4
diff --git a/mysql-test/r/rpl_log.result b/mysql-test/r/rpl_log.result
index 050e9274a99..ab45826a3e7 100644
--- a/mysql-test/r/rpl_log.result
+++ b/mysql-test/r/rpl_log.result
@@ -93,6 +93,6 @@ slave-bin.000002 62 Query 1 168 use `test`; insert into t1 values (1)
slave-bin.000002 122 Query 1 228 use `test`; drop table t1
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 master-bin.000002 276 slave-relay-bin.000002 1531 master-bin.000002 Yes Yes 0 0 276 1535
+127.0.0.1 root MASTER_PORT 1 master-bin.000002 276 slave-relay-bin.000003 214 master-bin.000002 Yes Yes 0 0 276 214
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
diff --git a/mysql-test/r/rpl_log_pos.result b/mysql-test/r/rpl_log_pos.result
index b42e7ff5dc4..bc655b9b15a 100644
--- a/mysql-test/r/rpl_log_pos.result
+++ b/mysql-test/r/rpl_log_pos.result
@@ -9,7 +9,7 @@ File Position Binlog_do_db Binlog_ignore_db
master-bin.000001 79
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 127
+127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 123
stop slave;
change master to master_log_pos=73;
start slave;
@@ -21,7 +21,7 @@ Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Lo
start slave;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 4 master-bin.000001 No Yes 0 0 73 4
+127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 48 master-bin.000001 No Yes 0 0 73 48
stop slave;
change master to master_log_pos=173;
start slave;
diff --git a/mysql-test/r/rpl_max_relay_size.result b/mysql-test/r/rpl_max_relay_size.result
index 1fa3fcd1adb..741b3538799 100644
--- a/mysql-test/r/rpl_max_relay_size.result
+++ b/mysql-test/r/rpl_max_relay_size.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;
stop slave;
create table t1 (a int);
drop table t1;
@@ -15,8 +15,8 @@ select @@global.max_relay_log_size;
4096
start slave;
show slave status;
-Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 master-bin.001 50477 slave-relay-bin.014 1221 master-bin.001 Yes Yes 0 0 50477 1221
+Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
+127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000014 1221 master-bin.000001 Yes Yes 0 0 50477 1221
stop slave;
reset slave;
set global max_relay_log_size=(5*4096);
@@ -25,8 +25,8 @@ select @@global.max_relay_log_size;
20480
start slave;
show slave status;
-Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 master-bin.001 50477 slave-relay-bin.004 9457 master-bin.001 Yes Yes 0 0 50477 9457
+Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
+127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000004 9457 master-bin.000001 Yes Yes 0 0 50477 9457
stop slave;
reset slave;
set global max_relay_log_size=0;
@@ -35,27 +35,27 @@ select @@global.max_relay_log_size;
0
start slave;
show slave status;
-Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 master-bin.001 50477 slave-relay-bin.008 1283 master-bin.001 Yes Yes 0 0 50477 1283
+Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
+127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000008 1283 master-bin.000001 Yes Yes 0 0 50477 1283
stop slave;
reset slave;
flush logs;
show slave status;
-Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.001 4 No No 0 0 0 4
+Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
+127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.000001 4 No No 0 0 0 4
reset slave;
start slave;
flush logs;
create table t1 (a int);
show slave status;
-Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 master-bin.001 50535 slave-relay-bin.009 62 master-bin.001 Yes Yes 0 0 50535 62
+Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
+127.0.0.1 root MASTER_PORT 1 master-bin.000001 50535 slave-relay-bin.000009 62 master-bin.000001 Yes Yes 0 0 50535 62
flush logs;
drop table t1;
show slave status;
-Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 master-bin.001 50583 slave-relay-bin.010 52 master-bin.001 Yes Yes 0 0 50583 52
+Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
+127.0.0.1 root MASTER_PORT 1 master-bin.000001 50583 slave-relay-bin.000010 52 master-bin.000001 Yes Yes 0 0 50583 52
flush logs;
show master status;
File Position Binlog_do_db Binlog_ignore_db
-master-bin.002 4
+master-bin.000002 4
diff --git a/mysql-test/r/rpl_replicate_do.result b/mysql-test/r/rpl_replicate_do.result
index 4d740cafbd0..ad92ee5b491 100644
--- a/mysql-test/r/rpl_replicate_do.result
+++ b/mysql-test/r/rpl_replicate_do.result
@@ -28,4 +28,4 @@ ERROR 42S02: Table 'test.t11' doesn't exist
drop table if exists t1,t2,t11;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 master-bin.000001 1281 slave-relay-bin.000002 1325 master-bin.000001 Yes Yes test.t1 0 0 1281 1329
+127.0.0.1 root MASTER_PORT 1 master-bin.000001 1281 slave-relay-bin.000002 1325 master-bin.000001 Yes Yes test.t1 0 0 1281 1325
diff --git a/mysql-test/r/rpl_reset_slave.result b/mysql-test/r/rpl_reset_slave.result
index c1bc1e8e483..239c4158410 100644
--- a/mysql-test/r/rpl_reset_slave.result
+++ b/mysql-test/r/rpl_reset_slave.result
@@ -1,22 +1,22 @@
-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;
show slave status;
-Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 master-bin.001 79 slave-relay-bin.002 120 master-bin.001 Yes Yes 0 0 79 120
+Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
+127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 123
stop slave;
change master to master_user='test';
show slave status;
-Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 test MASTER_PORT 1 master-bin.001 79 slave-relay-bin.001 4 master-bin.001 No No 0 0 79 4
+Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
+127.0.0.1 test MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 79 4
reset slave;
show slave status;
-Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.001 4 No No 0 0 0 4
+Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
+127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.000001 4 No No 0 0 0 4
start slave;
show slave status;
-Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 1 master-bin.001 79 slave-relay-bin.002 120 master-bin.001 Yes Yes 0 0 79 120
+Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
+127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 123
diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result
index 57b48827e33..7c5057c7fb2 100644
--- a/mysql-test/r/rpl_rotate_logs.result
+++ b/mysql-test/r/rpl_rotate_logs.result
@@ -5,7 +5,7 @@ ERROR HY000: Could not initialize master info structure, check permisions on mas
start slave;
ERROR HY000: Could not initialize master info structure, check permisions on master.info
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
-Could not initialize master info structure, check permisions on master.info
+ERROR HY000: Could not initialize master info structure, check permisions on master.info
reset slave;
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
reset master;
@@ -81,7 +81,7 @@ a
testing temporary tables part 2
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
-127.0.0.1 root MASTER_PORT 60 master-bin.000006 838 slave-relay-bin.000001 8067 master-bin.000004 Yes Yes 0 0 2886 8067
+127.0.0.1 root MASTER_PORT 60 master-bin.000004 2886 slave-relay-bin.000001 7891 master-bin.000004 Yes Yes 0 0 2886 7891
lock tables t3 read;
select count(*) from t3 where n >= 4;
count(*)
diff --git a/mysql-test/r/rpl_user_variables.result b/mysql-test/r/rpl_user_variables.result
index 2feef3dd4e3..b715b750b68 100644
--- a/mysql-test/r/rpl_user_variables.result
+++ b/mysql-test/r/rpl_user_variables.result
@@ -65,11 +65,11 @@ slave-bin.000001 851 User var 2 851 @n1=NULL
slave-bin.000001 877 Query 1 877 use `test`; insert into t1 values (@n1)
slave-bin.000001 939 Query 1 939 use `test`; insert into t1 values (@n2)
slave-bin.000001 1001 Query 1 1001 use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1)
-slave-bin.000001 1089 User var 2 1089 @a='2'
-slave-bin.000001 1124 Query 1 1124 use `test`; insert into t1 values (@a+(@b:=@a+1))
-slave-bin.000001 1196 User var 2 1196 @q='abc'
-slave-bin.000001 1233 Query 1 1233 use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2'))
-slave-bin.000001 1337 User var 2 1337 @a=5
-slave-bin.000001 1379 Query 1 1379 use `test`; insert into t1 values (@a),(@a)
+slave-bin.000001 1089 User var 2 1089 @a=2
+slave-bin.000001 1131 Query 1 1131 use `test`; insert into t1 values (@a+(@b:=@a+1))
+slave-bin.000001 1203 User var 2 1203 @q='abc'
+slave-bin.000001 1240 Query 1 1240 use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2'))
+slave-bin.000001 1344 User var 2 1344 @a=5
+slave-bin.000001 1386 Query 1 1386 use `test`; insert into t1 values (@a),(@a)
drop table t1;
stop slave;
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index e83bbc2fc8c..46888acb73c 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -2583,36 +2583,36 @@ explain select t2.companynr,companyname from t4 left join t2 using (companynr) w
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where; Not exists
-select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
-companynr companynr
-37 36
-41 40
delete from t2 where fld1=999999;
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0;
-table type possible_keys key key_len ref rows Extra
-t2 ALL NULL NULL NULL NULL 1199 Using where
-t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0;
-table type possible_keys key key_len ref rows Extra
-t2 ALL NULL NULL NULL NULL 1199 Using where
-t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0;
-table type possible_keys key key_len ref rows Extra
-t2 ALL NULL NULL NULL NULL 1199 Using where
-t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null;
-table type possible_keys key key_len ref rows Extra
-t4 ALL NULL NULL NULL NULL 12
-t2 ALL NULL NULL NULL NULL 1199 Using where
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t4 ALL NULL NULL NULL NULL 12
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0;
-table type possible_keys key key_len ref rows Extra
-t4 ALL PRIMARY NULL NULL NULL 12
-t2 ALL NULL NULL NULL NULL 1199 Using where
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0;
-table type possible_keys key key_len ref rows Extra
-t4 ALL NULL NULL NULL NULL 12
-t2 ALL NULL NULL NULL NULL 1199 Using where
-plain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t4 ALL NULL NULL NULL NULL 12
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
+select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
+companynr companynr
+37 36
+41 40
+explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using temporary
1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using where; Using index
@@ -3527,11 +3527,11 @@ insert into t2 values (1);
insert into t4 values (1,1);
explain select * from t1 left join t2 on id1 = id2 left join t3 on id1 = id3
left join t4 on id3 = id4 where id2 = 1 or id4 = 1;
-table type possible_keys key key_len ref rows Extra
-t3 system NULL NULL NULL NULL 0 const row not found
-t1 ALL NULL NULL NULL NULL 2
-t2 ALL NULL NULL NULL NULL 1
-t4 ALL id4 NULL NULL NULL 1 Using where
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t3 system NULL NULL NULL NULL 0 const row not found
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1
+1 SIMPLE t4 ALL id4 NULL NULL NULL 1 Using where
select * from t1 left join t2 on id1 = id2 left join t3 on id1 = id3
left join t4 on id3 = id4 where id2 = 1 or id4 = 1;
id1 id2 id3 id4 id44
diff --git a/mysql-test/r/select_safe.result b/mysql-test/r/select_safe.result
index dfb12eacd9c..446dd41e216 100644
--- a/mysql-test/r/select_safe.result
+++ b/mysql-test/r/select_safe.result
@@ -61,21 +61,21 @@ a b
4 a
5 a
SELECT @@MAX_SEEKS_FOR_KEY;
-@@max_seeks_for_key
+@@MAX_SEEKS_FOR_KEY
4294967295
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a");
explain select * from t1,t1 as t2 where t1.b=t2.b;
-table type possible_keys key key_len ref rows Extra
-t1 ALL b NULL NULL NULL 21
-t2 ALL b NULL NULL NULL 16 Using where
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL b NULL NULL NULL 21
+1 SIMPLE t2 ALL b NULL NULL NULL 16 Using where
set MAX_SEEKS_FOR_KEY=1;
explain select * from t1,t1 as t2 where t1.b=t2.b;
-table type possible_keys key key_len ref rows Extra
-t1 ALL b NULL NULL NULL 21
-t2 ref b b 21 t1.b 6 Using where
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL b NULL NULL NULL 21
+1 SIMPLE t2 ref b b 21 test.t1.b 6 Using where
SET MAX_SEEKS_FOR_KEY=DEFAULT;
drop table t1;
SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, SQL_MAX_JOIN_SIZE=DEFAULT;
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index 41fba93db5b..9ee50c3a519 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -6,7 +6,7 @@ explain 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 1247 Select 2 was reduced during optimisation
+Note 1248 Select 2 was reduced during optimisation
SELECT (SELECT 1) UNION SELECT (SELECT 2);
(SELECT 1)
1
@@ -16,8 +16,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 1247 Select 2 was reduced during optimisation
-Note 1247 Select 4 was reduced during optimisation
+Note 1248 Select 2 was reduced during optimisation
+Note 1248 Select 4 was reduced during optimisation
SELECT (SELECT (SELECT 0 UNION SELECT 0));
(SELECT (SELECT 0 UNION SELECT 0))
0
@@ -27,7 +27,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 1247 Select 2 was reduced during optimisation
+Note 1248 Select 2 was reduced during optimisation
SELECT (SELECT 1 FROM (SELECT 1) as b HAVING a=1) as a;
ERROR 42S22: Reference 'a' not supported (forward reference in item list)
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;
@@ -608,7 +608,6 @@ x
3
3
INSERT INTO t1 (x) select (SELECT SUM(x)+2 FROM t1) FROM t2;
-ERROR HY000: You can't specify target table 't1' for update in FROM clause
INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t2));
ERROR 42S22: Unknown column 'x' in 'field list'
INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2));
@@ -618,6 +617,8 @@ x
2
3
3
+11
+11
2
drop table t1, t2, t3;
CREATE TABLE t1 (x int not null, y int, primary key (x));
@@ -667,7 +668,7 @@ EXPLAIN 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 1247 Select 2 was reduced during optimisation
+Note 1248 Select 2 was reduced during optimisation
SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3);
id
1
@@ -679,8 +680,8 @@ 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
3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1247 Select 3 was reduced during optimisation
-Note 1247 Select 2 was reduced during optimisation
+Note 1248 Select 3 was reduced during optimisation
+Note 1248 Select 2 was reduced during optimisation
EXPLAIN SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 index NULL id 5 NULL 2 Using where; Using index
@@ -809,7 +810,7 @@ explain 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 1247 Select 2 was reduced during optimisation
+Note 1248 Select 2 was reduced during optimisation
select (select a+1) from t1;
(select a+1)
2.5
@@ -973,12 +974,12 @@ UNIQUE KEY `maxnumrep` (`maxnumrep`)
) TYPE=MyISAM CHARSET=latin1;
INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test');
Warnings:
-Warning 1263 Data truncated for column 'date' at row 1
-Warning 1263 Data truncated for column 'date' at row 2
+Warning 1264 Data truncated for column 'date' at row 1
+Warning 1264 Data truncated for column 'date' at row 2
INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test');
Warnings:
-Warning 1263 Data truncated for column 'date' at row 1
-Warning 1263 Data truncated for column 'date' at row 2
+Warning 1264 Data truncated for column 'date' at row 1
+Warning 1264 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);
@@ -1159,7 +1160,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 1240 Subselect returns more than 1 record
+Error 1241 Subselect returns more than 1 record
select * from t1;
a b
1 1
diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result
index 592c787031f..f12be1d363c 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 1244 Converting column 'a' from CHAR to TEXT
-Warning 1244 Converting column 'b' from CHAR to BLOB
-Warning 1244 Converting column 'c' from CHAR to TEXT
+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
show columns from t2;
Field Type Null Key Default Extra
a text YES NULL
diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result
index b31ef73742d..da25394eb08 100644
--- a/mysql-test/r/type_decimal.result
+++ b/mysql-test/r/type_decimal.result
@@ -1,4 +1,5 @@
DROP TABLE IF EXISTS t1;
+SET SQL_WARNINGS=1;
CREATE TABLE t1 (
id int(11) NOT NULL auto_increment,
datatype_id int(11) DEFAULT '0' NOT NULL,
@@ -157,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 1262 Data truncated, out of range for column 'a' at row 1
-Warning 1262 Data truncated, out of range for column 'a' at row 2
-Warning 1262 Data truncated, out of range for column 'a' at row 3
+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
insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
Warnings:
-Warning 1262 Data truncated, out of range for column 'a' at row 1
-Warning 1263 Data truncated for column 'a' at row 2
-Warning 1262 Data truncated, out of range for column 'a' at row 3
+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
insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
Warnings:
-Warning 1263 Data truncated for column 'a' at row 3
+Warning 1264 Data truncated for column 'a' at row 3
select * from t1;
a
0.00
@@ -200,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 1262 Data truncated, out of range for column 'a' at row 2
-Warning 1262 Data truncated, out of range for column 'a' at row 6
+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
insert into t1 values ("-.1"),("+.1"),(".1");
Warnings:
-Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1263 Data truncated, out of range for column 'a' at row 1
insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001");
Warnings:
-Warning 1262 Data truncated, out of range for column 'a' at row 3
+Warning 1263 Data truncated, out of range for column 'a' at row 3
insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
Warnings:
-Warning 1262 Data truncated, out of range for column 'a' at row 1
-Warning 1262 Data truncated, out of range for column 'a' at row 2
-Warning 1262 Data truncated, out of range for column 'a' at row 3
+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
insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
Warnings:
-Warning 1262 Data truncated, out of range for column 'a' at row 1
-Warning 1262 Data truncated, out of range for column 'a' at row 2
-Warning 1262 Data truncated, out of range for column 'a' at row 3
+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
insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
Warnings:
-Warning 1262 Data truncated, out of range for column 'a' at row 1
-Warning 1263 Data truncated for column 'a' at row 2
-Warning 1262 Data truncated, out of range for column 'a' at row 3
+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
insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
Warnings:
-Warning 1263 Data truncated for column 'a' at row 3
+Warning 1264 Data truncated for column 'a' at row 3
select * from t1;
a
0.00
@@ -258,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 1262 Data truncated, out of range for column 'a' at row 2
-Warning 1262 Data truncated, out of range for column 'a' at row 6
+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
insert into t1 values ("-.1"),("+.1"),(".1");
Warnings:
-Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1263 Data truncated, out of range for column 'a' at row 1
insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001");
Warnings:
-Warning 1262 Data truncated, out of range for column 'a' at row 3
+Warning 1263 Data truncated, out of range for column 'a' at row 3
insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
Warnings:
-Warning 1262 Data truncated, out of range for column 'a' at row 1
-Warning 1262 Data truncated, out of range for column 'a' at row 2
-Warning 1262 Data truncated, out of range for column 'a' at row 3
+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
insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
Warnings:
-Warning 1262 Data truncated, out of range for column 'a' at row 1
-Warning 1262 Data truncated, out of range for column 'a' at row 2
-Warning 1262 Data truncated, out of range for column 'a' at row 3
+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
insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
Warnings:
-Warning 1262 Data truncated, out of range for column 'a' at row 1
-Warning 1263 Data truncated for column 'a' at row 2
-Warning 1262 Data truncated, out of range for column 'a' at row 3
+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
insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
Warnings:
-Warning 1263 Data truncated for column 'a' at row 3
+Warning 1264 Data truncated for column 'a' at row 3
select * from t1;
a
00000000.00
@@ -320,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 1262 Data truncated, out of range for column 'a' at row 1
-Warning 1262 Data truncated, out of range for column 'a' at row 2
-Warning 1262 Data truncated, out of range for column 'a' at row 3
+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
insert into t1 values (1e+100),(1e-100),(-1e+100);
Warnings:
-Warning 1262 Data truncated, out of range for column 'a' at row 1
-Warning 1262 Data truncated, out of range for column 'a' at row 3
+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
insert into t1 values (123.4e0),(123.4e+2),(123.4e-2),(123e1),(123e+0);
select * from t1;
a
@@ -360,8 +361,8 @@ drop table t1;
create table t1 (a decimal);
insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+12345678901'),(99999999999999);
Warnings:
-Warning 1262 Data truncated, out of range for column 'a' at row 1
-Warning 1262 Data truncated, out of range for column 'a' at row 7
+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
select * from t1;
a
-9999999999
@@ -375,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 1262 Data truncated, out of range for column 'a' at row 1
-Warning 1262 Data truncated, out of range for column 'a' at row 2
-Warning 1262 Data truncated, out of range for column 'a' at row 7
+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
select * from t1;
a
0
@@ -391,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 1262 Data truncated, out of range for column 'a' at row 1
-Warning 1262 Data truncated, out of range for column 'a' at row 2
-Warning 1262 Data truncated, out of range for column 'a' at row 7
+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
select * from t1;
a
0000000000
@@ -407,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 1262 Data truncated, out of range for column 'a' at row 1
-Warning 1262 Data truncated, out of range for column 'a' at row 2
-Warning 1262 Data truncated, out of range for column 'a' at row 7
+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
select * from t1;
a
0000000000
@@ -423,14 +424,16 @@ drop table t1;
create table t1(a decimal(10,0));
insert into t1 values ("1e4294967295");
Warnings:
-Warning 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1264 Data truncated for column 'a' at row 1
+Warning 1263 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 1262 Data truncated, out of range for column 'a' at row 1
+Warning 1264 Data truncated for column 'a' at row 1
+Warning 1263 Data truncated, out of range for column 'a' at row 1
select * from t1;
a
99999999999
diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result
index 76f82feb50e..987fa9d5685 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 1262 Data truncated, out of range for column 'f1' at row 7
-Warning 1262 Data truncated, out of range for column 'f1' at row 8
+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
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 34ae1086e2c..b665f78bbce 100644
--- a/mysql-test/r/type_ranges.result
+++ b/mysql-test/r/type_ranges.result
@@ -1,4 +1,5 @@
drop table if exists t1,t2,t3;
+SET SQL_WARNINGS=1;
CREATE TABLE t1 (
auto int(5) unsigned NOT NULL auto_increment,
string char(10) default "hello",
@@ -88,33 +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 1262 Data truncated, out of range for column 'utiny' at row 1
-Warning 1262 Data truncated, out of range for column 'ushort' at row 1
-Warning 1262 Data truncated, out of range for column 'umedium' at row 1
-Warning 1262 Data truncated, out of range for column 'ulong' at row 1
-Warning 1263 Data truncated for column 'options' at row 1
-Warning 1263 Data truncated for column 'flags' 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 1264 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 1262 Data truncated, out of range for column 'tiny' at row 1
-Warning 1262 Data truncated, out of range for column 'short' at row 1
-Warning 1262 Data truncated, out of range for column 'medium' at row 1
-Warning 1262 Data truncated, out of range for column 'long_int' at row 1
-Warning 1262 Data truncated, out of range for column 'utiny' at row 1
-Warning 1262 Data truncated, out of range for column 'ushort' at row 1
-Warning 1262 Data truncated, out of range for column 'umedium' at row 1
-Warning 1262 Data truncated, out of range for column 'ulong' at row 1
-Warning 1263 Data truncated for column 'options' at row 1
+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
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 1262 Data truncated, out of range for column 'tiny' at row 1
-Warning 1262 Data truncated, out of range for column 'short' at row 1
-Warning 1262 Data truncated, out of range for column 'medium' at row 1
-Warning 1262 Data truncated, out of range for column 'long_int' at row 1
-Warning 1262 Data truncated, out of range for column 'utiny' at row 1
-Warning 1262 Data truncated, out of range for column 'ushort' at row 1
-Warning 1262 Data truncated, out of range for column 'umedium' at row 1
-Warning 1263 Data truncated for column 'options' 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 1264 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
@@ -163,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 1263 Data truncated for column 'new_field' at row 2
-Warning 1263 Data truncated for column 'new_field' at row 3
-Warning 1263 Data truncated for column 'new_field' at row 4
-Warning 1263 Data truncated for column 'new_field' at row 5
-Warning 1263 Data truncated for column 'new_field' at row 6
-Warning 1263 Data truncated for column 'new_field' at row 7
+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
select * from t2;
auto string mediumblob_col new_field
1 2 2 ne
@@ -200,9 +202,9 @@ one one
drop table t2;
create table t2 select * from t1;
Warnings:
-Warning 1263 Data truncated for column 'options' at row 4
-Warning 1263 Data truncated for column 'options' at row 5
-Warning 1263 Data truncated for column 'options' at row 6
+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
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 27f2de823c6..5666e865518 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 1262 Data truncated, out of range for column 't' at row 2
-Warning 1262 Data truncated, out of range for column 't' at row 3
-Warning 1262 Data truncated, out of range for column 't' at row 4
+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
select * from t1;
t
10:22:33
diff --git a/mysql-test/r/type_uint.result b/mysql-test/r/type_uint.result
index ee81295e696..d948ca47972 100644
--- a/mysql-test/r/type_uint.result
+++ b/mysql-test/r/type_uint.result
@@ -1,9 +1,10 @@
drop table if exists t1;
+SET SQL_WARNINGS=1;
create table t1 (this int unsigned);
insert into t1 values (1);
insert into t1 values (-1);
Warnings:
-Warning 1262 Data truncated, out of range for column 'this' at row 1
+Warning 1263 Data truncated, out of range for column 'this' at row 1
select * from t1;
this
1
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index c29859bd4d4..396eba7197b 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -90,6 +90,13 @@ explain (select a,b from t1 limit 2) union all (select a,b from t2 order by a l
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4
2 UNION t2 ALL NULL NULL NULL NULL 4 Using filesort
+(select sql_calc_found_rows a,b from t1 limit 2) union all (select a,b from t2 order by a) limit 2;
+a b
+1 a
+2 b
+select found_rows();
+found_rows()
+6
select sql_calc_found_rows a,b from t1 union all select a,b from t2 limit 2;
a b
1 a
@@ -358,7 +365,7 @@ explain (select * from t1 where a=1 and b=10) union (select t1.a,t2.a from t1,t2
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
2 UNION t1 index PRIMARY PRIMARY 4 NULL 4 Using index
-2 UNION t2 index PRIMARY PRIMARY 4 NULL 4 Using where; Using index
+2 UNION t2 index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
explain (select * from t1 where a=1) union (select * from t1 where b=1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1
diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result
index 0ad165a861a..9d4710ff729 100644
--- a/mysql-test/r/warnings.result
+++ b/mysql-test/r/warnings.result
@@ -2,23 +2,24 @@ drop table if exists t1, t2;
Warnings:
Note 1051 Unknown table 't1'
Note 1051 Unknown table 't2'
+SET SQL_WARNINGS=1;
create table t1 (a int);
insert into t1 values (1);
insert into t1 values ("hej");
Warnings:
-Warning 1263 Data truncated for column 'a' at row 1
+Warning 1264 Data truncated for column 'a' at row 1
insert into t1 values ("hej"),("då");
Warnings:
-Warning 1263 Data truncated for column 'a' at row 1
-Warning 1263 Data truncated for column 'a' at row 2
+Warning 1264 Data truncated for column 'a' at row 1
+Warning 1264 Data truncated for column 'a' at row 2
set SQL_WARNINGS=1;
insert into t1 values ("hej");
Warnings:
-Warning 1263 Data truncated for column 'a' at row 1
+Warning 1264 Data truncated for column 'a' at row 1
insert into t1 values ("hej"),("då");
Warnings:
-Warning 1263 Data truncated for column 'a' at row 1
-Warning 1263 Data truncated for column 'a' at row 2
+Warning 1264 Data truncated for column 'a' at row 1
+Warning 1264 Data truncated for column 'a' at row 2
drop table t1;
set SQL_WARNINGS=0;
drop temporary table if exists not_exists;
@@ -45,13 +46,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 1261 Data truncated, NULL supplied to NOT NULL column 'b' at row 2
-Warning 1263 Data truncated for column 'd' at row 3
-Warning 1263 Data truncated for column 'c' at row 4
-Warning 1259 Record count is fewer than the column count at row 5
-Warning 1263 Data truncated for column 'b' at row 6
-Warning 1260 Record count is more than the column count at row 7
-Warning 1262 Data truncated, out of range for column 'a' at row 8
+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 Record count is fewer than the column count at row 5
+Warning 1264 Data truncated for column 'b' at row 6
+Warning 1261 Record count is more than the column count at row 7
+Warning 1263 Data truncated, out of range for column 'a' at row 8
select @@warning_count;
@@warning_count
7
@@ -59,42 +60,42 @@ 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 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 1
-Warning 1262 Data truncated, out of range for column 'b' at row 2
-Warning 1263 Data truncated for column 'c' at row 2
-Warning 1262 Data truncated, out of range for column 'a' at row 3
-Warning 1262 Data truncated, out of range for column 'b' at row 3
-Warning 1263 Data truncated for column 'c' at row 3
+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
alter table t1 modify c char(4);
Warnings:
-Warning 1263 Data truncated for column 'c' at row 1
-Warning 1263 Data truncated for column 'c' at row 2
+Warning 1264 Data truncated for column 'c' at row 1
+Warning 1264 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 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 2
+Warning 1262 Data truncated, NULL supplied to NOT NULL column 'a' at row 2
update t1 set c='mysql ab' where c='test';
Warnings:
-Warning 1263 Data truncated for column 'c' at row 4
+Warning 1264 Data truncated for column 'c' at row 4
update t1 set d=c;
Warnings:
-Warning 1263 Data truncated for column 'd' at row 1
-Warning 1263 Data truncated for column 'd' at row 2
-Warning 1263 Data truncated for column 'd' at row 3
-Warning 1263 Data truncated for column 'd' at row 4
+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
create table t2(a tinyint NOT NULL, b char(3));
insert into t2 select b,c from t1;
Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warning 1263 Data truncated for column 'b' at row 2
-Warning 1263 Data truncated for column 'b' at row 3
-Warning 1261 Data truncated, NULL supplied to NOT NULL column 'a' at row 4
-Warning 1263 Data truncated for column 'b' at row 4
+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
insert into t2(b) values('mysqlab');
set sql_warnings=1;
insert into t2(b) values('mysqlab');
Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
+Warning 1264 Data truncated for column 'b' at row 1
set sql_warnings=0;
drop table t1, t2;
create table t1(a char(10));
@@ -102,24 +103,24 @@ alter table t1 add b char;
set max_error_count=10;
update t1 set b=a;
Warnings:
-Warning 1263 Data truncated for column 'b' at row 1
-Warning 1263 Data truncated for column 'b' at row 2
-Warning 1263 Data truncated for column 'b' at row 3
-Warning 1263 Data truncated for column 'b' at row 4
-Warning 1263 Data truncated for column 'b' at row 5
-Warning 1263 Data truncated for column 'b' at row 6
-Warning 1263 Data truncated for column 'b' at row 7
-Warning 1263 Data truncated for column 'b' at row 8
-Warning 1263 Data truncated for column 'b' at row 9
-Warning 1263 Data truncated for column 'b' at row 10
+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
select @@warning_count;
@@warning_count
50
drop table t1;
create table t1 (id int) type=isam;
Warnings:
-Warning 1264 Using storage engine MYISAM for table 't1'
+Warning 1265 Using storage engine MYISAM for table 't1'
alter table t1 type=isam;
Warnings:
-Warning 1264 Using storage engine MYISAM for table 't1'
+Warning 1265 Using storage engine MYISAM for table 't1'
drop table t1;