diff options
author | Alexander Barkov <bar@mariadb.org> | 2016-10-08 15:20:16 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2016-10-08 15:20:16 +0400 |
commit | 553ca406cd44946d454d84c08a7247ef595378f5 (patch) | |
tree | 75f9ee7f976f43449ebd09fc1473929e3b0c55d7 | |
parent | 46dc7bdf1d243614b8ad3a00e20d7b840a8d3973 (diff) | |
download | mariadb-git-553ca406cd44946d454d84c08a7247ef595378f5.tar.gz |
A post-fix for MDEV-10866 Extend PREPARE and EXECUTE IMMEDIATE to understand expressions
The result of binlog_{row|stm}_ctype_ucs.test depended on the machine
time zone setting. Making the test timzone independent.
-rw-r--r-- | mysql-test/extra/binlog_tests/ctype_ucs_binlog.test | 6 | ||||
-rw-r--r-- | mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result | 18 | ||||
-rw-r--r-- | mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result | 30 |
3 files changed, 31 insertions, 23 deletions
diff --git a/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test b/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test index 819aaa87a8f..bc94c9df5e8 100644 --- a/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test +++ b/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test @@ -30,6 +30,8 @@ drop table t2; --echo # MDEV-10866 Extend PREPARE and EXECUTE IMMEDIATE to understand expressions --echo # +SET TIMESTAMP=UNIX_TIMESTAMP('1970-01-01 06:46:40'); + FLUSH LOGS; SET NAMES utf8; CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8); @@ -51,9 +53,11 @@ SELECT * FROM t1; DROP TABLE t1; FLUSH LOGS; let $MYSQLD_DATADIR= `select @@datadir`; ---replace_regex /# at [0-9]*/# at #/ /(exec_time=|end_log_pos |Xid = |thread_id=|server id |table id |mapped to number )[0-9]+/\1#/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/ /Gtid list [[][0-9]+-[0-9]+-[0-9]+[\]]/Gtid list [#-#-#]/ /session[.](gtid_domain_id|server_id|gtid_seq_no)=[0-9]+/session.\1=#/ +--replace_regex /TIMESTAMP=[0-9]*/TIMESTAMP=XXX/ /# at [0-9]*/# at #/ /(exec_time=|end_log_pos |Xid = |thread_id=|server id |table id |mapped to number )[0-9]+/\1#/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/ /Gtid list [[][0-9]+-[0-9]+-[0-9]+[\]]/Gtid list [#-#-#]/ /session[.](gtid_domain_id|server_id|gtid_seq_no)=[0-9]+/session.\1=#/ --exec $MYSQL_BINLOG --base64-output=decode-rows -vv $MYSQLD_DATADIR/master-bin.000003 +SET TIMESTAMP=DEFAULT; + --echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result index 848ef7c5e49..9a2fbfb9d6e 100644 --- a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result @@ -40,6 +40,7 @@ drop table t2; # # MDEV-10866 Extend PREPARE and EXECUTE IMMEDIATE to understand expressions # +SET TIMESTAMP=UNIX_TIMESTAMP('1970-01-01 06:46:40'); FLUSH LOGS; SET NAMES utf8; CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8); @@ -86,7 +87,7 @@ DELIMITER /*!*/; # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; @@ -111,7 +112,7 @@ BEGIN ### @1='ä(i1)' /* VARSTRING(30) meta=30 nullable=1 is_null=0 */ # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # @@ -128,7 +129,7 @@ BEGIN ### @1='ä(i2)' /* VARSTRING(30) meta=30 nullable=1 is_null=0 */ # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # @@ -145,7 +146,7 @@ BEGIN ### @1='ä(i3)' /* VARSTRING(30) meta=30 nullable=1 is_null=0 */ # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # @@ -162,7 +163,7 @@ BEGIN ### @1='ä(p1)' /* VARSTRING(30) meta=30 nullable=1 is_null=0 */ # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # @@ -179,7 +180,7 @@ BEGIN ### @1='ä(p2)' /* VARSTRING(30) meta=30 nullable=1 is_null=0 */ # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # @@ -196,7 +197,7 @@ BEGIN ### @1='ä(p3)' /* VARSTRING(30) meta=30 nullable=1 is_null=0 */ # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # @@ -204,7 +205,7 @@ COMMIT /*!100001 SET @@session.gtid_seq_no=#*//*!*/; # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; DROP TABLE `t1` /* generated by server */ /*!*/; # at # @@ -214,6 +215,7 @@ DELIMITER ; ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; +SET TIMESTAMP=DEFAULT; # # End of 10.2 tests # diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result index c358cfcd4f2..e8ecdb7b976 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result @@ -45,6 +45,7 @@ drop table t2; # # MDEV-10866 Extend PREPARE and EXECUTE IMMEDIATE to understand expressions # +SET TIMESTAMP=UNIX_TIMESTAMP('1970-01-01 06:46:40'); FLUSH LOGS; SET NAMES utf8; CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8); @@ -91,7 +92,7 @@ DELIMITER /*!*/; # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; @@ -109,12 +110,12 @@ BEGIN /*!*/; # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; INSERT INTO t1 VALUES ('ä(i1)') /*!*/; # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # @@ -124,12 +125,12 @@ BEGIN /*!*/; # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; INSERT INTO t1 VALUES ('ä(i2)') /*!*/; # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # @@ -139,12 +140,12 @@ BEGIN /*!*/; # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; INSERT INTO t1 VALUES ('ä(i3)') /*!*/; # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # @@ -154,12 +155,12 @@ BEGIN /*!*/; # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; INSERT INTO t1 VALUES ('ä(p1)') /*!*/; # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # @@ -169,12 +170,12 @@ BEGIN /*!*/; # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; INSERT INTO t1 VALUES ('ä(p2)') /*!*/; # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # @@ -184,12 +185,12 @@ BEGIN /*!*/; # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; INSERT INTO t1 VALUES ('ä(p3)') /*!*/; # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; COMMIT /*!*/; # at # @@ -197,7 +198,7 @@ COMMIT /*!100001 SET @@session.gtid_seq_no=#*//*!*/; # at # #700101 6:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 -SET TIMESTAMP=10000/*!*/; +SET TIMESTAMP=XXX/*!*/; DROP TABLE `t1` /* generated by server */ /*!*/; # at # @@ -207,6 +208,7 @@ DELIMITER ; ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; +SET TIMESTAMP=DEFAULT; # # End of 10.2 tests # |