diff options
Diffstat (limited to 'mysql-test/r')
33 files changed, 2309 insertions, 926 deletions
diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index 3be1cdcf15a..f73a80dde65 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -11120,7 +11120,13 @@ auto fld1 companynr fld3 fld4 fld5 fld6 2 011401 37 breaking dreaded Steinberg W 3 011402 37 Romans scholastics jarring 4 011403 37 intercepted audiology tinily +SELECT COUNT(auto) FROM t2; +COUNT(auto) +1213 INSERT DELAYED INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily',''); +SELECT COUNT(auto) FROM t2; +COUNT(auto) +1214 ALTER TABLE t2 DROP COLUMN fld6; SHOW CREATE TABLE t2; Table Create Table diff --git a/mysql-test/r/ctype_cp932_binlog.result b/mysql-test/r/ctype_cp932_binlog.result index 6d742f3d464..d3d800b7bf0 100644 --- a/mysql-test/r/ctype_cp932_binlog.result +++ b/mysql-test/r/ctype_cp932_binlog.result @@ -41,6 +41,6 @@ IN ind DECIMAL(10,2)) BEGIN INSERT INTO t4 VALUES (ins1, ins2, ind); END -master-bin.000001 801 Query 1 1006 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1'Foo\'s a Bar'), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93)) -master-bin.000001 1006 Query 1 1092 use `test`; DROP PROCEDURE bug18293 -master-bin.000001 1092 Query 1 1168 use `test`; DROP TABLE t4 +master-bin.000001 801 Query 1 1017 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93)) +master-bin.000001 1017 Query 1 1103 use `test`; DROP PROCEDURE bug18293 +master-bin.000001 1103 Query 1 1179 use `test`; DROP TABLE t4 diff --git a/mysql-test/r/ctype_hebrew.result b/mysql-test/r/ctype_hebrew.result new file mode 100644 index 00000000000..d938b2e47f3 --- /dev/null +++ b/mysql-test/r/ctype_hebrew.result @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS t1; +SET NAMES hebrew; +CREATE TABLE t1 (a char(1)) DEFAULT CHARSET=hebrew; +INSERT INTO t1 VALUES (0xFD),(0xFE); +ALTER TABLE t1 CONVERT TO CHARACTER SET utf8; +SELECT HEX(a) FROM t1; +HEX(a) +E2808E +E2808F +DROP TABLE t1; +End of 4.1 tests diff --git a/mysql-test/r/ctype_ucs_binlog.result b/mysql-test/r/ctype_ucs_binlog.result index 88912f98252..2657bf60c04 100644 --- a/mysql-test/r/ctype_ucs_binlog.result +++ b/mysql-test/r/ctype_ucs_binlog.result @@ -9,15 +9,17 @@ master-bin.000001 98 User var 1 138 @`v`=_ucs2 0x006100620063 COLLATE ucs2_gener master-bin.000001 138 Query 1 227 use `test`; insert into t2 values (@v) /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`; -use test; -SET TIMESTAMP=10000; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t2 values (@v); +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`/*!*/; +use test/*!*/; +SET TIMESTAMP=10000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t2 values (@v)/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 4eb74510c93..be1e1742ba6 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -124,12 +124,34 @@ create table t1 select date_format("2004-01-19 10:10:10", "%Y-%m-%d"); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `date_format("2004-01-19 10:10:10", "%Y-%m-%d")` varbinary(10) default NULL + `date_format("2004-01-19 10:10:10", "%Y-%m-%d")` varchar(10) character set utf8 default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t1; date_format("2004-01-19 10:10:10", "%Y-%m-%d") 2004-01-19 drop table t1; +set names utf8; +set LC_TIME_NAMES='fr_FR'; +create table t1 (s1 char(20) character set latin1); +insert into t1 values (date_format('2004-02-02','%M')); +select hex(s1) from t1; +hex(s1) +66E97672696572 +drop table t1; +create table t1 (s1 char(20) character set koi8r); +set LC_TIME_NAMES='ru_RU'; +insert into t1 values (date_format('2004-02-02','%M')); +insert into t1 values (date_format('2004-02-02','%b')); +insert into t1 values (date_format('2004-02-02','%W')); +insert into t1 values (date_format('2004-02-02','%a')); +select hex(s1), s1 from t1; +hex(s1) s1 +E6C5D7D2C1CCD1 Ð¤ÐµÐ²Ñ€Ð°Ð»Ñ +E6C5D7 Фев +F0CFCEC5C4C5CCD8CEC9CB Понедельник +F0CEC4 Пнд +drop table t1; +set LC_TIME_NAMES='en_US'; set names koi8r; create table t1 (s1 char(1) character set utf8); insert into t1 values (_koi8r'ÁÂ'); diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index 23517f7b603..d18837aed41 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -1029,6 +1029,273 @@ t1 CREATE TABLE `t1` ( `stddev(0)` double(8,4) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +create table bug22555 (i smallint primary key auto_increment, s1 smallint, s2 smallint, e decimal(30,10), o double); +insert into bug22555 (s1, s2, e, o) values (53, 78, 11.4276528, 6.828112), (17, 78, 5.916793, 1.8502951), (18, 76, 2.679231, 9.17975591), (31, 62, 6.07831, 0.1), (19, 41, 5.37463, 15.1), (83, 73, 14.567426, 7.959222), (92, 53, 6.10151, 13.1856852), (7, 12, 13.92272, 3.442007), (92, 35, 11.95358909, 6.01376678), (38, 84, 2.572, 7.904571); +select std(s1/s2) from bug22555 group by i; +std(s1/s2) +0.00000000 +0.00000000 +0.00000000 +0.00000000 +0.00000000 +0.00000000 +0.00000000 +0.00000000 +0.00000000 +0.00000000 +select std(e) from bug22555 group by i; +std(e) +0.00000000000000 +0.00000000000000 +0.00000000000000 +0.00000000000000 +0.00000000000000 +0.00000000000000 +0.00000000000000 +0.00000000000000 +0.00000000000000 +0.00000000000000 +select std(o) from bug22555 group by i; +std(o) +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +drop table bug22555; +create table bug22555 (i smallint, s1 smallint, s2 smallint, o1 double, o2 double, e1 decimal, e2 decimal); +insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76); +select i, count(*) from bug22555 group by i; +i count(*) +1 1 +2 1 +3 1 +select std(s1/s2) from bug22555 where i=1; +std(s1/s2) +0.00000000 +select std(s1/s2) from bug22555 where i=2; +std(s1/s2) +0.00000000 +select std(s1/s2) from bug22555 where i=3; +std(s1/s2) +0.00000000 +select std(s1/s2) from bug22555 where i=1 group by i; +std(s1/s2) +0.00000000 +select std(s1/s2) from bug22555 where i=2 group by i; +std(s1/s2) +0.00000000 +select std(s1/s2) from bug22555 where i=3 group by i; +std(s1/s2) +0.00000000 +select std(s1/s2) from bug22555 group by i order by i; +std(s1/s2) +0.00000000 +0.00000000 +0.00000000 +select i, count(*), std(o1/o2) from bug22555 group by i order by i; +i count(*) std(o1/o2) +1 1 0 +2 1 0 +3 1 0 +select i, count(*), std(e1/e2) from bug22555 group by i order by i; +i count(*) std(e1/e2) +1 1 0.00000000 +2 1 0.00000000 +3 1 0.00000000 +set @saved_div_precision_increment=@@div_precision_increment; +set div_precision_increment=19; +select i, count(*), variance(s1/s2) from bug22555 group by i order by i; +i count(*) variance(s1/s2) +1 1 0.000000000000000000000000000000 +2 1 0.000000000000000000000000000000 +3 1 0.000000000000000000000000000000 +select i, count(*), variance(o1/o2) from bug22555 group by i order by i; +i count(*) variance(o1/o2) +1 1 0 +2 1 0 +3 1 0 +select i, count(*), variance(e1/e2) from bug22555 group by i order by i; +i count(*) variance(e1/e2) +1 1 0.000000000000000000000000000000 +2 1 0.000000000000000000000000000000 +3 1 0.000000000000000000000000000000 +select i, count(*), std(s1/s2) from bug22555 group by i order by i; +i count(*) std(s1/s2) +1 1 0.000000000000000000000000000000 +2 1 0.000000000000000000000000000000 +3 1 0.000000000000000000000000000000 +select i, count(*), std(o1/o2) from bug22555 group by i order by i; +i count(*) std(o1/o2) +1 1 0 +2 1 0 +3 1 0 +select i, count(*), std(e1/e2) from bug22555 group by i order by i; +i count(*) std(e1/e2) +1 1 0.000000000000000000000000000000 +2 1 0.000000000000000000000000000000 +3 1 0.000000000000000000000000000000 +set div_precision_increment=20; +select i, count(*), variance(s1/s2) from bug22555 group by i order by i; +i count(*) variance(s1/s2) +1 1 0.000000000000000000000000000000 +2 1 0.000000000000000000000000000000 +3 1 0.000000000000000000000000000000 +select i, count(*), variance(o1/o2) from bug22555 group by i order by i; +i count(*) variance(o1/o2) +1 1 0 +2 1 0 +3 1 0 +select i, count(*), variance(e1/e2) from bug22555 group by i order by i; +i count(*) variance(e1/e2) +1 1 0.000000000000000000000000000000 +2 1 0.000000000000000000000000000000 +3 1 0.000000000000000000000000000000 +select i, count(*), std(s1/s2) from bug22555 group by i order by i; +i count(*) std(s1/s2) +1 1 0.000000000000000000000000000000 +2 1 0.000000000000000000000000000000 +3 1 0.000000000000000000000000000000 +select i, count(*), std(o1/o2) from bug22555 group by i order by i; +i count(*) std(o1/o2) +1 1 0 +2 1 0 +3 1 0 +select i, count(*), std(e1/e2) from bug22555 group by i order by i; +i count(*) std(e1/e2) +1 1 0.000000000000000000000000000000 +2 1 0.000000000000000000000000000000 +3 1 0.000000000000000000000000000000 +set @@div_precision_increment=@saved_div_precision_increment; +insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76); +insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76); +insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76); +select i, count(*), std(s1/s2) from bug22555 group by i order by i; +i count(*) std(s1/s2) +1 4 0.00000000 +2 4 0.00000000 +3 4 0.00000000 +select i, count(*), std(o1/o2) from bug22555 group by i order by i; +i count(*) std(o1/o2) +1 4 0 +2 4 0 +3 4 0 +select i, count(*), std(e1/e2) from bug22555 group by i order by i; +i count(*) std(e1/e2) +1 4 0.00000000 +2 4 0.00000000 +3 4 0.00000000 +select std(s1/s2) from bug22555; +std(s1/s2) +0.21325764 +select std(o1/o2) from bug22555; +std(o1/o2) +0.21325763586649 +select std(e1/e2) from bug22555; +std(e1/e2) +0.21325764 +set @saved_div_precision_increment=@@div_precision_increment; +set div_precision_increment=19; +select i, count(*), std(s1/s2) from bug22555 group by i order by i; +i count(*) std(s1/s2) +1 4 0.000000000000000000000000000000 +2 4 0.000000000000000000000000000000 +3 4 0.000000000000000000000000000000 +select i, count(*), std(o1/o2) from bug22555 group by i order by i; +i count(*) std(o1/o2) +1 4 0 +2 4 0 +3 4 0 +select i, count(*), std(e1/e2) from bug22555 group by i order by i; +i count(*) std(e1/e2) +1 4 0.000000000000000000000000000000 +2 4 0.000000000000000000000000000000 +3 4 0.000000000000000000000000000000 +select round(std(s1/s2), 17) from bug22555; +round(std(s1/s2), 17) +0.21325763586649341 +select std(o1/o2) from bug22555; +std(o1/o2) +0.21325763586649 +select round(std(e1/e2), 17) from bug22555; +round(std(e1/e2), 17) +0.21325763586649341 +set div_precision_increment=20; +select i, count(*), std(s1/s2) from bug22555 group by i order by i; +i count(*) std(s1/s2) +1 4 0.000000000000000000000000000000 +2 4 0.000000000000000000000000000000 +3 4 0.000000000000000000000000000000 +select i, count(*), std(o1/o2) from bug22555 group by i order by i; +i count(*) std(o1/o2) +1 4 0 +2 4 0 +3 4 0 +select i, count(*), std(e1/e2) from bug22555 group by i order by i; +i count(*) std(e1/e2) +1 4 0.000000000000000000000000000000 +2 4 0.000000000000000000000000000000 +3 4 0.000000000000000000000000000000 +select round(std(s1/s2), 17) from bug22555; +round(std(s1/s2), 17) +0.21325763586649341 +select std(o1/o2) from bug22555; +std(o1/o2) +0.21325763586649 +select round(std(e1/e2), 17) from bug22555; +round(std(e1/e2), 17) +0.21325763586649341 +set @@div_precision_increment=@saved_div_precision_increment; +drop table bug22555; +create table bug22555 (s smallint, o double, e decimal); +insert into bug22555 values (1,1,1),(2,2,2),(3,3,3),(6,6,6),(7,7,7); +select var_samp(s), var_pop(s) from bug22555; +var_samp(s) var_pop(s) +6.7000 5.3600 +select var_samp(o), var_pop(o) from bug22555; +var_samp(o) var_pop(o) +6.7 5.36 +select var_samp(e), var_pop(e) from bug22555; +var_samp(e) var_pop(e) +6.7000 5.3600 +drop table bug22555; +create table bug22555 (s smallint, o double, e decimal); +insert into bug22555 values (null,null,null),(null,null,null); +select var_samp(s) as 'null', var_pop(s) as 'null' from bug22555; +null null +NULL NULL +select var_samp(o) as 'null', var_pop(o) as 'null' from bug22555; +null null +NULL NULL +select var_samp(e) as 'null', var_pop(e) as 'null' from bug22555; +null null +NULL NULL +insert into bug22555 values (1,1,1); +select var_samp(s) as 'null', var_pop(s) as '0' from bug22555; +null 0 +NULL 0.0000 +select var_samp(o) as 'null', var_pop(o) as '0' from bug22555; +null 0 +NULL 0 +select var_samp(e) as 'null', var_pop(e) as '0' from bug22555; +null 0 +NULL 0.0000 +insert into bug22555 values (2,2,2); +select var_samp(s) as '0.5', var_pop(s) as '0.25' from bug22555; +0.5 0.25 +0.5000 0.2500 +select var_samp(o) as '0.5', var_pop(o) as '0.25' from bug22555; +0.5 0.25 +0.5 0.25 +select var_samp(e) as '0.5', var_pop(e) as '0.25' from bug22555; +0.5 0.25 +0.5000 0.2500 +drop table bug22555; CREATE TABLE t1 (a INT, b INT); INSERT INTO t1 VALUES (1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8); INSERT INTO t1 SELECT a, b+8 FROM t1; diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result index 98e39917f04..d9ca9e80e44 100644 --- a/mysql-test/r/func_in.result +++ b/mysql-test/r/func_in.result @@ -350,6 +350,10 @@ select some_id from t1 where some_id not in(-4,-1,3423534,2342342); some_id 1 2 +select some_id from t1 where some_id not in('-1', '0'); +some_id +1 +2 drop table t1; CREATE TABLE t1 (a int, b int, PRIMARY KEY (a)); INSERT INTO t1 VALUES (1,1),(2,1),(3,1),(4,1),(5,1),(6,1); diff --git a/mysql-test/r/mix_innodb_myisam_binlog.result b/mysql-test/r/mix_innodb_myisam_binlog.result index 6c19c429296..a8b132ae927 100644 --- a/mysql-test/r/mix_innodb_myisam_binlog.result +++ b/mysql-test/r/mix_innodb_myisam_binlog.result @@ -275,8 +275,8 @@ is not null; is not null 1 select -@a like "%#%error_code=0%ROLLBACK;%ROLLBACK /* added by mysqlbinlog */;%", +@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%", @a not like "%#%error_code=%error_code=%"; -@a like "%#%error_code=0%ROLLBACK;%ROLLBACK /* added by mysqlbinlog */;%" @a not like "%#%error_code=%error_code=%" +@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%" @a not like "%#%error_code=%error_code=%" 1 1 drop table t1, t2; diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 2ea317754ec..3ed2d10c9c9 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -922,6 +922,7 @@ SET @@myisam_repair_threads=1; SHOW VARIABLES LIKE 'myisam_repair%'; Variable_name Value myisam_repair_threads 1 +End of 4.1 tests set storage_engine=MyISAM; drop table if exists t1,t2,t3; --- Testing varchar --- @@ -1608,16 +1609,4 @@ create table t3 (c1 int) engine=myisam pack_keys=default; create table t4 (c1 int) engine=myisam pack_keys=2; 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 '2' at line 1 drop table t1, t2, t3; -show create table t1; -show create table t1; -create table t1 (a int) engine=myisam select 42 a; -select * from t1; -a -9 -select * from t1; -a -99 -select * from t1; -a -42 -drop table t1; +End of 5.0 tests diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index c3be791b523..b2571ec5d12 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -15,31 +15,33 @@ flush logs; --- Local -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=1000000000; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -drop table if exists t1,t2; -SET TIMESTAMP=1000000000; -create table t1 (word varchar(20)); -SET TIMESTAMP=1000000000; -create table t2 (id int auto_increment not null primary key); -SET TIMESTAMP=1000000000; -insert into t1 values ("abirvalg"); -SET INSERT_ID=1; -SET TIMESTAMP=1000000000; -insert into t2 values (); -SET TIMESTAMP=1000000000; -load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-0' INTO table t1; -SET TIMESTAMP=1000000000; -load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-0' INTO table t1; -SET TIMESTAMP=1000000000; -load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-0' INTO table t1; -SET TIMESTAMP=1000000000; -load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-0' INTO table t1; +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +drop table if exists t1,t2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +create table t1 (word varchar(20))/*!*/; +SET TIMESTAMP=1000000000/*!*/; +create table t2 (id int auto_increment not null primary key)/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 values ("abirvalg")/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t2 values ()/*!*/; +SET TIMESTAMP=1000000000/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-0' INTO table t1/*!*/; +SET TIMESTAMP=1000000000/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-0' INTO table t1/*!*/; +SET TIMESTAMP=1000000000/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-0' INTO table t1/*!*/; +SET TIMESTAMP=1000000000/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-0' INTO table t1/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -47,13 +49,15 @@ ROLLBACK /* added by mysqlbinlog */; --- Broken LOAD DATA -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -use test; -SET TIMESTAMP=1000000000; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values ("Alas"); +DELIMITER /*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values ("Alas")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -61,8 +65,10 @@ ROLLBACK /* added by mysqlbinlog */; --- --database -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -SET INSERT_ID=1; +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET INSERT_ID=1/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -70,13 +76,15 @@ ROLLBACK /* added by mysqlbinlog */; --- --position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -use test; -SET TIMESTAMP=1000000000; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values ("Alas"); +DELIMITER /*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values ("Alas")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -84,31 +92,33 @@ ROLLBACK /* added by mysqlbinlog */; --- Remote -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=1000000000; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -drop table if exists t1,t2; -SET TIMESTAMP=1000000000; -create table t1 (word varchar(20)); -SET TIMESTAMP=1000000000; -create table t2 (id int auto_increment not null primary key); -SET TIMESTAMP=1000000000; -insert into t1 values ("abirvalg"); -SET INSERT_ID=1; -SET TIMESTAMP=1000000000; -insert into t2 values (); -SET TIMESTAMP=1000000000; -load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-2' INTO table t1; -SET TIMESTAMP=1000000000; -load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-2' INTO table t1; -SET TIMESTAMP=1000000000; -load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-2' INTO table t1; -SET TIMESTAMP=1000000000; -load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-2' INTO table t1; +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +drop table if exists t1,t2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +create table t1 (word varchar(20))/*!*/; +SET TIMESTAMP=1000000000/*!*/; +create table t2 (id int auto_increment not null primary key)/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 values ("abirvalg")/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t2 values ()/*!*/; +SET TIMESTAMP=1000000000/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-2' INTO table t1/*!*/; +SET TIMESTAMP=1000000000/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-2' INTO table t1/*!*/; +SET TIMESTAMP=1000000000/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-2' INTO table t1/*!*/; +SET TIMESTAMP=1000000000/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-2' INTO table t1/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -116,13 +126,15 @@ ROLLBACK /* added by mysqlbinlog */; --- Broken LOAD DATA -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -use test; -SET TIMESTAMP=1000000000; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values ("Alas"); +DELIMITER /*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values ("Alas")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -130,8 +142,10 @@ ROLLBACK /* added by mysqlbinlog */; --- --database -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -SET INSERT_ID=1; +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET INSERT_ID=1/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -139,13 +153,15 @@ ROLLBACK /* added by mysqlbinlog */; --- --position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -use test; -SET TIMESTAMP=1000000000; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values ("Alas"); +DELIMITER /*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values ("Alas")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -153,22 +169,26 @@ ROLLBACK /* added by mysqlbinlog */; --- reading stdin -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=1108844556; -BEGIN; -SET TIMESTAMP=1108844555; -insert t1 values (1); +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1108844556/*!*/; +BEGIN/*!*/; +SET TIMESTAMP=1108844555/*!*/; +insert t1 values (1)/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -use test; -SET TIMESTAMP=1108844556; -BEGIN; -SET TIMESTAMP=1108844555; -insert t1 values (1); +DELIMITER /*!*/; +use test/*!*/; +SET TIMESTAMP=1108844556/*!*/; +BEGIN/*!*/; +SET TIMESTAMP=1108844555/*!*/; +insert t1 values (1)/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -194,4 +214,59 @@ select * from t5 /* must be (1),(1) */; a 1 1 +flush logs; +drop table if exists t5; +create table t5 (c1 int, c2 varchar(128) character set latin1 not null); +insert into t5 values (1, date_format('2001-01-01','%W')); +set lc_time_names=de_DE; +insert into t5 values (2, date_format('2001-01-01','%W')); +set lc_time_names=en_US; +insert into t5 values (3, date_format('2001-01-01','%W')); +select * from t5 order by c1; +c1 c2 +1 Monday +2 Montag +3 Monday +flush logs; +drop table t5; +select * from t5 order by c1; +c1 c2 +1 Monday +2 Montag +3 Monday +drop procedure if exists p1; +flush logs; +create procedure p1() +begin +select 1; +end; +// +flush logs; +call p1(); +1 +1 +drop procedure p1; +call p1(); +ERROR 42000: PROCEDURE test.p1 does not exist +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +CREATE DEFINER=`root`@`localhost` procedure p1() +begin +select 1; +end/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +call p1(); +1 +1 +drop procedure p1; drop table t1, t2, t03, t04, t3, t4, t5; diff --git a/mysql-test/r/mysqlbinlog2.result b/mysql-test/r/mysqlbinlog2.result index 4d6be811037..51ca19654c7 100644 --- a/mysql-test/r/mysqlbinlog2.result +++ b/mysql-test/r/mysqlbinlog2.result @@ -17,29 +17,31 @@ insert into t1 values(null, "f"); --- Local -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -create table t1 (a int auto_increment not null primary key, b char(3)); -SET INSERT_ID=1; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); -SET INSERT_ID=3; -SET TIMESTAMP=1579609944; -insert into t1 values(null, "c"); -SET INSERT_ID=4; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +create table t1 (a int auto_increment not null primary key, b char(3))/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1579609944/*!*/; +insert into t1 values(null, "c")/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -47,27 +49,29 @@ ROLLBACK /* added by mysqlbinlog */; --- offset -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -SET INSERT_ID=1; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); -SET INSERT_ID=3; -SET TIMESTAMP=1579609944; -insert into t1 values(null, "c"); -SET INSERT_ID=4; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET INSERT_ID=1/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1579609944/*!*/; +insert into t1 values(null, "c")/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -75,17 +79,19 @@ ROLLBACK /* added by mysqlbinlog */; --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -SET INSERT_ID=4; -use test; -SET TIMESTAMP=1579609946; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); +DELIMITER /*!*/; +SET INSERT_ID=4/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609946/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -93,23 +99,25 @@ ROLLBACK /* added by mysqlbinlog */; --- stop-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -create table t1 (a int auto_increment not null primary key, b char(3)); -SET INSERT_ID=1; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); -SET INSERT_ID=3; -SET TIMESTAMP=1579609944; -insert into t1 values(null, "c"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +create table t1 (a int auto_increment not null primary key, b char(3))/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1579609944/*!*/; +insert into t1 values(null, "c")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -117,21 +125,23 @@ ROLLBACK /* added by mysqlbinlog */; --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -SET INSERT_ID=3; -use test; -SET TIMESTAMP=1579609944; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "c"); -SET INSERT_ID=4; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET INSERT_ID=3/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609944/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "c")/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -139,20 +149,22 @@ ROLLBACK /* added by mysqlbinlog */; --- stop-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -create table t1 (a int auto_increment not null primary key, b char(3)); -SET INSERT_ID=1; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +create table t1 (a int auto_increment not null primary key, b char(3))/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -160,37 +172,41 @@ ROLLBACK /* added by mysqlbinlog */; --- Local with 2 binlogs on command line -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -create table t1 (a int auto_increment not null primary key, b char(3)); -SET INSERT_ID=1; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); -SET INSERT_ID=3; -SET TIMESTAMP=1579609944; -insert into t1 values(null, "c"); -SET INSERT_ID=4; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); -SET INSERT_ID=6; -use test; -SET TIMESTAMP=1579609943; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "f"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +create table t1 (a int auto_increment not null primary key, b char(3))/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1579609944/*!*/; +insert into t1 values(null, "c")/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; +DELIMITER /*!*/; +SET INSERT_ID=6/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609943/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "f")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -198,35 +214,39 @@ ROLLBACK /* added by mysqlbinlog */; --- offset -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -SET INSERT_ID=1; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); -SET INSERT_ID=3; -SET TIMESTAMP=1579609944; -insert into t1 values(null, "c"); -SET INSERT_ID=4; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); -SET INSERT_ID=6; -use test; -SET TIMESTAMP=1579609943; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "f"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET INSERT_ID=1/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1579609944/*!*/; +insert into t1 values(null, "c")/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; +DELIMITER /*!*/; +SET INSERT_ID=6/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609943/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "f")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -234,25 +254,29 @@ ROLLBACK /* added by mysqlbinlog */; --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -SET INSERT_ID=4; -use test; -SET TIMESTAMP=1579609946; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); -SET INSERT_ID=6; -use test; -SET TIMESTAMP=1579609943; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "f"); +DELIMITER /*!*/; +SET INSERT_ID=4/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609946/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; +DELIMITER /*!*/; +SET INSERT_ID=6/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609943/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "f")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -260,30 +284,34 @@ ROLLBACK /* added by mysqlbinlog */; --- stop-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -create table t1 (a int auto_increment not null primary key, b char(3)); -SET INSERT_ID=1; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); -SET INSERT_ID=3; -SET TIMESTAMP=1579609944; -insert into t1 values(null, "c"); -SET INSERT_ID=4; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); -SET INSERT_ID=6; +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +create table t1 (a int auto_increment not null primary key, b char(3))/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1579609944/*!*/; +insert into t1 values(null, "c")/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; +DELIMITER /*!*/; +SET INSERT_ID=6/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -291,29 +319,33 @@ ROLLBACK /* added by mysqlbinlog */; --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -SET INSERT_ID=3; -use test; -SET TIMESTAMP=1579609944; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "c"); -SET INSERT_ID=4; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); -SET INSERT_ID=6; -use test; -SET TIMESTAMP=1579609943; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "f"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET INSERT_ID=3/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609944/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "c")/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; +DELIMITER /*!*/; +SET INSERT_ID=6/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609943/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "f")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -321,20 +353,22 @@ ROLLBACK /* added by mysqlbinlog */; --- stop-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -create table t1 (a int auto_increment not null primary key, b char(3)); -SET INSERT_ID=1; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +create table t1 (a int auto_increment not null primary key, b char(3))/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -342,29 +376,31 @@ ROLLBACK /* added by mysqlbinlog */; --- Remote -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -create table t1 (a int auto_increment not null primary key, b char(3)); -SET INSERT_ID=1; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); -SET INSERT_ID=3; -SET TIMESTAMP=1579609944; -insert into t1 values(null, "c"); -SET INSERT_ID=4; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +create table t1 (a int auto_increment not null primary key, b char(3))/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1579609944/*!*/; +insert into t1 values(null, "c")/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -372,27 +408,29 @@ ROLLBACK /* added by mysqlbinlog */; --- offset -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -SET INSERT_ID=1; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); -SET INSERT_ID=3; -SET TIMESTAMP=1579609944; -insert into t1 values(null, "c"); -SET INSERT_ID=4; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET INSERT_ID=1/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1579609944/*!*/; +insert into t1 values(null, "c")/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -400,17 +438,19 @@ ROLLBACK /* added by mysqlbinlog */; --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -SET INSERT_ID=4; -use test; -SET TIMESTAMP=1579609946; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); +DELIMITER /*!*/; +SET INSERT_ID=4/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609946/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -418,23 +458,25 @@ ROLLBACK /* added by mysqlbinlog */; --- stop-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -create table t1 (a int auto_increment not null primary key, b char(3)); -SET INSERT_ID=1; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); -SET INSERT_ID=3; -SET TIMESTAMP=1579609944; -insert into t1 values(null, "c"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +create table t1 (a int auto_increment not null primary key, b char(3))/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1579609944/*!*/; +insert into t1 values(null, "c")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -442,21 +484,23 @@ ROLLBACK /* added by mysqlbinlog */; --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -SET INSERT_ID=3; -use test; -SET TIMESTAMP=1579609944; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "c"); -SET INSERT_ID=4; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET INSERT_ID=3/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609944/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "c")/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -464,20 +508,22 @@ ROLLBACK /* added by mysqlbinlog */; --- stop-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -create table t1 (a int auto_increment not null primary key, b char(3)); -SET INSERT_ID=1; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +create table t1 (a int auto_increment not null primary key, b char(3))/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -485,37 +531,41 @@ ROLLBACK /* added by mysqlbinlog */; --- Remote with 2 binlogs on command line -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -create table t1 (a int auto_increment not null primary key, b char(3)); -SET INSERT_ID=1; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); -SET INSERT_ID=3; -SET TIMESTAMP=1579609944; -insert into t1 values(null, "c"); -SET INSERT_ID=4; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); -SET INSERT_ID=6; -use test; -SET TIMESTAMP=1579609943; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "f"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +create table t1 (a int auto_increment not null primary key, b char(3))/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1579609944/*!*/; +insert into t1 values(null, "c")/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; +DELIMITER /*!*/; +SET INSERT_ID=6/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609943/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "f")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -523,35 +573,39 @@ ROLLBACK /* added by mysqlbinlog */; --- offset -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -SET INSERT_ID=1; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); -SET INSERT_ID=3; -SET TIMESTAMP=1579609944; -insert into t1 values(null, "c"); -SET INSERT_ID=4; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); -SET INSERT_ID=6; -use test; -SET TIMESTAMP=1579609943; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "f"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET INSERT_ID=1/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1579609944/*!*/; +insert into t1 values(null, "c")/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; +DELIMITER /*!*/; +SET INSERT_ID=6/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609943/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "f")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -559,25 +613,29 @@ ROLLBACK /* added by mysqlbinlog */; --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -SET INSERT_ID=4; -use test; -SET TIMESTAMP=1579609946; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); -SET INSERT_ID=6; -use test; -SET TIMESTAMP=1579609943; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "f"); +DELIMITER /*!*/; +SET INSERT_ID=4/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609946/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; +DELIMITER /*!*/; +SET INSERT_ID=6/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609943/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "f")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -585,30 +643,34 @@ ROLLBACK /* added by mysqlbinlog */; --- stop-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -create table t1 (a int auto_increment not null primary key, b char(3)); -SET INSERT_ID=1; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); -SET INSERT_ID=3; -SET TIMESTAMP=1579609944; -insert into t1 values(null, "c"); -SET INSERT_ID=4; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); -SET INSERT_ID=6; +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +create table t1 (a int auto_increment not null primary key, b char(3))/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1579609944/*!*/; +insert into t1 values(null, "c")/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; +DELIMITER /*!*/; +SET INSERT_ID=6/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -616,29 +678,33 @@ ROLLBACK /* added by mysqlbinlog */; --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -SET INSERT_ID=3; -use test; -SET TIMESTAMP=1579609944; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "c"); -SET INSERT_ID=4; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); -SET INSERT_ID=6; -use test; -SET TIMESTAMP=1579609943; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -insert into t1 values(null, "f"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET INSERT_ID=3/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609944/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "c")/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +DELIMITER ; +DELIMITER /*!*/; +SET INSERT_ID=6/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609943/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +insert into t1 values(null, "f")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -646,20 +712,22 @@ ROLLBACK /* added by mysqlbinlog */; --- stop-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -create table t1 (a int auto_increment not null primary key, b char(3)); -SET INSERT_ID=1; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +create table t1 (a int auto_increment not null primary key, b char(3))/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; @@ -667,32 +735,34 @@ ROLLBACK /* added by mysqlbinlog */; --- to-last-log -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=1579609942; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -create table t1 (a int auto_increment not null primary key, b char(3)); -SET INSERT_ID=1; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "a"); -SET INSERT_ID=2; -SET TIMESTAMP=1579609942; -insert into t1 values(null, "b"); -SET INSERT_ID=3; -SET TIMESTAMP=1579609944; -insert into t1 values(null, "c"); -SET INSERT_ID=4; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "d"); -SET INSERT_ID=5; -SET TIMESTAMP=1579609946; -insert into t1 values(null, "e"); -SET INSERT_ID=6; -SET TIMESTAMP=1579609943; -insert into t1 values(null, "f"); +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=1579609942/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +create table t1 (a int auto_increment not null primary key, b char(3))/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "a")/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1579609942/*!*/; +insert into t1 values(null, "b")/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1579609944/*!*/; +insert into t1 values(null, "c")/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "d")/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1579609946/*!*/; +insert into t1 values(null, "e")/*!*/; +SET INSERT_ID=6/*!*/; +SET TIMESTAMP=1579609943/*!*/; +insert into t1 values(null, "f")/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 35a79d6a805..2d32984e4ef 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -1786,6 +1786,78 @@ CREATE TABLE `t1` ( /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; drop table t1; +# +# BUG#13926: --order-by-primary fails if PKEY contains quote character +# +DROP TABLE IF EXISTS `t1`; +CREATE TABLE `t1` ( +`a b` INT, +`c"d` INT, +`e``f` INT, +PRIMARY KEY (`a b`, `c"d`, `e``f`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +insert into t1 values (0815, 4711, 2006); +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS "t1"; +CREATE TABLE "t1" ( + "a b" int(11) NOT NULL default '0', + "c""d" int(11) NOT NULL default '0', + "e`f" int(11) NOT NULL default '0', + PRIMARY KEY ("a b","c""d","e`f") +); + +LOCK TABLES "t1" WRITE; +/*!40000 ALTER TABLE "t1" DISABLE KEYS */; +INSERT INTO "t1" VALUES (815,4711,2006); +/*!40000 ALTER TABLE "t1" ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `t1`; +CREATE TABLE `t1` ( + `a b` int(11) NOT NULL default '0', + `c"d` int(11) NOT NULL default '0', + `e``f` int(11) NOT NULL default '0', + PRIMARY KEY (`a b`,`c"d`,`e``f`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +LOCK TABLES `t1` WRITE; +/*!40000 ALTER TABLE `t1` DISABLE KEYS */; +INSERT INTO `t1` VALUES (815,4711,2006); +/*!40000 ALTER TABLE `t1` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +DROP TABLE `t1`; End of 4.1 tests # # Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X) @@ -3124,78 +3196,6 @@ drop user myDB_User@localhost; drop database mysqldump_myDB; use test; # -# BUG#13926: --order-by-primary fails if PKEY contains quote character -# -DROP TABLE IF EXISTS `t1`; -CREATE TABLE `t1` ( -`a b` INT, -`c"d` INT, -`e``f` INT, -PRIMARY KEY (`a b`, `c"d`, `e``f`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; -insert into t1 values (0815, 4711, 2006); -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -DROP TABLE IF EXISTS "t1"; -CREATE TABLE "t1" ( - "a b" int(11) NOT NULL default '0', - "c""d" int(11) NOT NULL default '0', - "e`f" int(11) NOT NULL default '0', - PRIMARY KEY ("a b","c""d","e`f") -); - -LOCK TABLES "t1" WRITE; -/*!40000 ALTER TABLE "t1" DISABLE KEYS */; -INSERT INTO "t1" VALUES (815,4711,2006); -/*!40000 ALTER TABLE "t1" ENABLE KEYS */; -UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -DROP TABLE IF EXISTS `t1`; -CREATE TABLE `t1` ( - `a b` int(11) NOT NULL default '0', - `c"d` int(11) NOT NULL default '0', - `e``f` int(11) NOT NULL default '0', - PRIMARY KEY (`a b`,`c"d`,`e``f`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - -LOCK TABLES `t1` WRITE; -/*!40000 ALTER TABLE `t1` DISABLE KEYS */; -INSERT INTO `t1` VALUES (815,4711,2006); -/*!40000 ALTER TABLE `t1` ENABLE KEYS */; -UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - -DROP TABLE `t1`; -# # Bug #19745: mysqldump --xml produces invalid xml # DROP TABLE IF EXISTS t1; diff --git a/mysql-test/r/ndb_lock.result b/mysql-test/r/ndb_lock.result index 2c212b9cfef..d5875cb4d47 100644 --- a/mysql-test/r/ndb_lock.result +++ b/mysql-test/r/ndb_lock.result @@ -87,11 +87,27 @@ x y z rollback; commit; begin; +select * from t1 where y = 'one' or y = 'three' for update; +x y z +# # # +# # # +begin; +select * from t1 where x = 2 for update; +x y z +2 two 2 +select * from t1 where x = 1 for update; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +rollback; +commit; +begin; select * from t1 where y = 'one' or y = 'three' order by x for update; x y z 1 one 1 3 three 3 begin; +select * from t1 where x = 2 for update; +x y z +2 two 2 select * from t1 where x = 1 for update; ERROR HY000: Lock wait timeout exceeded; try restarting transaction rollback; @@ -124,6 +140,22 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction rollback; commit; begin; +select * from t1 where y = 'one' or y = 'three' lock in share mode; +x y z +# # # +# # # +begin; +select * from t1 where y = 'one' lock in share mode; +x y z +1 one 1 +select * from t1 where x = 2 for update; +x y z +2 two 2 +select * from t1 where x = 1 for update; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +rollback; +commit; +begin; select * from t1 where y = 'one' or y = 'three' order by x lock in share mode; x y z 1 one 1 @@ -132,6 +164,9 @@ begin; select * from t1 where y = 'one' lock in share mode; x y z 1 one 1 +select * from t1 where x = 2 for update; +x y z +2 two 2 select * from t1 where x = 1 for update; ERROR HY000: Lock wait timeout exceeded; try restarting transaction rollback; diff --git a/mysql-test/r/ndb_types.result b/mysql-test/r/ndb_types.result index 6938277f01d..ec2858d818a 100644 --- a/mysql-test/r/ndb_types.result +++ b/mysql-test/r/ndb_types.result @@ -73,3 +73,4 @@ select time_stamp>@now from t1; time_stamp>@now 1 drop table t1; +End of 4.1 tests diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 000a9317b8d..21d8ba05acc 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -1055,6 +1055,65 @@ EXECUTE stmt USING @a; 0 0 DEALLOCATE PREPARE stmt; DROP TABLE t1; +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (i INT); +PREPARE st_19182 +FROM "CREATE TABLE t2 (i INT, j INT, KEY (i), KEY(j)) SELECT i FROM t1"; +EXECUTE st_19182; +DESC t2; +Field Type Null Key Default Extra +j int(11) YES MUL NULL +i int(11) YES MUL NULL +DROP TABLE t2; +EXECUTE st_19182; +DESC t2; +Field Type Null Key Default Extra +j int(11) YES MUL NULL +i int(11) YES MUL NULL +DEALLOCATE PREPARE st_19182; +DROP TABLE t2, t1; +drop database if exists mysqltest; +drop table if exists t1, t2; +create database mysqltest character set utf8; +prepare stmt1 from "create table mysqltest.t1 (c char(10))"; +prepare stmt2 from "create table mysqltest.t2 select 'test'"; +execute stmt1; +execute stmt2; +show create table mysqltest.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` char(10) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +show create table mysqltest.t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `test` varchar(4) character set latin1 NOT NULL default '' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +drop table mysqltest.t1; +drop table mysqltest.t2; +alter database mysqltest character set latin1; +execute stmt1; +execute stmt2; +show create table mysqltest.t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` char(10) character set utf8 default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +show create table mysqltest.t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `test` varchar(4) NOT NULL default '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop database mysqltest; +deallocate prepare stmt1; +deallocate prepare stmt2; +execute stmt; +show create table t1; +drop table t1; +execute stmt; +show create table t1; +drop table t1; +deallocate prepare stmt; End of 4.1 tests. create table t1 (a varchar(20)); insert into t1 values ('foo'); @@ -1536,4 +1595,54 @@ a 2 DEALLOCATE PREPARE stmt; DROP TABLE t1,t2; +drop table if exists t1; +create table t1 (s1 char(20)); +prepare stmt from "alter table t1 modify s1 int"; +execute stmt; +execute stmt; +drop table t1; +deallocate prepare stmt; +drop table if exists t1; +create table t1 (a int, b int); +prepare s_6895 from "alter table t1 drop column b"; +execute s_6895; +show columns from t1; +Field Type Null Key Default Extra +a int(11) YES NULL +drop table t1; +create table t1 (a int, b int); +execute s_6895; +show columns from t1; +Field Type Null Key Default Extra +a int(11) YES NULL +drop table t1; +create table t1 (a int, b int); +execute s_6895; +show columns from t1; +Field Type Null Key Default Extra +a int(11) YES NULL +deallocate prepare s_6895; +drop table t1; +create table t1 (i int primary key auto_increment) comment='comment for table t1'; +create table t2 (i int, j int, k int); +prepare stmt from "alter table t1 auto_increment=100"; +execute stmt; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) NOT NULL auto_increment, + PRIMARY KEY (`i`) +) ENGINE=MyISAM AUTO_INCREMENT=100 DEFAULT CHARSET=latin1 COMMENT='comment for table t1' +flush tables; +select * from t2; +i j k +execute stmt; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) NOT NULL auto_increment, + PRIMARY KEY (`i`) +) ENGINE=MyISAM AUTO_INCREMENT=100 DEFAULT CHARSET=latin1 COMMENT='comment for table t1' +deallocate prepare stmt; +drop table t1, t2; End of 5.0 tests. diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index f84bb2788e1..e342e8d1d7f 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -521,8 +521,8 @@ select count(*) from t1 where x = 18446744073709551601; count(*) 1 create table t2 (x bigint not null); -insert into t2(x) values (cast(0xfffffffffffffff0+0 as signed)); -insert into t2(x) values (cast(0xfffffffffffffff1+0 as signed)); +insert into t2(x) values (-16); +insert into t2(x) values (-15); select * from t2; x -16 diff --git a/mysql-test/r/rpl_charset.result b/mysql-test/r/rpl_charset.result index e3e677ad0da..4b6d9f44a2b 100644 --- a/mysql-test/r/rpl_charset.result +++ b/mysql-test/r/rpl_charset.result @@ -176,84 +176,86 @@ hex(c1) hex(c2) CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -SET TIMESTAMP=1000000000; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -drop database if exists mysqltest2; -SET TIMESTAMP=1000000000; -drop database if exists mysqltest3; -SET TIMESTAMP=1000000000; -create database mysqltest2 character set latin2; -SET TIMESTAMP=1000000000; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30; -create database mysqltest3; -SET TIMESTAMP=1000000000; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=64; -drop database mysqltest3; -SET TIMESTAMP=1000000000; -create database mysqltest3; -use mysqltest2; -SET TIMESTAMP=1000000000; -create table t1 (a int auto_increment primary key, b varchar(100)); -SET INSERT_ID=1; -SET TIMESTAMP=1000000000; -/*!\C cp850 */; -SET @@session.character_set_client=4,@@session.collation_connection=27,@@session.collation_server=64; -insert into t1 (b) values(@@character_set_server); -SET INSERT_ID=2; -SET TIMESTAMP=1000000000; -insert into t1 (b) values(@@collation_server); -SET INSERT_ID=3; -SET TIMESTAMP=1000000000; -insert into t1 (b) values(@@character_set_client); -SET INSERT_ID=4; -SET TIMESTAMP=1000000000; -insert into t1 (b) values(@@character_set_connection); -SET INSERT_ID=5; -SET TIMESTAMP=1000000000; -insert into t1 (b) values(@@collation_connection); -SET TIMESTAMP=1000000000; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=5,@@session.collation_server=64; -truncate table t1; -SET INSERT_ID=1; -SET TIMESTAMP=1000000000; -insert into t1 (b) values(@@collation_connection); -SET INSERT_ID=2; -SET TIMESTAMP=1000000000; -insert into t1 (b) values(LEAST("Müller","Muffler")); -SET INSERT_ID=3; -SET TIMESTAMP=1000000000; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=31,@@session.collation_server=64; -insert into t1 (b) values(@@collation_connection); -SET INSERT_ID=4; -SET TIMESTAMP=1000000000; -insert into t1 (b) values(LEAST("Müller","Muffler")); -SET TIMESTAMP=1000000000; -truncate table t1; -SET INSERT_ID=1; -SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`; -SET TIMESTAMP=1000000000; -insert into t1 (b) values(collation(@a)); -SET TIMESTAMP=1000000000; -drop database mysqltest2; -SET TIMESTAMP=1000000000; -drop database mysqltest3; -use test; -SET TIMESTAMP=1000000000; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30; -CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255)); -SET TIMESTAMP=1000000000; -/*!\C koi8r */; -SET @@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30; -INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ'); +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +drop database if exists mysqltest2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +drop database if exists mysqltest3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +create database mysqltest2 character set latin2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30/*!*/; +create database mysqltest3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=64/*!*/; +drop database mysqltest3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +create database mysqltest3/*!*/; +use mysqltest2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +create table t1 (a int auto_increment primary key, b varchar(100))/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C cp850 *//*!*/; +SET @@session.character_set_client=4,@@session.collation_connection=27,@@session.collation_server=64/*!*/; +insert into t1 (b) values(@@character_set_server)/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(@@collation_server)/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(@@character_set_client)/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(@@character_set_connection)/*!*/; +SET INSERT_ID=5/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(@@collation_connection)/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=5,@@session.collation_server=64/*!*/; +truncate table t1/*!*/; +SET INSERT_ID=1/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(@@collation_connection)/*!*/; +SET INSERT_ID=2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(LEAST("Müller","Muffler"))/*!*/; +SET INSERT_ID=3/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=31,@@session.collation_server=64/*!*/; +insert into t1 (b) values(@@collation_connection)/*!*/; +SET INSERT_ID=4/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(LEAST("Müller","Muffler"))/*!*/; +SET TIMESTAMP=1000000000/*!*/; +truncate table t1/*!*/; +SET INSERT_ID=1/*!*/; +SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`/*!*/; +SET TIMESTAMP=1000000000/*!*/; +insert into t1 (b) values(collation(@a))/*!*/; +SET TIMESTAMP=1000000000/*!*/; +drop database mysqltest2/*!*/; +SET TIMESTAMP=1000000000/*!*/; +drop database mysqltest3/*!*/; +use test/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30/*!*/; +CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255))/*!*/; +SET TIMESTAMP=1000000000/*!*/; +/*!\C koi8r *//*!*/; +SET @@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30/*!*/; +INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ')/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; diff --git a/mysql-test/r/rpl_charset_sjis.result b/mysql-test/r/rpl_charset_sjis.result new file mode 100644 index 00000000000..770ad0588d1 --- /dev/null +++ b/mysql-test/r/rpl_charset_sjis.result @@ -0,0 +1,26 @@ +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; +start slave; +drop table if exists t1; +drop procedure if exists p1; +create table t1 (a varchar(255) character set sjis); +create procedure p1 (in a varchar(255) character set sjis) insert into t1 values (a); +SET NAMES binary; +CALL p1 ('–\\'); +select "--- on master ---"; +--- on master --- +--- on master --- +select hex(a) from t1 ; +hex(a) +965C +select "--- on slave ---"; +--- on slave --- +--- on slave --- +select hex(a) from t1; +hex(a) +965C +drop table t1; +drop procedure p1; diff --git a/mysql-test/r/rpl_do_grant.result b/mysql-test/r/rpl_do_grant.result index ff3e059503c..fe6ef3c26bc 100644 --- a/mysql-test/r/rpl_do_grant.result +++ b/mysql-test/r/rpl_do_grant.result @@ -20,6 +20,17 @@ set password for rpl_do_grant@localhost=password("does it work?"); select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant'; password<>_binary'' 1 +update mysql.user set password='' where user='rpl_do_grant'; +flush privileges; +select password<>'' from mysql.user where user='rpl_do_grant'; +password<>'' +0 +set sql_mode='ANSI_QUOTES'; +set password for rpl_do_grant@localhost=password('does it work?'); +set sql_mode=''; +select password<>'' from mysql.user where user='rpl_do_grant'; +password<>'' +1 delete from mysql.user where user=_binary'rpl_do_grant'; delete from mysql.db where user=_binary'rpl_do_grant'; flush privileges; diff --git a/mysql-test/r/rpl_locale.result b/mysql-test/r/rpl_locale.result new file mode 100644 index 00000000000..b7396084663 --- /dev/null +++ b/mysql-test/r/rpl_locale.result @@ -0,0 +1,20 @@ +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; +start slave; +create table t1 (s1 char(10)); +set lc_time_names= 'de_DE'; +insert into t1 values (date_format('2001-01-01','%W')); +set lc_time_names= 'en_US'; +insert into t1 values (date_format('2001-01-01','%W')); +select * from t1; +s1 +Montag +Monday +select * from t1; +s1 +Montag +Monday +drop table t1; diff --git a/mysql-test/r/rpl_sp.result b/mysql-test/r/rpl_sp.result index a0464e97e28..0fe1b4b908e 100644 --- a/mysql-test/r/rpl_sp.result +++ b/mysql-test/r/rpl_sp.result @@ -269,6 +269,118 @@ insert into t1 values (1); select * from t1; a 1 +select * from t1; +a +1 +create procedure foo() +not deterministic +reads sql data +select * from t1; +call foo(); +a +1 +drop procedure foo; +drop function fn1; +drop database mysqltest1; +drop user "zedjzlcsjhd"@127.0.0.1; +use test; +use test; +drop function if exists f1; +create function f1() returns int reads sql data +begin +declare var integer; +declare c cursor for select a from v1; +open c; +fetch c into var; +close c; +return var; +end| +create view v1 as select 1 as a; +create table t1 (a int); +insert into t1 (a) values (f1()); +select * from t1; +a +1 +drop view v1; +drop function f1; +select * from t1; +a +1 +DROP PROCEDURE IF EXISTS p1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1(col VARCHAR(10)); +CREATE PROCEDURE p1(arg VARCHAR(10)) +INSERT INTO t1 VALUES(arg); +CALL p1('test'); +SELECT * FROM t1; +col +test +SELECT * FROM t1; +col +test +DROP PROCEDURE p1; + +---> Test for BUG#20438 + +---> Preparing environment... +---> connection: master +DROP PROCEDURE IF EXISTS p1; +DROP FUNCTION IF EXISTS f1; + +---> Synchronizing slave with master... + +---> connection: master + +---> Creating procedure... +/*!50003 CREATE PROCEDURE p1() SET @a = 1 */; +/*!50003 CREATE FUNCTION f1() RETURNS INT RETURN 0 */; + +---> Checking on master... +SHOW CREATE PROCEDURE p1; +Procedure sql_mode Create Procedure +p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() +SET @a = 1 +SHOW CREATE FUNCTION f1; +Function sql_mode Create Function +f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) +RETURN 0 + +---> Synchronizing slave with master... +---> connection: master + +---> Checking on slave... +SHOW CREATE PROCEDURE p1; +Procedure sql_mode Create Procedure +p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() +SET @a = 1 +SHOW CREATE FUNCTION f1; +Function sql_mode Create Function +f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) +RETURN 0 + +---> connection: master + +---> Cleaning up... +DROP PROCEDURE p1; +DROP FUNCTION f1; +drop table t1; +drop database if exists mysqltest; +drop database if exists mysqltest2; +create database mysqltest; +create database mysqltest2; +use mysqltest2; +create table t ( t integer ); +create procedure mysqltest.test() begin end; +insert into t values ( 1 ); +create procedure `\\`.test() begin end; +ERROR 42000: Incorrect database name '\\' +create function f1 () returns int +begin +insert into t values (1); +return 0; +end| +use mysqltest; +set @a:= mysqltest2.f1(); show binlog events in 'master-bin.000001' from 98; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # drop database if exists mysqltest1 @@ -329,7 +441,7 @@ insert into t1 values (x); return x+2; end master-bin.000001 # Query 1 # use `mysqltest1`; delete t1,t2 from t1,t2 -master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `fn1`(20) +master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20) master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(fn1(21)) master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1 master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function fn1() @@ -362,32 +474,23 @@ begin insert into t2 values(x),(x); return 10; end -master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `fn1`(100) -master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `fn1`(20) +master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(100) +master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20) master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1 master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger trg before insert on t1 for each row set new.a= 10 master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (1) master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1 master-bin.000001 # Query 1 # use `mysqltest1`; drop trigger trg master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (1) -select * from t1; -a -1 -create procedure foo() +master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo() not deterministic reads sql data -select * from t1; -call foo(); -a -1 -drop procedure foo; -drop function fn1; -drop database mysqltest1; -drop user "zedjzlcsjhd"@127.0.0.1; -use test; -use test; -drop function if exists f1; -create function f1() returns int reads sql data +select * from t1 +master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo +master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1 +master-bin.000001 # Query 1 # drop database mysqltest1 +master-bin.000001 # Query 1 # drop user "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` function f1() returns int reads sql data begin declare var integer; declare c cursor for select a from v1; @@ -395,97 +498,37 @@ open c; fetch c into var; close c; return var; -end| -create view v1 as select 1 as a; -create table t1 (a int); -insert into t1 (a) values (f1()); -select * from t1; -a -1 -drop view v1; -drop function f1; -select * from t1; -a -1 -DROP PROCEDURE IF EXISTS p1; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1(col VARCHAR(10)); -CREATE PROCEDURE p1(arg VARCHAR(10)) -INSERT INTO t1 VALUES(arg); -CALL p1('test'); -SELECT * FROM t1; -col -test -SELECT * FROM t1; -col -test -DROP PROCEDURE p1; - ----> Test for BUG#20438 - ----> Preparing environment... ----> connection: master -DROP PROCEDURE IF EXISTS p1; -DROP FUNCTION IF EXISTS f1; - ----> Synchronizing slave with master... - ----> connection: master - ----> Creating procedure... -/*!50003 CREATE PROCEDURE p1() SET @a = 1 */; -/*!50003 CREATE FUNCTION f1() RETURNS INT RETURN 0 */; - ----> Checking on master... -SHOW CREATE PROCEDURE p1; -Procedure sql_mode Create Procedure -p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() -SET @a = 1 -SHOW CREATE FUNCTION f1; -Function sql_mode Create Function -f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) -RETURN 0 - ----> Synchronizing slave with master... ----> connection: master - ----> Checking on slave... -SHOW CREATE PROCEDURE p1; -Procedure sql_mode Create Procedure -p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`() -SET @a = 1 -SHOW CREATE FUNCTION f1; -Function sql_mode Create Function -f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11) -RETURN 0 - ----> connection: master - ----> Cleaning up... -DROP PROCEDURE p1; -DROP FUNCTION f1; -drop table t1; +end +master-bin.000001 # Query 1 # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 as a +master-bin.000001 # Query 1 # use `test`; create table t1 (a int) +master-bin.000001 # Query 1 # use `test`; insert into t1 (a) values (f1()) +master-bin.000001 # Query 1 # use `test`; drop view v1 +master-bin.000001 # Query 1 # use `test`; drop function f1 +master-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS t1 +master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(col VARCHAR(10)) +master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE p1(arg VARCHAR(10)) +INSERT INTO t1 VALUES(arg) +master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES( NAME_CONST('arg',_latin1'test')) +master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE p1 +master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE p1() SET @a = 1 +master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION f1() RETURNS INT RETURN 0 +master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE p1 +master-bin.000001 # Query 1 # use `test`; DROP FUNCTION f1 +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Query 1 # drop database if exists mysqltest +master-bin.000001 # Query 1 # drop database if exists mysqltest2 +master-bin.000001 # Query 1 # create database mysqltest +master-bin.000001 # Query 1 # create database mysqltest2 +master-bin.000001 # Query 1 # use `mysqltest2`; create table t ( t integer ) +master-bin.000001 # Query 1 # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` procedure mysqltest.test() begin end +master-bin.000001 # Query 1 # use `mysqltest2`; insert into t values ( 1 ) +master-bin.000001 # Query 1 # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` function f1 () returns int +begin +insert into t values (1); +return 0; +end +master-bin.000001 # Query 1 # use `mysqltest`; SELECT `mysqltest2`.`f1`() set global log_bin_trust_function_creators=0; set global log_bin_trust_function_creators=0; -reset master; -drop database if exists mysqltest; -drop database if exists mysqltest2; -create database mysqltest; -create database mysqltest2; -use mysqltest2; -create table t ( t integer ); -create procedure mysqltest.test() begin end; -insert into t values ( 1 ); -show binlog events in 'master-bin.000001' from 98; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 199 drop database if exists mysqltest -master-bin.000001 199 Query 1 302 drop database if exists mysqltest2 -master-bin.000001 302 Query 1 395 create database mysqltest -master-bin.000001 395 Query 1 490 create database mysqltest2 -master-bin.000001 490 Query 1 587 use `mysqltest2`; create table t ( t integer ) -master-bin.000001 587 Query 1 726 use `mysqltest2`; CREATE DEFINER=`root`@`localhost` procedure mysqltest.test() begin end -master-bin.000001 726 Query 1 821 use `mysqltest2`; insert into t values ( 1 ) -create procedure `\\`.test() begin end; -ERROR 42000: Incorrect database name '\\' drop database mysqltest; drop database mysqltest2; diff --git a/mysql-test/r/rpl_timezone.result b/mysql-test/r/rpl_timezone.result index fde8709843e..10dc8eb7e3c 100644 --- a/mysql-test/r/rpl_timezone.result +++ b/mysql-test/r/rpl_timezone.result @@ -44,27 +44,29 @@ t 2004-06-11 09:39:02 /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -use test; -SET TIMESTAMP=100000000; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -create table t1 (t timestamp); -SET TIMESTAMP=100000000; -create table t2 (t char(32)); -SET TIMESTAMP=100000000; -SET @@session.time_zone='Europe/Moscow'; -insert into t1 values ('20050101000000'), ('20050611093902'); -SET TIMESTAMP=100000000; -SET @@session.time_zone='UTC'; -insert into t1 values ('20040101000000'), ('20040611093902'); -SET TIMESTAMP=100000000; -delete from t1; -SET TIMESTAMP=100000000; -SET @@session.time_zone='Europe/Moscow'; -insert into t1 values ('20040101000000'), ('20040611093902'); +DELIMITER /*!*/; +ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=100000000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +create table t1 (t timestamp)/*!*/; +SET TIMESTAMP=100000000/*!*/; +create table t2 (t char(32))/*!*/; +SET TIMESTAMP=100000000/*!*/; +SET @@session.time_zone='Europe/Moscow'/*!*/; +insert into t1 values ('20050101000000'), ('20050611093902')/*!*/; +SET TIMESTAMP=100000000/*!*/; +SET @@session.time_zone='UTC'/*!*/; +insert into t1 values ('20040101000000'), ('20040611093902')/*!*/; +SET TIMESTAMP=100000000/*!*/; +delete from t1/*!*/; +SET TIMESTAMP=100000000/*!*/; +SET @@session.time_zone='Europe/Moscow'/*!*/; +insert into t1 values ('20040101000000'), ('20040611093902')/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index d890510ee67..5dcf830ca97 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2811,6 +2811,23 @@ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5; min(key1) 0.37619999051094 DROP TABLE t1,t2; +create table t1(a bigint unsigned, b bigint); +insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff), +(0x10000000000000000, 0x10000000000000000), +(0x8fffffffffffffff, 0x8fffffffffffffff); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'b' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'b' at row 2 +Warning 1264 Out of range value adjusted for column 'b' at row 3 +select hex(a), hex(b) from t1; +hex(a) hex(b) +FFFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF +FFFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF +8FFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF +drop table t1; +End of 4.1 tests CREATE TABLE t1 ( K2C4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '', K4N4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '0000', @@ -3619,3 +3636,9 @@ SELECT * FROM t1 LEFT JOIN t2 ON f11 = t1.checked_out GROUP BY f1 ORDER BY f2, f f1 f2 f3 f4 f5 f6 checked_out f11 1 1 1 0 0 0 0 NULL DROP TABLE t1, t2; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1(a int); +INSERT into t1 values (1), (2), (3); +SELECT * FROM t1 LIMIT 2, -1; +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 '-1' at line 1 +DROP TABLE t1; diff --git a/mysql-test/r/sp-code.result b/mysql-test/r/sp-code.result index 8fea85b7cd7..67b030f87a4 100644 --- a/mysql-test/r/sp-code.result +++ b/mysql-test/r/sp-code.result @@ -199,6 +199,421 @@ Pos Instruction 44 jump 14 45 stmt 9 "drop temporary table sudoku_work, sud..." drop procedure sudoku_solve; +DROP PROCEDURE IF EXISTS proc_19194_simple; +DROP PROCEDURE IF EXISTS proc_19194_searched; +DROP PROCEDURE IF EXISTS proc_19194_nested_1; +DROP PROCEDURE IF EXISTS proc_19194_nested_2; +DROP PROCEDURE IF EXISTS proc_19194_nested_3; +DROP PROCEDURE IF EXISTS proc_19194_nested_4; +CREATE PROCEDURE proc_19194_simple(i int) +BEGIN +DECLARE str CHAR(10); +CASE i +WHEN 1 THEN SET str="1"; +WHEN 2 THEN SET str="2"; +WHEN 3 THEN SET str="3"; +ELSE SET str="unknown"; +END CASE; +SELECT str; +END| +CREATE PROCEDURE proc_19194_searched(i int) +BEGIN +DECLARE str CHAR(10); +CASE +WHEN i=1 THEN SET str="1"; +WHEN i=2 THEN SET str="2"; +WHEN i=3 THEN SET str="3"; +ELSE SET str="unknown"; +END CASE; +SELECT str; +END| +CREATE PROCEDURE proc_19194_nested_1(i int, j int) +BEGIN +DECLARE str_i CHAR(10); +DECLARE str_j CHAR(10); +CASE i +WHEN 10 THEN SET str_i="10"; +WHEN 20 THEN +BEGIN +set str_i="20"; +CASE +WHEN j=1 THEN SET str_j="1"; +WHEN j=2 THEN SET str_j="2"; +WHEN j=3 THEN SET str_j="3"; +ELSE SET str_j="unknown"; +END CASE; +select "i was 20"; +END; +WHEN 30 THEN SET str_i="30"; +WHEN 40 THEN SET str_i="40"; +ELSE SET str_i="unknown"; +END CASE; +SELECT str_i, str_j; +END| +CREATE PROCEDURE proc_19194_nested_2(i int, j int) +BEGIN +DECLARE str_i CHAR(10); +DECLARE str_j CHAR(10); +CASE +WHEN i=10 THEN SET str_i="10"; +WHEN i=20 THEN +BEGIN +set str_i="20"; +CASE j +WHEN 1 THEN SET str_j="1"; +WHEN 2 THEN SET str_j="2"; +WHEN 3 THEN SET str_j="3"; +ELSE SET str_j="unknown"; +END CASE; +select "i was 20"; +END; +WHEN i=30 THEN SET str_i="30"; +WHEN i=40 THEN SET str_i="40"; +ELSE SET str_i="unknown"; +END CASE; +SELECT str_i, str_j; +END| +CREATE PROCEDURE proc_19194_nested_3(i int, j int) +BEGIN +DECLARE str_i CHAR(10); +DECLARE str_j CHAR(10); +CASE i +WHEN 10 THEN SET str_i="10"; +WHEN 20 THEN +BEGIN +set str_i="20"; +CASE j +WHEN 1 THEN SET str_j="1"; +WHEN 2 THEN SET str_j="2"; +WHEN 3 THEN SET str_j="3"; +ELSE SET str_j="unknown"; +END CASE; +select "i was 20"; +END; +WHEN 30 THEN SET str_i="30"; +WHEN 40 THEN SET str_i="40"; +ELSE SET str_i="unknown"; +END CASE; +SELECT str_i, str_j; +END| +CREATE PROCEDURE proc_19194_nested_4(i int, j int) +BEGIN +DECLARE str_i CHAR(10); +DECLARE str_j CHAR(10); +CASE +WHEN i=10 THEN SET str_i="10"; +WHEN i=20 THEN +BEGIN +set str_i="20"; +CASE +WHEN j=1 THEN SET str_j="1"; +WHEN j=2 THEN SET str_j="2"; +WHEN j=3 THEN SET str_j="3"; +ELSE SET str_j="unknown"; +END CASE; +select "i was 20"; +END; +WHEN i=30 THEN SET str_i="30"; +WHEN i=40 THEN SET str_i="40"; +ELSE SET str_i="unknown"; +END CASE; +SELECT str_i, str_j; +END| +SHOW PROCEDURE CODE proc_19194_simple; +Pos Instruction +0 set str@1 NULL +1 set_case_expr (12) 0 i@0 +2 jump_if_not 5(12) (case_expr@0 = 1) +3 set str@1 _latin1'1' +4 jump 12 +5 jump_if_not 8(12) (case_expr@0 = 2) +6 set str@1 _latin1'2' +7 jump 12 +8 jump_if_not 11(12) (case_expr@0 = 3) +9 set str@1 _latin1'3' +10 jump 12 +11 set str@1 _latin1'unknown' +12 stmt 0 "SELECT str" +SHOW PROCEDURE CODE proc_19194_searched; +Pos Instruction +0 set str@1 NULL +1 jump_if_not 4(11) (i@0 = 1) +2 set str@1 _latin1'1' +3 jump 11 +4 jump_if_not 7(11) (i@0 = 2) +5 set str@1 _latin1'2' +6 jump 11 +7 jump_if_not 10(11) (i@0 = 3) +8 set str@1 _latin1'3' +9 jump 11 +10 set str@1 _latin1'unknown' +11 stmt 0 "SELECT str" +SHOW PROCEDURE CODE proc_19194_nested_1; +Pos Instruction +0 set str_i@2 NULL +1 set str_j@3 NULL +2 set_case_expr (27) 0 i@0 +3 jump_if_not 6(27) (case_expr@0 = 10) +4 set str_i@2 _latin1'10' +5 jump 27 +6 jump_if_not 20(27) (case_expr@0 = 20) +7 set str_i@2 _latin1'20' +8 jump_if_not 11(18) (j@1 = 1) +9 set str_j@3 _latin1'1' +10 jump 18 +11 jump_if_not 14(18) (j@1 = 2) +12 set str_j@3 _latin1'2' +13 jump 18 +14 jump_if_not 17(18) (j@1 = 3) +15 set str_j@3 _latin1'3' +16 jump 18 +17 set str_j@3 _latin1'unknown' +18 stmt 0 "select "i was 20"" +19 jump 27 +20 jump_if_not 23(27) (case_expr@0 = 30) +21 set str_i@2 _latin1'30' +22 jump 27 +23 jump_if_not 26(27) (case_expr@0 = 40) +24 set str_i@2 _latin1'40' +25 jump 27 +26 set str_i@2 _latin1'unknown' +27 stmt 0 "SELECT str_i, str_j" +SHOW PROCEDURE CODE proc_19194_nested_2; +Pos Instruction +0 set str_i@2 NULL +1 set str_j@3 NULL +2 jump_if_not 5(27) (i@0 = 10) +3 set str_i@2 _latin1'10' +4 jump 27 +5 jump_if_not 20(27) (i@0 = 20) +6 set str_i@2 _latin1'20' +7 set_case_expr (18) 0 j@1 +8 jump_if_not 11(18) (case_expr@0 = 1) +9 set str_j@3 _latin1'1' +10 jump 18 +11 jump_if_not 14(18) (case_expr@0 = 2) +12 set str_j@3 _latin1'2' +13 jump 18 +14 jump_if_not 17(18) (case_expr@0 = 3) +15 set str_j@3 _latin1'3' +16 jump 18 +17 set str_j@3 _latin1'unknown' +18 stmt 0 "select "i was 20"" +19 jump 27 +20 jump_if_not 23(27) (i@0 = 30) +21 set str_i@2 _latin1'30' +22 jump 27 +23 jump_if_not 26(27) (i@0 = 40) +24 set str_i@2 _latin1'40' +25 jump 27 +26 set str_i@2 _latin1'unknown' +27 stmt 0 "SELECT str_i, str_j" +SHOW PROCEDURE CODE proc_19194_nested_3; +Pos Instruction +0 set str_i@2 NULL +1 set str_j@3 NULL +2 set_case_expr (28) 0 i@0 +3 jump_if_not 6(28) (case_expr@0 = 10) +4 set str_i@2 _latin1'10' +5 jump 28 +6 jump_if_not 21(28) (case_expr@0 = 20) +7 set str_i@2 _latin1'20' +8 set_case_expr (19) 1 j@1 +9 jump_if_not 12(19) (case_expr@1 = 1) +10 set str_j@3 _latin1'1' +11 jump 19 +12 jump_if_not 15(19) (case_expr@1 = 2) +13 set str_j@3 _latin1'2' +14 jump 19 +15 jump_if_not 18(19) (case_expr@1 = 3) +16 set str_j@3 _latin1'3' +17 jump 19 +18 set str_j@3 _latin1'unknown' +19 stmt 0 "select "i was 20"" +20 jump 28 +21 jump_if_not 24(28) (case_expr@0 = 30) +22 set str_i@2 _latin1'30' +23 jump 28 +24 jump_if_not 27(28) (case_expr@0 = 40) +25 set str_i@2 _latin1'40' +26 jump 28 +27 set str_i@2 _latin1'unknown' +28 stmt 0 "SELECT str_i, str_j" +SHOW PROCEDURE CODE proc_19194_nested_4; +Pos Instruction +0 set str_i@2 NULL +1 set str_j@3 NULL +2 jump_if_not 5(26) (i@0 = 10) +3 set str_i@2 _latin1'10' +4 jump 26 +5 jump_if_not 19(26) (i@0 = 20) +6 set str_i@2 _latin1'20' +7 jump_if_not 10(17) (j@1 = 1) +8 set str_j@3 _latin1'1' +9 jump 17 +10 jump_if_not 13(17) (j@1 = 2) +11 set str_j@3 _latin1'2' +12 jump 17 +13 jump_if_not 16(17) (j@1 = 3) +14 set str_j@3 _latin1'3' +15 jump 17 +16 set str_j@3 _latin1'unknown' +17 stmt 0 "select "i was 20"" +18 jump 26 +19 jump_if_not 22(26) (i@0 = 30) +20 set str_i@2 _latin1'30' +21 jump 26 +22 jump_if_not 25(26) (i@0 = 40) +23 set str_i@2 _latin1'40' +24 jump 26 +25 set str_i@2 _latin1'unknown' +26 stmt 0 "SELECT str_i, str_j" +CALL proc_19194_nested_1(10, 1); +str_i str_j +10 NULL +CALL proc_19194_nested_1(25, 1); +str_i str_j +unknown NULL +CALL proc_19194_nested_1(20, 1); +i was 20 +i was 20 +str_i str_j +20 1 +CALL proc_19194_nested_1(20, 2); +i was 20 +i was 20 +str_i str_j +20 2 +CALL proc_19194_nested_1(20, 3); +i was 20 +i was 20 +str_i str_j +20 3 +CALL proc_19194_nested_1(20, 4); +i was 20 +i was 20 +str_i str_j +20 unknown +CALL proc_19194_nested_1(30, 1); +str_i str_j +30 NULL +CALL proc_19194_nested_1(40, 1); +str_i str_j +40 NULL +CALL proc_19194_nested_1(0, 0); +str_i str_j +unknown NULL +CALL proc_19194_nested_2(10, 1); +str_i str_j +10 NULL +CALL proc_19194_nested_2(25, 1); +str_i str_j +unknown NULL +CALL proc_19194_nested_2(20, 1); +i was 20 +i was 20 +str_i str_j +20 1 +CALL proc_19194_nested_2(20, 2); +i was 20 +i was 20 +str_i str_j +20 2 +CALL proc_19194_nested_2(20, 3); +i was 20 +i was 20 +str_i str_j +20 3 +CALL proc_19194_nested_2(20, 4); +i was 20 +i was 20 +str_i str_j +20 unknown +CALL proc_19194_nested_2(30, 1); +str_i str_j +30 NULL +CALL proc_19194_nested_2(40, 1); +str_i str_j +40 NULL +CALL proc_19194_nested_2(0, 0); +str_i str_j +unknown NULL +CALL proc_19194_nested_3(10, 1); +str_i str_j +10 NULL +CALL proc_19194_nested_3(25, 1); +str_i str_j +unknown NULL +CALL proc_19194_nested_3(20, 1); +i was 20 +i was 20 +str_i str_j +20 1 +CALL proc_19194_nested_3(20, 2); +i was 20 +i was 20 +str_i str_j +20 2 +CALL proc_19194_nested_3(20, 3); +i was 20 +i was 20 +str_i str_j +20 3 +CALL proc_19194_nested_3(20, 4); +i was 20 +i was 20 +str_i str_j +20 unknown +CALL proc_19194_nested_3(30, 1); +str_i str_j +30 NULL +CALL proc_19194_nested_3(40, 1); +str_i str_j +40 NULL +CALL proc_19194_nested_3(0, 0); +str_i str_j +unknown NULL +CALL proc_19194_nested_4(10, 1); +str_i str_j +10 NULL +CALL proc_19194_nested_4(25, 1); +str_i str_j +unknown NULL +CALL proc_19194_nested_4(20, 1); +i was 20 +i was 20 +str_i str_j +20 1 +CALL proc_19194_nested_4(20, 2); +i was 20 +i was 20 +str_i str_j +20 2 +CALL proc_19194_nested_4(20, 3); +i was 20 +i was 20 +str_i str_j +20 3 +CALL proc_19194_nested_4(20, 4); +i was 20 +i was 20 +str_i str_j +20 unknown +CALL proc_19194_nested_4(30, 1); +str_i str_j +30 NULL +CALL proc_19194_nested_4(40, 1); +str_i str_j +40 NULL +CALL proc_19194_nested_4(0, 0); +str_i str_j +unknown NULL +DROP PROCEDURE proc_19194_simple; +DROP PROCEDURE proc_19194_searched; +DROP PROCEDURE proc_19194_nested_1; +DROP PROCEDURE proc_19194_nested_2; +DROP PROCEDURE proc_19194_nested_3; +DROP PROCEDURE proc_19194_nested_4; DROP PROCEDURE IF EXISTS p1; CREATE PROCEDURE p1() CREATE INDEX idx ON t1 (c1); SHOW PROCEDURE CODE p1; diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 9db4325aea2..8e3c057cc62 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -5626,6 +5626,23 @@ Called B Called B drop procedure proc_21462_a| drop procedure proc_21462_b| +drop table if exists t3| +drop procedure if exists proc_bug19733| +create table t3 (s1 int)| +create procedure proc_bug19733() +begin +declare v int default 0; +while v < 100 do +create index i on t3 (s1); +drop index i on t3; +set v = v + 1; +end while; +end| +call proc_bug19733()| +call proc_bug19733()| +call proc_bug19733()| +drop procedure proc_bug19733| +drop table t3| End of 5.0 tests DROP TABLE IF EXISTS bug23760| DROP TABLE IF EXISTS bug23760_log| @@ -5708,4 +5725,20 @@ DROP TABLE bug23760, bug23760_log| DROP PROCEDURE bug23760_update_log| DROP PROCEDURE bug23760_test_row_count| DROP FUNCTION bug23760_rc_test| +DROP PROCEDURE IF EXISTS bug24117| +DROP TABLE IF EXISTS t3| +CREATE TABLE t3(c1 ENUM('abc'))| +INSERT INTO t3 VALUES('abc')| +CREATE PROCEDURE bug24117() +BEGIN +DECLARE t3c1 ENUM('abc'); +DECLARE mycursor CURSOR FOR SELECT c1 FROM t3; +OPEN mycursor; +FLUSH TABLES; +FETCH mycursor INTO t3c1; +CLOSE mycursor; +END| +CALL bug24117()| +DROP PROCEDURE bug24117| +DROP TABLE t3| drop table t1,t2; diff --git a/mysql-test/r/sp_stress_case.result b/mysql-test/r/sp_stress_case.result new file mode 100644 index 00000000000..8ec68363c8d --- /dev/null +++ b/mysql-test/r/sp_stress_case.result @@ -0,0 +1,120 @@ +DROP PROCEDURE IF EXISTS proc_19194_codegen; +DROP PROCEDURE IF EXISTS bug_19194_simple; +DROP PROCEDURE IF EXISTS bug_19194_searched; +CREATE PROCEDURE proc_19194_codegen( +IN proc_name VARCHAR(50), +IN count INTEGER, +IN simple INTEGER, +OUT body MEDIUMTEXT) +BEGIN +DECLARE code MEDIUMTEXT; +DECLARE i INT DEFAULT 1; +SET code = concat("CREATE PROCEDURE ", proc_name, "(i INT)\n"); +SET code = concat(code, "BEGIN\n"); +SET code = concat(code, " DECLARE str CHAR(10);\n"); +IF (simple) +THEN +SET code = concat(code, " CASE i\n"); +ELSE +SET code = concat(code, " CASE\n"); +END IF; +WHILE (i <= count) +DO +IF (simple) +THEN +SET code = concat(code, " WHEN ", i, " THEN SET str=\"", i, "\";\n"); +ELSE +SET code = concat(code, " WHEN i=", i, " THEN SET str=\"", i, "\";\n"); +END IF; +SET i = i + 1; +END WHILE; +SET code = concat(code, " ELSE SET str=\"unknown\";\n"); +SET code = concat(code, " END CASE;\n"); +SET code = concat(code, " SELECT str;\n"); +SET code = concat(code, "END\n"); +SET body = code; +END| +set @body=""; +call proc_19194_codegen("test_simple", 10, 1, @body); +select @body; +@body +CREATE PROCEDURE test_simple(i INT) +BEGIN + DECLARE str CHAR(10); + CASE i + WHEN 1 THEN SET str="1"; + WHEN 2 THEN SET str="2"; + WHEN 3 THEN SET str="3"; + WHEN 4 THEN SET str="4"; + WHEN 5 THEN SET str="5"; + WHEN 6 THEN SET str="6"; + WHEN 7 THEN SET str="7"; + WHEN 8 THEN SET str="8"; + WHEN 9 THEN SET str="9"; + WHEN 10 THEN SET str="10"; + ELSE SET str="unknown"; + END CASE; + SELECT str; +END + +call proc_19194_codegen("test_searched", 10, 0, @body); +select @body; +@body +CREATE PROCEDURE test_searched(i INT) +BEGIN + DECLARE str CHAR(10); + CASE + WHEN i=1 THEN SET str="1"; + WHEN i=2 THEN SET str="2"; + WHEN i=3 THEN SET str="3"; + WHEN i=4 THEN SET str="4"; + WHEN i=5 THEN SET str="5"; + WHEN i=6 THEN SET str="6"; + WHEN i=7 THEN SET str="7"; + WHEN i=8 THEN SET str="8"; + WHEN i=9 THEN SET str="9"; + WHEN i=10 THEN SET str="10"; + ELSE SET str="unknown"; + END CASE; + SELECT str; +END + +CALL bug_19194_simple(1); +str +1 +CALL bug_19194_simple(2); +str +2 +CALL bug_19194_simple(1000); +str +1000 +CALL bug_19194_simple(4998); +str +4998 +CALL bug_19194_simple(4999); +str +4999 +CALL bug_19194_simple(9999); +str +unknown +CALL bug_19194_searched(1); +str +1 +CALL bug_19194_searched(2); +str +2 +CALL bug_19194_searched(1000); +str +1000 +CALL bug_19194_searched(4998); +str +4998 +CALL bug_19194_searched(4999); +str +4999 +CALL bug_19194_searched(9999); +str +unknown +DROP PROCEDURE proc_19194_codegen; +DROP PROCEDURE bug_19194_simple; +DROP PROCEDURE bug_19194_searched; diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 272836c450a..4725bcc0ac9 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -111,3 +111,26 @@ t1 CREATE TABLE `t1` ( `i` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +show create table t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/' +show create table t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/' +create table t1 (a int) engine=myisam select 42 a; +select * from t1; +a +9 +select * from t1; +a +99 +select * from t1; +a +42 +drop table t1; +End of 4.1 tests +End of 5.0 tests diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result index f3883077919..fad0e1f7974 100644 --- a/mysql-test/r/type_bit.result +++ b/mysql-test/r/type_bit.result @@ -568,7 +568,7 @@ create table t1 (a bit(7)); insert into t1 values (0x60); select * from t1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def test t1 t1 a a 16 7 1 Y 0 0 63 +def test t1 t1 a a 16 7 1 Y 32 0 63 a ` drop table t1; diff --git a/mysql-test/r/type_bit_innodb.result b/mysql-test/r/type_bit_innodb.result index 1f6857277bd..c4506231f27 100644 --- a/mysql-test/r/type_bit_innodb.result +++ b/mysql-test/r/type_bit_innodb.result @@ -406,7 +406,7 @@ create table t1 (a bit(7)) engine=innodb; insert into t1 values (0x60); select * from t1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def test t1 t1 a a 16 7 1 Y 0 0 63 +def test t1 t1 a a 16 7 1 Y 32 0 63 a ` drop table t1; diff --git a/mysql-test/r/user_var-binlog.result b/mysql-test/r/user_var-binlog.result index d1555bb793f..2b37a4b1d9a 100644 --- a/mysql-test/r/user_var-binlog.result +++ b/mysql-test/r/user_var-binlog.result @@ -15,19 +15,21 @@ master-bin.000001 273 User var 1 311 @`var2`=_binary 0x61 COLLATE binary master-bin.000001 311 Query 1 411 use `test`; insert into t1 values (@var1),(@var2) /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; -ROLLBACK; -SET @`a b`:=_latin1 0x68656C6C6F COLLATE `latin1_swedish_ci`; -use test; -SET TIMESTAMP=10000; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; -SET @@session.sql_mode=0; -/*!\C latin1 */; -SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; -INSERT INTO t1 VALUES(@`a b`); -SET @`var1`:=_latin1 0x273B616161 COLLATE `latin1_swedish_ci`; -SET @`var2`:=_binary 0x61 COLLATE `binary`; -SET TIMESTAMP=10000; -insert into t1 values (@var1),(@var2); +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET @`a b`:=_latin1 0x68656C6C6F COLLATE `latin1_swedish_ci`/*!*/; +use test/*!*/; +SET TIMESTAMP=10000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +INSERT INTO t1 VALUES(@`a b`)/*!*/; +SET @`var1`:=_latin1 0x273B616161 COLLATE `latin1_swedish_ci`/*!*/; +SET @`var2`:=_binary 0x61 COLLATE `binary`/*!*/; +SET TIMESTAMP=10000/*!*/; +insert into t1 values (@var1),(@var2)/*!*/; +DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index cd834a789bd..c3d7d5ac4eb 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -580,6 +580,63 @@ set names latin1; select @@have_innodb; @@have_innodb # +*** Various tests with LC_TIME_NAMES +*** LC_TIME_NAMES: testing case insensitivity +set @@lc_time_names='ru_ru'; +select @@lc_time_names; +@@lc_time_names +ru_RU +*** LC_TIME_NAMES: testing with a user variable +set @lc='JA_JP'; +set @@lc_time_names=@lc; +select @@lc_time_names; +@@lc_time_names +ja_JP +*** LC_TIME_NAMES: testing with string expressions +set lc_time_names=concat('de','_','DE'); +select @@lc_time_names; +@@lc_time_names +de_DE +set lc_time_names=concat('de','+','DE'); +ERROR HY000: Unknown locale: 'de+DE' +select @@lc_time_names; +@@lc_time_names +de_DE +LC_TIME_NAMES: testing with numeric expressions +set @@lc_time_names=1+2; +select @@lc_time_names; +@@lc_time_names +sv_SE +set @@lc_time_names=1/0; +ERROR 42000: Incorrect argument type to variable 'lc_time_names' +select @@lc_time_names; +@@lc_time_names +sv_SE +set lc_time_names=en_US; +LC_TIME_NAMES: testing NULL and a negative number: +set lc_time_names=NULL; +ERROR 42000: Variable 'lc_time_names' can't be set to the value of 'NULL' +set lc_time_names=-1; +ERROR HY000: Unknown locale: '-1' +select @@lc_time_names; +@@lc_time_names +en_US +LC_TIME_NAMES: testing locale with the last ID: +set lc_time_names=108; +select @@lc_time_names; +@@lc_time_names +zh_HK +LC_TIME_NAMES: testing a number beyond the valid ID range: +set lc_time_names=109; +ERROR HY000: Unknown locale: '109' +select @@lc_time_names; +@@lc_time_names +zh_HK +LC_TIME_NAMES: testing that 0 is en_US: +set lc_time_names=0; +select @@lc_time_names; +@@lc_time_names +en_US set @test = @@query_prealloc_size; set @@query_prealloc_size = @test; select @@query_prealloc_size = @test; diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 7f3106e5972..7185a70689a 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3025,4 +3025,13 @@ SELECT * FROM v; x 5 DROP VIEW v; +DROP VIEW IF EXISTS v1; +CREATE VIEW v1 AS SELECT 'The\ZEnd'; +SELECT * FROM v1; +TheEnd +TheEnd +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select _latin1'The\ZEnd' AS `TheEnd` +DROP VIEW v1; End of 5.0 tests. diff --git a/mysql-test/r/windows.result b/mysql-test/r/windows.result index 039c5b1476e..1702fd28c18 100644 --- a/mysql-test/r/windows.result +++ b/mysql-test/r/windows.result @@ -6,3 +6,9 @@ use prn; ERROR 42000: Unknown database 'prn' create table nu (a int); drop table nu; +drop table if exists t1; +CREATE TABLE t1 ( `ID` int(6) ) data directory 'c:/tmp/' index directory 'c:/tmp/' engine=MyISAM; +Warnings: +Warning 0 DATA DIRECTORY option ignored +Warning 0 INDEX DIRECTORY option ignored +drop table t1; |