diff options
Diffstat (limited to 'mysql-test')
24 files changed, 310 insertions, 254 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 5b925555095..fadc14d4e1b 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -692,7 +692,7 @@ fi MYSQL_CLIENT_TEST="$MYSQL_CLIENT_TEST --no-defaults --testcase --user=root --socket=$MASTER_MYSOCK --port=$MYSQL_TCP_PORT --silent" MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT" -MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR $EXTRA_MYSQLBINLOG_OPT" +MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR --character-sets-dir=$CHARSETSDIR $EXTRA_MYSQLBINLOG_OPT" MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose" MYSQL="$MYSQL --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD" export MYSQL MYSQL_DUMP MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index a6ca59fc62b..fe2d76c8ab3 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -526,13 +526,14 @@ insert into t2 values (@v); show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 User var 1 135 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci -master-bin.000001 135 Query 1 218 use `test`; insert into t2 values (@v) +master-bin.000001 135 Query 1 225 use `test`; insert into t2 values (@v) /*!40019 SET @@session.max_insert_delayed_threads=0*/; 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; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t2 values (@v); drop table t2; set names latin1; diff --git a/mysql-test/r/drop_temp_table.result b/mysql-test/r/drop_temp_table.result index 34c08f08788..8a2a75f1723 100644 --- a/mysql-test/r/drop_temp_table.result +++ b/mysql-test/r/drop_temp_table.result @@ -11,8 +11,8 @@ get_lock("a",10) show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 206 create database `drop-temp+table-test` -master-bin.000001 206 Query 1 322 use `drop-temp+table-test`; create temporary table `table:name` (a int) -master-bin.000001 322 Query 1 473 use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name` -master-bin.000001 473 Query 1 566 use `drop-temp+table-test`; DO RELEASE_LOCK("a") +master-bin.000001 95 Query 1 213 create database `drop-temp+table-test` +master-bin.000001 213 Query 1 336 use `drop-temp+table-test`; create temporary table `table:name` (a int) +master-bin.000001 336 Query 1 494 use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name` +master-bin.000001 494 Query 1 594 use `drop-temp+table-test`; DO RELEASE_LOCK("a") drop database `drop-temp+table-test`; diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index 8882b95f2d8..611c6f2712e 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -75,7 +75,7 @@ ERROR 23000: Duplicate entry '2' for key 1 show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 183 use `test`; insert into t1 select * from t2 +master-bin.000001 95 Query 1 190 use `test`; insert into t1 select * from t2 select * from t1; a 1 diff --git a/mysql-test/r/mix_innodb_myisam_binlog.result b/mysql-test/r/mix_innodb_myisam_binlog.result index abcb451df65..96a2ac551a9 100644 --- a/mysql-test/r/mix_innodb_myisam_binlog.result +++ b/mysql-test/r/mix_innodb_myisam_binlog.result @@ -9,9 +9,9 @@ commit; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; BEGIN -master-bin.000001 157 Query 1 # use `test`; insert into t1 values(1) -master-bin.000001 238 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 326 Query 1 # use `test`; COMMIT +master-bin.000001 164 Query 1 # use `test`; insert into t1 values(1) +master-bin.000001 252 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 347 Query 1 # use `test`; COMMIT delete from t1; delete from t2; reset master; @@ -24,9 +24,9 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; BEGIN -master-bin.000001 157 Query 1 # use `test`; insert into t1 values(2) -master-bin.000001 238 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 326 Query 1 # use `test`; ROLLBACK +master-bin.000001 164 Query 1 # use `test`; insert into t1 values(2) +master-bin.000001 252 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 347 Query 1 # use `test`; ROLLBACK delete from t1; delete from t2; reset master; @@ -42,12 +42,12 @@ commit; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; BEGIN -master-bin.000001 157 Query 1 # use `test`; insert into t1 values(3) -master-bin.000001 238 Query 1 # use `test`; savepoint my_savepoint -master-bin.000001 317 Query 1 # use `test`; insert into t1 values(4) -master-bin.000001 398 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 486 Query 1 # use `test`; rollback to savepoint my_savepoint -master-bin.000001 577 Query 1 # use `test`; COMMIT +master-bin.000001 164 Query 1 # use `test`; insert into t1 values(3) +master-bin.000001 252 Query 1 # use `test`; savepoint my_savepoint +master-bin.000001 338 Query 1 # use `test`; insert into t1 values(4) +master-bin.000001 426 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 521 Query 1 # use `test`; rollback to savepoint my_savepoint +master-bin.000001 619 Query 1 # use `test`; COMMIT delete from t1; delete from t2; reset master; @@ -68,13 +68,13 @@ a show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; BEGIN -master-bin.000001 157 Query 1 # use `test`; insert into t1 values(5) -master-bin.000001 238 Query 1 # use `test`; savepoint my_savepoint -master-bin.000001 317 Query 1 # use `test`; insert into t1 values(6) -master-bin.000001 398 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 486 Query 1 # use `test`; rollback to savepoint my_savepoint -master-bin.000001 577 Query 1 # use `test`; insert into t1 values(7) -master-bin.000001 658 Query 1 # use `test`; COMMIT +master-bin.000001 164 Query 1 # use `test`; insert into t1 values(5) +master-bin.000001 252 Query 1 # use `test`; savepoint my_savepoint +master-bin.000001 338 Query 1 # use `test`; insert into t1 values(6) +master-bin.000001 426 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 521 Query 1 # use `test`; rollback to savepoint my_savepoint +master-bin.000001 619 Query 1 # use `test`; insert into t1 values(7) +master-bin.000001 707 Query 1 # use `test`; COMMIT delete from t1; delete from t2; reset master; @@ -90,9 +90,9 @@ get_lock("a",10) show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; BEGIN -master-bin.000001 157 Query 1 # use `test`; insert into t1 values(8) -master-bin.000001 238 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 326 Query 1 # use `test`; ROLLBACK +master-bin.000001 164 Query 1 # use `test`; insert into t1 values(8) +master-bin.000001 252 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 347 Query 1 # use `test`; ROLLBACK delete from t1; delete from t2; reset master; @@ -101,7 +101,7 @@ insert into t2 select * from t1; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; insert into t1 values(9) -master-bin.000001 176 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 183 Query 1 # use `test`; insert into t2 select * from t1 delete from t1; delete from t2; reset master; @@ -111,16 +111,16 @@ insert into t2 select * from t1; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; insert into t1 values(10) -master-bin.000001 177 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 184 Query 1 # use `test`; insert into t2 select * from t1 insert into t1 values(11); commit; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; insert into t1 values(10) -master-bin.000001 177 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 265 Query 1 # use `test`; BEGIN -master-bin.000001 327 Query 1 # use `test`; insert into t1 values(11) -master-bin.000001 409 Query 1 # use `test`; COMMIT +master-bin.000001 184 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 279 Query 1 # use `test`; BEGIN +master-bin.000001 348 Query 1 # use `test`; insert into t1 values(11) +master-bin.000001 437 Query 1 # use `test`; COMMIT alter table t2 engine=INNODB; delete from t1; delete from t2; @@ -132,9 +132,9 @@ commit; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; BEGIN -master-bin.000001 157 Query 1 # use `test`; insert into t1 values(12) -master-bin.000001 239 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 327 Query 1 # use `test`; COMMIT +master-bin.000001 164 Query 1 # use `test`; insert into t1 values(12) +master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 348 Query 1 # use `test`; COMMIT delete from t1; delete from t2; reset master; @@ -157,8 +157,8 @@ commit; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; BEGIN -master-bin.000001 157 Query 1 # use `test`; insert into t1 values(14) -master-bin.000001 239 Query 1 # use `test`; COMMIT +master-bin.000001 164 Query 1 # use `test`; insert into t1 values(14) +master-bin.000001 253 Query 1 # use `test`; COMMIT delete from t1; delete from t2; reset master; @@ -177,9 +177,9 @@ a show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; BEGIN -master-bin.000001 157 Query 1 # use `test`; insert into t1 values(16) -master-bin.000001 239 Query 1 # use `test`; insert into t1 values(18) -master-bin.000001 321 Query 1 # use `test`; COMMIT +master-bin.000001 164 Query 1 # use `test`; insert into t1 values(16) +master-bin.000001 253 Query 1 # use `test`; insert into t1 values(18) +master-bin.000001 342 Query 1 # use `test`; COMMIT delete from t1; delete from t2; alter table t2 type=MyISAM; diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index c18588d90a7..33fddabf232 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -19,6 +19,7 @@ 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; +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)); @@ -41,6 +42,7 @@ 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; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values ("Alas"); --- --database -- @@ -53,6 +55,7 @@ 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; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values ("Alas"); --- Remote -- @@ -61,6 +64,7 @@ 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; +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)); @@ -83,6 +87,7 @@ 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; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values ("Alas"); --- --database -- @@ -95,5 +100,6 @@ 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; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values ("Alas"); drop table t1, t2; diff --git a/mysql-test/r/mysqlbinlog2.result b/mysql-test/r/mysqlbinlog2.result index 9fe4edf7b82..805c25be086 100644 --- a/mysql-test/r/mysqlbinlog2.result +++ b/mysql-test/r/mysqlbinlog2.result @@ -20,6 +20,7 @@ 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; +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; @@ -44,6 +45,7 @@ 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; +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; @@ -60,10 +62,12 @@ insert into t1 values(null, "e"); --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=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; +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; @@ -75,6 +79,7 @@ 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; +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; @@ -85,7 +90,6 @@ insert into t1 values(null, "b"); SET INSERT_ID=3; SET TIMESTAMP=1579609944; insert into t1 values(null, "c"); -SET INSERT_ID=4; --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; @@ -94,6 +98,7 @@ 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; +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; @@ -108,6 +113,7 @@ 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; +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; @@ -122,6 +128,7 @@ 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; +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; @@ -143,6 +150,7 @@ 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; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); --- offset -- @@ -152,6 +160,7 @@ 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; +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; @@ -170,14 +179,17 @@ 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; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=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; +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; @@ -187,6 +199,7 @@ 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; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); --- stop-position -- @@ -195,6 +208,7 @@ 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; +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; @@ -220,6 +234,7 @@ 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; +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; @@ -232,6 +247,7 @@ 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; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); --- stop-datetime -- @@ -240,6 +256,7 @@ 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; +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; @@ -254,6 +271,7 @@ 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; +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; @@ -278,6 +296,7 @@ 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; +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; @@ -294,10 +313,12 @@ insert into t1 values(null, "e"); --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=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; +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; @@ -309,6 +330,7 @@ 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; +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; @@ -319,7 +341,6 @@ insert into t1 values(null, "b"); SET INSERT_ID=3; SET TIMESTAMP=1579609944; insert into t1 values(null, "c"); -SET INSERT_ID=4; --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; @@ -328,6 +349,7 @@ 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; +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; @@ -342,6 +364,7 @@ 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; +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; @@ -356,6 +379,7 @@ 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; +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; @@ -377,6 +401,7 @@ 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; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); --- offset -- @@ -386,6 +411,7 @@ 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; +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; @@ -404,14 +430,17 @@ 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; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=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; +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; @@ -421,6 +450,7 @@ 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; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); --- stop-position -- @@ -429,6 +459,7 @@ 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; +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; @@ -454,6 +485,7 @@ 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; +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; @@ -466,6 +498,7 @@ 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; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); --- stop-datetime -- @@ -474,6 +507,7 @@ 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; +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; @@ -488,6 +522,7 @@ 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; +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; diff --git a/mysql-test/r/rpl_charset.result b/mysql-test/r/rpl_charset.result index 0224bd6dba2..6b8a2ac70de 100644 --- a/mysql-test/r/rpl_charset.result +++ b/mysql-test/r/rpl_charset.result @@ -4,6 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +set timestamp=1000000000; drop database if exists mysqltest2; drop database if exists mysqltest3; create database mysqltest2 character set latin2; @@ -87,7 +88,6 @@ a b 2 Muffler 3 latin1_german2_ci 4 Müller -load data infile '../../std_data/words.dat' into table t1 (b); set @a= _cp850 'Müller' collate cp850_general_ci; truncate table t1; insert into t1 (b) values(collation(@a)); @@ -108,63 +108,39 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # drop database if exists mysqltest2 master-bin.000001 # Query 1 # drop database if exists mysqltest3 master-bin.000001 # Query 1 # create database mysqltest2 character set latin2 -master-bin.000001 # Query 1 # use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=30 master-bin.000001 # Query 1 # create database mysqltest3 -master-bin.000001 # Query 1 # use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64 master-bin.000001 # Query 1 # drop database mysqltest3 -master-bin.000001 # Query 1 # use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64 master-bin.000001 # Query 1 # create database mysqltest3 -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Query 1 # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100)) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=1 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@character_set_server) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=2 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_server) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=3 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@character_set_client) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=4 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@character_set_connection) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=5 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Query 1 # use `mysqltest2`; truncate table t1 -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=1 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=2 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(LEAST("Müller","Muffler")) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=3 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=4 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(LEAST("Müller","Muffler")) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 # Intvar 1 # INSERT_ID=74 -master-bin.000001 # Create_file 1 # db=mysqltest2;table=t1;file_id=1;block_len=581 -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 # Intvar 1 # INSERT_ID=5 -master-bin.000001 # Exec_load 1 # ;file_id=1 -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Query 1 # use `mysqltest2`; truncate table t1 -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=1 master-bin.000001 # User var 1 # @`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(collation(@a)) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Query 1 # drop database mysqltest2 -master-bin.000001 # Query 1 # SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Query 1 # drop database mysqltest3 set global character_set_server=latin2; -ERROR HY000: Binary logging and replication forbid changing the global server character set, collation +set global character_set_server=latin1; set global character_set_server=latin2; -ERROR HY000: Binary logging and replication forbid changing the global server character set, collation +set global character_set_server=latin1; set one_shot @@character_set_server=latin5; set @@max_join_size=1000; select @@character_set_server; @@ -198,12 +174,74 @@ CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 select hex(c1), hex(c2) from t1; hex(c1) hex(c2) CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 -stop slave; -delete from t1; -change master to master_log_pos=6809; -start slave until master_log_file='master-bin.000001', master_log_pos=6967; -start slave; -select hex(c1), hex(c2) from t1; -hex(c1) hex(c2) -CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +SET TIMESTAMP=1000000000; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +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; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30; +create database mysqltest3; +SET TIMESTAMP=1000000000; +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; +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; +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; +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; +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; +SET @@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30; +INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ'); drop table t1; diff --git a/mysql-test/r/rpl_error_ignored_table.result b/mysql-test/r/rpl_error_ignored_table.result index 19c8ee2e8c7..917fe103b43 100644 --- a/mysql-test/r/rpl_error_ignored_table.result +++ b/mysql-test/r/rpl_error_ignored_table.result @@ -9,7 +9,7 @@ insert into t1 values (1),(1); ERROR 23000: Duplicate entry '1' for key 1 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 273 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 273 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 287 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 287 # None 0 No # show tables like 't1'; Tables_in_test (t1) drop table t1; @@ -28,12 +28,12 @@ kill @id; drop table t2,t3; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 95 Query 1 187 use `test`; create table t1 (a int primary key) -master-bin.000001 187 Query 1 273 use `test`; insert into t1 values (1),(1) -master-bin.000001 273 Query 1 343 use `test`; drop table t1 -master-bin.000001 343 Query 1 435 use `test`; create table t2 (a int primary key) -master-bin.000001 435 Query 1 516 use `test`; insert into t2 values(1) -master-bin.000001 516 Query 1 597 use `test`; create table t3 (id int) -master-bin.000001 597 Query 1 692 use `test`; insert into t3 values(connection_id()) -master-bin.000001 692 Query 1 805 use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10) -master-bin.000001 805 Query 1 878 use `test`; drop table t2,t3 +master-bin.000001 95 Query 1 194 use `test`; create table t1 (a int primary key) +master-bin.000001 194 Query 1 287 use `test`; insert into t1 values (1),(1) +master-bin.000001 287 Query 1 364 use `test`; drop table t1 +master-bin.000001 364 Query 1 463 use `test`; create table t2 (a int primary key) +master-bin.000001 463 Query 1 551 use `test`; insert into t2 values(1) +master-bin.000001 551 Query 1 639 use `test`; create table t3 (id int) +master-bin.000001 639 Query 1 741 use `test`; insert into t3 values(connection_id()) +master-bin.000001 741 Query 1 861 use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10) +master-bin.000001 861 Query 1 941 use `test`; drop table t2,t3 diff --git a/mysql-test/r/rpl_flush_log_loop.result b/mysql-test/r/rpl_flush_log_loop.result index 4b73458386d..c57f6877516 100644 --- a/mysql-test/r/rpl_flush_log_loop.result +++ b/mysql-test/r/rpl_flush_log_loop.result @@ -14,4 +14,4 @@ start slave; flush logs; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 199 # # slave-bin.000001 Yes Yes 0 0 199 # None 0 No # +# 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 206 # # slave-bin.000001 Yes Yes 0 0 206 # None 0 No # diff --git a/mysql-test/r/rpl_flush_tables.result b/mysql-test/r/rpl_flush_tables.result index ef785bc9850..241aada0e40 100644 --- a/mysql-test/r/rpl_flush_tables.result +++ b/mysql-test/r/rpl_flush_tables.result @@ -15,26 +15,26 @@ flush no_write_to_binlog tables; show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 95 Server ver: SERVER_VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 175 use `test`; create table t1 (a int) -master-bin.000001 175 Query 1 258 use `test`; insert into t1 values (10) -master-bin.000001 258 Query 1 338 use `test`; create table t2 (a int) -master-bin.000001 338 Query 1 441 use `test`; create table t3 (a int) engine=merge union(t1) -master-bin.000001 441 Query 1 521 use `test`; create table t4 (a int) -master-bin.000001 521 Query 1 609 use `test`; insert into t4 select * from t3 -master-bin.000001 609 Query 1 697 use `test`; rename table t1 to t5, t2 to t1 +master-bin.000001 95 Query 1 182 use `test`; create table t1 (a int) +master-bin.000001 182 Query 1 272 use `test`; insert into t1 values (10) +master-bin.000001 272 Query 1 359 use `test`; create table t2 (a int) +master-bin.000001 359 Query 1 469 use `test`; create table t3 (a int) engine=merge union(t1) +master-bin.000001 469 Query 1 556 use `test`; create table t4 (a int) +master-bin.000001 556 Query 1 651 use `test`; insert into t4 select * from t3 +master-bin.000001 651 Query 1 746 use `test`; rename table t1 to t5, t2 to t1 select * from t3; a flush tables; show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 95 Server ver: SERVER_VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 175 use `test`; create table t1 (a int) -master-bin.000001 175 Query 1 258 use `test`; insert into t1 values (10) -master-bin.000001 258 Query 1 338 use `test`; create table t2 (a int) -master-bin.000001 338 Query 1 441 use `test`; create table t3 (a int) engine=merge union(t1) -master-bin.000001 441 Query 1 521 use `test`; create table t4 (a int) -master-bin.000001 521 Query 1 609 use `test`; insert into t4 select * from t3 -master-bin.000001 609 Query 1 697 use `test`; rename table t1 to t5, t2 to t1 -master-bin.000001 697 Query 1 766 use `test`; flush tables +master-bin.000001 95 Query 1 182 use `test`; create table t1 (a int) +master-bin.000001 182 Query 1 272 use `test`; insert into t1 values (10) +master-bin.000001 272 Query 1 359 use `test`; create table t2 (a int) +master-bin.000001 359 Query 1 469 use `test`; create table t3 (a int) engine=merge union(t1) +master-bin.000001 469 Query 1 556 use `test`; create table t4 (a int) +master-bin.000001 556 Query 1 651 use `test`; insert into t4 select * from t3 +master-bin.000001 651 Query 1 746 use `test`; rename table t1 to t5, t2 to t1 +master-bin.000001 746 Query 1 822 use `test`; flush tables select * from t3; a diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result index 72f7fb8bdbe..ccf77083362 100644 --- a/mysql-test/r/rpl_loaddata.result +++ b/mysql-test/r/rpl_loaddata.result @@ -22,7 +22,7 @@ day id category name 2003-03-22 2416 a bbbbb show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -slave-bin.000001 1068 +slave-bin.000001 1096 drop table t1; drop table t2; drop table t3; @@ -33,7 +33,7 @@ set global sql_slave_skip_counter=1; start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1503 # # master-bin.000001 Yes Yes 0 0 1503 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1559 # # master-bin.000001 Yes Yes 0 0 1559 # None 0 No # set sql_log_bin=0; delete from t1; set sql_log_bin=1; @@ -43,7 +43,7 @@ change master to master_user='test'; change master to master_user='root'; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1611 # # master-bin.000001 No No 0 0 1611 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1667 # # master-bin.000001 No No 0 0 1667 # None 0 No # set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; @@ -64,5 +64,5 @@ terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by ERROR 23000: Duplicate entry '2003-03-22' for key 1 show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 529 +master-bin.000001 536 drop table t2; diff --git a/mysql-test/r/rpl_loaddata_rule_m.result b/mysql-test/r/rpl_loaddata_rule_m.result index b241fc9ce0b..973f7eb6abc 100644 --- a/mysql-test/r/rpl_loaddata_rule_m.result +++ b/mysql-test/r/rpl_loaddata_rule_m.result @@ -12,6 +12,6 @@ use mysqltest; load data infile '../../std_data/rpl_loaddata.dat' into table test.t1; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 95 Query 1 190 drop database if exists mysqltest -master-bin.000001 190 Query 1 277 create database mysqltest +master-bin.000001 95 Query 1 197 drop database if exists mysqltest +master-bin.000001 197 Query 1 291 create database mysqltest drop database mysqltest; diff --git a/mysql-test/r/rpl_log.result b/mysql-test/r/rpl_log.result index 784742fdacb..f3827ad5c32 100644 --- a/mysql-test/r/rpl_log.result +++ b/mysql-test/r/rpl_log.result @@ -20,24 +20,24 @@ drop table t1; show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 210 use `test`; create table t1(n int not null auto_increment primary key) -master-bin.000001 210 Intvar 1 238 INSERT_ID=1 -master-bin.000001 238 Query 1 323 use `test`; insert into t1 values (NULL) -master-bin.000001 323 Query 1 393 use `test`; drop table t1 -master-bin.000001 393 Query 1 490 use `test`; create table t1 (word char(20) not null) -master-bin.000001 490 Create_file 1 1160 db=test;table=t1;file_id=1;block_len=581 -master-bin.000001 1160 Exec_load 1 1183 ;file_id=1 -master-bin.000001 1183 Query 1 1253 use `test`; drop table t1 +master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 217 Intvar 1 245 INSERT_ID=1 +master-bin.000001 245 Query 1 337 use `test`; insert into t1 values (NULL) +master-bin.000001 337 Query 1 414 use `test`; drop table t1 +master-bin.000001 414 Query 1 518 use `test`; create table t1 (word char(20) not null) +master-bin.000001 518 Create_file 1 1188 db=test;table=t1;file_id=1;block_len=581 +master-bin.000001 1188 Exec_load 1 1211 ;file_id=1 +master-bin.000001 1211 Query 1 1288 use `test`; drop table t1 show binlog events from 95 limit 1; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 95 Query 1 210 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key) show binlog events from 95 limit 2; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 95 Query 1 210 use `test`; create table t1(n int not null auto_increment primary key) -master-bin.000001 210 Intvar 1 238 INSERT_ID=1 +master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 217 Intvar 1 245 INSERT_ID=1 show binlog events from 95 limit 2,1; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 238 Query 1 323 use `test`; insert into t1 values (NULL) +master-bin.000001 245 Query 1 337 use `test`; insert into t1 values (NULL) flush logs; create table t5 (a int); drop table t5; @@ -50,23 +50,23 @@ drop table t1; show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 210 use `test`; create table t1(n int not null auto_increment primary key) -master-bin.000001 210 Intvar 1 238 INSERT_ID=1 -master-bin.000001 238 Query 1 323 use `test`; insert into t1 values (NULL) -master-bin.000001 323 Query 1 393 use `test`; drop table t1 -master-bin.000001 393 Query 1 490 use `test`; create table t1 (word char(20) not null) -master-bin.000001 490 Create_file 1 1160 db=test;table=t1;file_id=1;block_len=581 -master-bin.000001 1160 Exec_load 1 1183 ;file_id=1 -master-bin.000001 1183 Query 1 1253 use `test`; drop table t1 -master-bin.000001 1253 Rotate 1 1297 master-bin.000002;pos=4 +master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 217 Intvar 1 245 INSERT_ID=1 +master-bin.000001 245 Query 1 337 use `test`; insert into t1 values (NULL) +master-bin.000001 337 Query 1 414 use `test`; drop table t1 +master-bin.000001 414 Query 1 518 use `test`; create table t1 (word char(20) not null) +master-bin.000001 518 Create_file 1 1188 db=test;table=t1;file_id=1;block_len=581 +master-bin.000001 1188 Exec_load 1 1211 ;file_id=1 +master-bin.000001 1211 Query 1 1288 use `test`; drop table t1 +master-bin.000001 1288 Rotate 1 1332 master-bin.000002;pos=4 show binlog events in 'master-bin.000002'; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4 -master-bin.000002 95 Query 1 175 use `test`; create table t5 (a int) -master-bin.000002 175 Query 1 245 use `test`; drop table t5 -master-bin.000002 245 Query 1 325 use `test`; create table t1 (n int) -master-bin.000002 325 Query 1 407 use `test`; insert into t1 values (1) -master-bin.000002 407 Query 1 477 use `test`; drop table t1 +master-bin.000002 95 Query 1 182 use `test`; create table t5 (a int) +master-bin.000002 182 Query 1 259 use `test`; drop table t5 +master-bin.000002 259 Query 1 346 use `test`; create table t1 (n int) +master-bin.000002 346 Query 1 435 use `test`; insert into t1 values (1) +master-bin.000002 435 Query 1 512 use `test`; drop table t1 show binary logs; Log_name master-bin.000001 @@ -79,25 +79,25 @@ slave-bin.000002 show binlog events in 'slave-bin.000001' from 4; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 4 Format_desc 2 95 Server ver: VERSION, Binlog ver: 4 -slave-bin.000001 95 Query 1 210 use `test`; create table t1(n int not null auto_increment primary key) -slave-bin.000001 210 Intvar 1 238 INSERT_ID=1 -slave-bin.000001 238 Query 1 323 use `test`; insert into t1 values (NULL) -slave-bin.000001 323 Query 1 393 use `test`; drop table t1 -slave-bin.000001 393 Query 1 490 use `test`; create table t1 (word char(20) not null) -slave-bin.000001 490 Create_file 1 1169 db=test;table=t1;file_id=1;block_len=581 -slave-bin.000001 1169 Exec_load 1 1192 ;file_id=1 -slave-bin.000001 1192 Query 1 1262 use `test`; drop table t1 -slave-bin.000001 1262 Query 1 1342 use `test`; create table t5 (a int) -slave-bin.000001 1342 Query 1 1412 use `test`; drop table t5 -slave-bin.000001 1412 Rotate 2 1455 slave-bin.000002;pos=4 +slave-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key) +slave-bin.000001 217 Intvar 1 245 INSERT_ID=1 +slave-bin.000001 245 Query 1 337 use `test`; insert into t1 values (NULL) +slave-bin.000001 337 Query 1 414 use `test`; drop table t1 +slave-bin.000001 414 Query 1 518 use `test`; create table t1 (word char(20) not null) +slave-bin.000001 518 Create_file 1 1197 db=test;table=t1;file_id=1;block_len=581 +slave-bin.000001 1197 Exec_load 1 1220 ;file_id=1 +slave-bin.000001 1220 Query 1 1297 use `test`; drop table t1 +slave-bin.000001 1297 Query 1 1384 use `test`; create table t5 (a int) +slave-bin.000001 1384 Query 1 1461 use `test`; drop table t5 +slave-bin.000001 1461 Rotate 2 1504 slave-bin.000002;pos=4 show binlog events in 'slave-bin.000002' from 4; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000002 4 Format_desc 2 95 Server ver: VERSION, Binlog ver: 4 -slave-bin.000002 95 Query 1 175 use `test`; create table t1 (n int) -slave-bin.000002 175 Query 1 257 use `test`; insert into t1 values (1) -slave-bin.000002 257 Query 1 327 use `test`; drop table t1 +slave-bin.000002 95 Query 1 182 use `test`; create table t1 (n int) +slave-bin.000002 182 Query 1 271 use `test`; insert into t1 values (1) +slave-bin.000002 271 Query 1 348 use `test`; drop table t1 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 477 # # master-bin.000002 Yes Yes 0 0 477 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 512 # # master-bin.000002 Yes Yes 0 0 512 # None 0 No # show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log diff --git a/mysql-test/r/rpl_max_relay_size.result b/mysql-test/r/rpl_max_relay_size.result index c1589687eee..c1f8b0ad889 100644 --- a/mysql-test/r/rpl_max_relay_size.result +++ b/mysql-test/r/rpl_max_relay_size.result @@ -16,7 +16,7 @@ select @@global.max_relay_log_size; start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 68137 # # master-bin.000001 Yes Yes 0 0 68137 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73751 # # master-bin.000001 Yes Yes 0 0 73751 # None 0 No # stop slave; reset slave; set global max_relay_log_size=(5*4096); @@ -26,7 +26,7 @@ select @@global.max_relay_log_size; start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 68137 # # master-bin.000001 Yes Yes 0 0 68137 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73751 # # master-bin.000001 Yes Yes 0 0 73751 # None 0 No # stop slave; reset slave; set global max_relay_log_size=0; @@ -36,7 +36,7 @@ select @@global.max_relay_log_size; start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 68137 # # master-bin.000001 Yes Yes 0 0 68137 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73751 # # master-bin.000001 Yes Yes 0 0 73751 # None 0 No # stop slave; reset slave; flush logs; @@ -49,12 +49,12 @@ flush logs; create table t1 (a int); show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 68217 # # master-bin.000001 Yes Yes 0 0 68217 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73838 # # master-bin.000001 Yes Yes 0 0 73838 # None 0 No # flush logs; drop table t1; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 68287 # # master-bin.000001 Yes Yes 0 0 68287 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73915 # # master-bin.000001 Yes Yes 0 0 73915 # None 0 No # flush logs; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB diff --git a/mysql-test/r/rpl_relayrotate.result b/mysql-test/r/rpl_relayrotate.result index bd6e10409b9..38a5a634dd6 100644 --- a/mysql-test/r/rpl_relayrotate.result +++ b/mysql-test/r/rpl_relayrotate.result @@ -18,5 +18,5 @@ max(a) 8000 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 687207 # # master-bin.000001 Yes Yes 0 0 687207 # None 0 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 743228 # # master-bin.000001 Yes Yes 0 0 743228 # None 0 No # drop table t1; diff --git a/mysql-test/r/rpl_replicate_do.result b/mysql-test/r/rpl_replicate_do.result index 5cdcb6f30fb..df75433e84e 100644 --- a/mysql-test/r/rpl_replicate_do.result +++ b/mysql-test/r/rpl_replicate_do.result @@ -28,4 +28,4 @@ ERROR 42S02: Table 'test.t11' doesn't exist drop table if exists t1,t2,t11; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1554 # # master-bin.000001 Yes Yes test.t1 0 0 1554 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1617 # # master-bin.000001 Yes Yes test.t1 0 0 1617 # None 0 No # diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result index b1847636790..e675f8177ab 100644 --- a/mysql-test/r/rpl_rotate_logs.result +++ b/mysql-test/r/rpl_rotate_logs.result @@ -16,7 +16,7 @@ create table t1 (s text); insert into t1 values('Could not break slave'),('Tried hard'); show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 521 # # master-bin.000001 Yes Yes 0 0 521 # None 0 No # +# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 549 # # master-bin.000001 Yes Yes 0 0 549 # None 0 No # select * from t1; s Could not break slave @@ -57,7 +57,7 @@ master-bin.000003 insert into t2 values (65); show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 469 # # master-bin.000003 Yes Yes 0 0 469 # None 0 No # +# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 497 # # master-bin.000003 Yes Yes 0 0 497 # None 0 No # select * from t2; m 34 @@ -79,13 +79,13 @@ master-bin.000004 master-bin.000005 show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000005 1387 +master-bin.000005 2050 select * from t4; a testing temporary tables part 2 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 1387 # # master-bin.000005 Yes Yes 0 0 1387 # None 0 No # +# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2050 # # master-bin.000005 Yes Yes 0 0 2050 # None 0 No # lock tables t3 read; select count(*) from t3 where n >= 4; count(*) diff --git a/mysql-test/r/rpl_temporary.result b/mysql-test/r/rpl_temporary.result index 3e8c11883be..7d3ebd4ad32 100644 --- a/mysql-test/r/rpl_temporary.result +++ b/mysql-test/r/rpl_temporary.result @@ -39,18 +39,18 @@ f show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 178 use `test`; drop table if exists t1,t2 -master-bin.000001 178 Query 1 257 use `test`; create table t1(f int) -master-bin.000001 257 Query 1 336 use `test`; create table t2(f int) -master-bin.000001 336 Query 1 455 use `test`; insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10) -master-bin.000001 455 Query 1 544 use `test`; create temporary table t3(f int) -master-bin.000001 544 Query 1 642 use `test`; insert into t3 select * from t1 where f<6 -master-bin.000001 642 Query 1 731 use `test`; create temporary table t3(f int) -master-bin.000001 731 Query 1 826 use `test`; insert into t2 select count(*) from t3 -master-bin.000001 826 Query 1 925 use `test`; insert into t3 select * from t1 where f>=4 -master-bin.000001 925 Query 1 1005 use `test`; drop temporary table t3 -master-bin.000001 1005 Query 1 1100 use `test`; insert into t2 select count(*) from t3 -master-bin.000001 1100 Query 1 1180 use `test`; drop temporary table t3 +master-bin.000001 95 Query 1 185 use `test`; drop table if exists t1,t2 +master-bin.000001 185 Query 1 271 use `test`; create table t1(f int) +master-bin.000001 271 Query 1 357 use `test`; create table t2(f int) +master-bin.000001 357 Query 1 483 use `test`; insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10) +master-bin.000001 483 Query 1 579 use `test`; create temporary table t3(f int) +master-bin.000001 579 Query 1 684 use `test`; insert into t3 select * from t1 where f<6 +master-bin.000001 684 Query 1 780 use `test`; create temporary table t3(f int) +master-bin.000001 780 Query 1 882 use `test`; insert into t2 select count(*) from t3 +master-bin.000001 882 Query 1 988 use `test`; insert into t3 select * from t1 where f>=4 +master-bin.000001 988 Query 1 1075 use `test`; drop temporary table t3 +master-bin.000001 1075 Query 1 1177 use `test`; insert into t2 select count(*) from t3 +master-bin.000001 1177 Query 1 1264 use `test`; drop temporary table t3 drop table t1, t2; use test; SET TIMESTAMP=1040323920; diff --git a/mysql-test/r/rpl_timezone.result b/mysql-test/r/rpl_timezone.result index 495fccd35a3..ac219fe9d1c 100644 --- a/mysql-test/r/rpl_timezone.result +++ b/mysql-test/r/rpl_timezone.result @@ -33,12 +33,12 @@ t show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 181 use `test`; create table t1 (t timestamp) -master-bin.000001 181 Query 1 266 use `test`; create table t2 (t char(32)) -master-bin.000001 266 Query 1 351 use `test`; SET ONE_SHOT TIME_ZONE='UTC' -master-bin.000001 351 Query 1 468 use `test`; insert into t1 values ('20040101000000'), ('20040611093902') -master-bin.000001 468 Query 1 539 use `test`; delete from t1 -master-bin.000001 539 Query 1 656 use `test`; insert into t1 values ('20040101000000'), ('20040611093902') +master-bin.000001 95 Query 1 188 use `test`; create table t1 (t timestamp) +master-bin.000001 188 Query 1 280 use `test`; create table t2 (t char(32)) +master-bin.000001 280 Query 1 372 use `test`; SET ONE_SHOT TIME_ZONE='UTC' +master-bin.000001 372 Query 1 496 use `test`; insert into t1 values ('20040101000000'), ('20040611093902') +master-bin.000001 496 Query 1 574 use `test`; delete from t1 +master-bin.000001 574 Query 1 698 use `test`; insert into t1 values ('20040101000000'), ('20040611093902') set time_zone='MET'; insert into t2 (select t from t1); select * from t1; diff --git a/mysql-test/r/rpl_user_variables.result b/mysql-test/r/rpl_user_variables.result index dd9a11e370f..2c2a17c953a 100644 --- a/mysql-test/r/rpl_user_variables.result +++ b/mysql-test/r/rpl_user_variables.result @@ -76,34 +76,35 @@ abcn1n2 NULL NULL NULL -show binlog events from 179; +show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000001 179 User var 2 222 @`i1`=12345678901234 -slave-bin.000001 222 User var 2 265 @`i2`=-12345678901234 -slave-bin.000001 265 User var 2 308 @`i3`=0 -slave-bin.000001 308 User var 2 351 @`i4`=-1 -slave-bin.000001 351 Query 1 456 use `test`; insert into t1 values (@i1), (@i2), (@i3), (@i4) -slave-bin.000001 456 User var 2 499 @`r1`=12.5 -slave-bin.000001 499 User var 2 542 @`r2`=-12.5 -slave-bin.000001 542 Query 1 633 use `test`; insert into t1 values (@r1), (@r2) -slave-bin.000001 633 User var 2 682 @`s1`=_latin1 0x5468697320697320612074657374 COLLATE latin1_swedish_ci -slave-bin.000001 682 User var 2 717 @`s2`=_latin1 "" COLLATE latin1_swedish_ci -slave-bin.000001 717 User var 2 759 @`s3`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci -slave-bin.000001 759 User var 2 801 @`s4`=_latin1 0x6162635C646566 COLLATE latin1_swedish_ci -slave-bin.000001 801 User var 2 843 @`s5`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci -slave-bin.000001 843 Query 1 955 use `test`; insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5) -slave-bin.000001 955 User var 2 981 @`n1`=NULL -slave-bin.000001 981 Query 1 1065 use `test`; insert into t1 values (@n1) -slave-bin.000001 1065 User var 2 1091 @`n2`=NULL -slave-bin.000001 1091 Query 1 1175 use `test`; insert into t1 values (@n2) -slave-bin.000001 1175 Query 1 1285 use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1) -slave-bin.000001 1285 User var 2 1327 @`a`=2 -slave-bin.000001 1327 Query 1 1421 use `test`; insert into t1 values (@a+(@b:=@a+1)) -slave-bin.000001 1421 User var 2 1458 @`q`=_latin1 0x616263 COLLATE latin1_swedish_ci -slave-bin.000001 1458 Query 1 1584 use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2')) -slave-bin.000001 1584 User var 2 1626 @`a`=5 -slave-bin.000001 1626 Query 1 1714 use `test`; insert into t1 values (@a),(@a) -slave-bin.000001 1714 User var 2 1739 @`a`=NULL -slave-bin.000001 1739 Query 1 1834 use `test`; insert into t1 values (@a),(@a),(@a*5) +slave-bin.000001 95 Query 1 186 use `test`; create table t1(n char(30)) +slave-bin.000001 186 User var 2 229 @`i1`=12345678901234 +slave-bin.000001 229 User var 2 272 @`i2`=-12345678901234 +slave-bin.000001 272 User var 2 315 @`i3`=0 +slave-bin.000001 315 User var 2 358 @`i4`=-1 +slave-bin.000001 358 Query 1 470 use `test`; insert into t1 values (@i1), (@i2), (@i3), (@i4) +slave-bin.000001 470 User var 2 513 @`r1`=12.5 +slave-bin.000001 513 User var 2 556 @`r2`=-12.5 +slave-bin.000001 556 Query 1 654 use `test`; insert into t1 values (@r1), (@r2) +slave-bin.000001 654 User var 2 703 @`s1`=_latin1 0x5468697320697320612074657374 COLLATE latin1_swedish_ci +slave-bin.000001 703 User var 2 738 @`s2`=_latin1 "" COLLATE latin1_swedish_ci +slave-bin.000001 738 User var 2 780 @`s3`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci +slave-bin.000001 780 User var 2 822 @`s4`=_latin1 0x6162635C646566 COLLATE latin1_swedish_ci +slave-bin.000001 822 User var 2 864 @`s5`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci +slave-bin.000001 864 Query 1 983 use `test`; insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5) +slave-bin.000001 983 User var 2 1009 @`n1`=NULL +slave-bin.000001 1009 Query 1 1100 use `test`; insert into t1 values (@n1) +slave-bin.000001 1100 User var 2 1126 @`n2`=NULL +slave-bin.000001 1126 Query 1 1217 use `test`; insert into t1 values (@n2) +slave-bin.000001 1217 Query 1 1334 use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1) +slave-bin.000001 1334 User var 2 1376 @`a`=2 +slave-bin.000001 1376 Query 1 1477 use `test`; insert into t1 values (@a+(@b:=@a+1)) +slave-bin.000001 1477 User var 2 1514 @`q`=_latin1 0x616263 COLLATE latin1_swedish_ci +slave-bin.000001 1514 Query 1 1647 use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2')) +slave-bin.000001 1647 User var 2 1689 @`a`=5 +slave-bin.000001 1689 Query 1 1784 use `test`; insert into t1 values (@a),(@a) +slave-bin.000001 1784 User var 2 1809 @`a`=NULL +slave-bin.000001 1809 Query 1 1911 use `test`; insert into t1 values (@a),(@a),(@a*5) drop table t1; stop slave; diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index 69fcc5c45fe..bacd8311a1e 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -177,16 +177,17 @@ insert into t1 values (@var1),(@var2); show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 User var 1 136 @`a b`=_latin1 0x68656C6C6F COLLATE latin1_swedish_ci -master-bin.000001 136 Query 1 222 use `test`; INSERT INTO t1 VALUES(@`a b`) -master-bin.000001 222 User var 1 264 @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci -master-bin.000001 264 User var 1 302 @`var2`=_latin1 0x61 COLLATE latin1_swedish_ci -master-bin.000001 302 Query 1 396 use `test`; insert into t1 values (@var1),(@var2) +master-bin.000001 136 Query 1 229 use `test`; INSERT INTO t1 VALUES(@`a b`) +master-bin.000001 229 User var 1 271 @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci +master-bin.000001 271 User var 1 309 @`var2`=_latin1 0x61 COLLATE latin1_swedish_ci +master-bin.000001 309 Query 1 410 use `test`; insert into t1 values (@var1),(@var2) /*!40019 SET @@session.max_insert_delayed_threads=0*/; 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; +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`:=_latin1 0x61 COLLATE `latin1_swedish_ci`; diff --git a/mysql-test/t/rpl_charset.test b/mysql-test/t/rpl_charset.test index 52ace9a6aa5..e8a12ff8317 100644 --- a/mysql-test/t/rpl_charset.test +++ b/mysql-test/t/rpl_charset.test @@ -1,11 +1,9 @@ # Replication of character sets. # This test will fail if the server/client does not support enough charsets. -# Remember that there currently exists -# Bug #2326: Charset of table is determined by charset of db only if "USE db;" - source include/master-slave.inc; --disable_warnings +set timestamp=1000000000; drop database if exists mysqltest2; drop database if exists mysqltest3; --enable_warnings @@ -46,7 +44,7 @@ set character_set_client=cp850, collation_connection=latin2_croatian_ci; insert into t1 (b) values(@@character_set_server); insert into t1 (b) values(@@collation_server); # character_set_database and collation_database are not tested as they -# are not replicated (Bar said that this variable may be removed shortly). +# needn't be replicated (Bar said in Jan 2005). insert into t1 (b) values(@@character_set_client); # collation_client does not exist insert into t1 (b) values(@@character_set_connection); @@ -79,9 +77,10 @@ select "--- --slave--" as ""; --enable_query_log select * from mysqltest2.t1 order by a; -# See if SET ONE_SHOT gets into binlog when LOAD DATA -connection master; -load data infile '../../std_data/words.dat' into table t1 (b); +# Presently charset info is not logged with LOAD DATA but it will +# change in Jan 2005 when Dmitri pushes his new LOAD DATA, +# before 5.0.3 goes out. When done, LOAD DATA INFILE should be tested +# here. # See if user var is prefixed with collation in binlog and replicated well. # Note: replication of user variables is broken as far as derivation is @@ -90,6 +89,7 @@ load data infile '../../std_data/words.dat' into table t1 (b); # know if the collation was explicit or not, so we use DERIVATION_NONE, # which provokes error messages (like 'Illegal mix of collation') when # we replay the master's INSERT/etc statements. +connection master; set @a= _cp850 'Müller' collate cp850_general_ci; truncate table t1; insert into t1 (b) values(collation(@a)); @@ -110,13 +110,13 @@ drop database mysqltest3; show binlog events from 95; sync_slave_with_master; -# Check that we can't change global.collation_server +# Check that we can change global.collation_server (since 5.0.3) -error 1387; set global character_set_server=latin2; +set global character_set_server=latin1; # back connection master; -error 1387; set global character_set_server=latin2; +set global character_set_server=latin1; # back # Check that SET ONE_SHOT is really one shot @@ -150,35 +150,9 @@ select hex(c1), hex(c2) from t1; sync_slave_with_master; select hex(c1), hex(c2) from t1; -# Now test for BUG##5705: SET CHARACTER_SET_SERVER etc will be lost if -# STOP SLAVE before following query - -stop slave; -delete from t1; -# Slave is now supposed to have stopped _after_ the INSERT - -# Note that the following positions may change between MySQL versions! - -# This position should be position for the SET ONE SHOT CHARACTER_SET_CLIENT -# command just before the INSERT. -# You can find it by doing: -# ../client/mysqlbinlog var/log/master-bin.000001 | grep -3 CHARACTER_SET | tail -7 -change master to master_log_pos=6809; - -# This position should be position of the INSERT command. -# You can find it by doing: -# -# ../client/mysqlbinlog var/log/master-bin.000001 | grep -3 INSERT | tail -4 - -start slave until master_log_file='master-bin.000001', master_log_pos=6967; - -# Slave is supposed to stop _after_ the INSERT, even though 'master_log_pos' is -# the position of the beginning of the INSERT; after SET slave is not -# supposed to increment position. -wait_for_slave_to_stop; -start slave; -sync_with_master; -select hex(c1), hex(c2) from t1; connection master; +# Let's have a look at generated SETs. +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001 drop table t1; sync_slave_with_master; diff --git a/mysql-test/t/rpl_user_variables.test b/mysql-test/t/rpl_user_variables.test index 01d4b0e033c..c0327a7ddb3 100644 --- a/mysql-test/t/rpl_user_variables.test +++ b/mysql-test/t/rpl_user_variables.test @@ -46,7 +46,7 @@ save_master_pos; connection slave; sync_with_master; select * from t1; -show binlog events from 179; +show binlog events from 95; connection master; drop table t1; save_master_pos; |