Commit cfe0fe1a authored by Bernhard M. Wiedemann's avatar Bernhard M. Wiedemann Committed by Sergey Vojtovich

Fix tests in 2020

unfortunately, the year 2038 problem prevented me from pushing
the deadline even further into the future.
parent c61e8a65
This diff is collapsed.
This diff is collapsed.
...@@ -49,7 +49,7 @@ SECOND 10 SELECT 1 ...@@ -49,7 +49,7 @@ SECOND 10 SELECT 1
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test'; SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
execute_at IS NULL starts IS NULL ends IS NULL comment execute_at IS NULL starts IS NULL ends IS NULL comment
1 0 1 1 0 1
ALTER EVENT event_starts_test ON SCHEDULE AT '2020-02-02 20:00:02'; ALTER EVENT event_starts_test ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE;
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test'; SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
execute_at IS NULL starts IS NULL ends IS NULL comment execute_at IS NULL starts IS NULL ends IS NULL comment
0 1 1 0 1 1
...@@ -62,7 +62,7 @@ SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.even ...@@ -62,7 +62,7 @@ SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.even
execute_at IS NULL starts IS NULL ends IS NULL comment execute_at IS NULL starts IS NULL ends IS NULL comment
0 1 1 0 1 1
DROP EVENT event_starts_test; DROP EVENT event_starts_test;
CREATE EVENT event_starts_test ON SCHEDULE EVERY 20 SECOND STARTS '2020-02-02 20:00:02' ENDS '2022-02-02 20:00:02' DO SELECT 2; CREATE EVENT event_starts_test ON SCHEDULE EVERY 20 SECOND STARTS '1970-01-02 00:00:00' ENDS '1970-01-03 00:00:00' ON COMPLETION PRESERVE DISABLE DO SELECT 2;
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test'; SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
execute_at IS NULL starts IS NULL ends IS NULL comment execute_at IS NULL starts IS NULL ends IS NULL comment
1 0 0 1 0 0
......
...@@ -1424,7 +1424,7 @@ CREATE TABLE t1(c1 CHAR(10)); ...@@ -1424,7 +1424,7 @@ CREATE TABLE t1(c1 CHAR(10));
CREATE TRIGGER t1_bi BEFORE INSERT ON t1 CREATE TRIGGER t1_bi BEFORE INSERT ON t1
FOR EACH ROW FOR EACH ROW
SET NEW.c1 = ''; SET NEW.c1 = '';
CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO SELECT '' AS test; CREATE EVENT ev1 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO SELECT '' AS test;
set names utf8; set names utf8;
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
...@@ -1444,7 +1444,7 @@ FOR EACH ROW ...@@ -1444,7 +1444,7 @@ FOR EACH ROW
SET NEW.c1 = 'тест' koi8r koi8r_general_ci latin1_swedish_ci SET NEW.c1 = 'тест' koi8r koi8r_general_ci latin1_swedish_ci
SHOW CREATE EVENT ev1; SHOW CREATE EVENT ev1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ev1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 'тест' AS test koi8r koi8r_general_ci latin1_swedish_ci ev1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev1` ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO SELECT 'тест' AS test koi8r koi8r_general_ci latin1_swedish_ci
DROP VIEW v1; DROP VIEW v1;
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP FUNCTION f1; DROP FUNCTION f1;
......
...@@ -8,15 +8,15 @@ ...@@ -8,15 +8,15 @@
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
--enable_warnings --enable_warnings
reset master;
# We need this for getting fixed timestamps inside of this test. # We need this for getting fixed timestamps inside of this test.
# I use a date in the future to keep a growing timestamp along the # I use a date in the past to keep a growing timestamp along the
# binlog (including the Start_log_event). This test will work # binlog (including the Start_log_event). This test will work
# unchanged everywhere, because mysql-test-run has fixed TZ, which it # unchanged everywhere, because mysql-test-run has fixed TZ, which it
# exports (so mysqlbinlog has same fixed TZ). # exports (so mysqlbinlog has same fixed TZ).
set @a=UNIX_TIMESTAMP("2020-01-21 15:32:22"); set @a=UNIX_TIMESTAMP("1970-01-21 15:32:22");
set timestamp=@a; set timestamp=@a;
reset master;
create table t1 (a int auto_increment not null primary key, b char(3)); create table t1 (a int auto_increment not null primary key, b char(3));
insert into t1 values(null, "a"); insert into t1 values(null, "a");
insert into t1 values(null, "b"); insert into t1 values(null, "b");
...@@ -70,11 +70,11 @@ let $stop_pos= `select @binlog_start_pos + 770`; ...@@ -70,11 +70,11 @@ let $stop_pos= `select @binlog_start_pos + 770`;
--disable_query_log --disable_query_log
select "--- start-datetime --" as ""; select "--- start-datetime --" as "";
--enable_query_log --enable_query_log
--exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001 --exec $MYSQL_BINLOG --short-form "--start-datetime=1970-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001
--disable_query_log --disable_query_log
select "--- stop-datetime --" as ""; select "--- stop-datetime --" as "";
--enable_query_log --enable_query_log
--exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001 --exec $MYSQL_BINLOG --short-form "--stop-datetime=1970-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001
--disable_query_log --disable_query_log
select "--- Local with 2 binlogs on command line --" as ""; select "--- Local with 2 binlogs on command line --" as "";
...@@ -102,11 +102,11 @@ let $stop_pos= `select @binlog_start_pos + 69`; ...@@ -102,11 +102,11 @@ let $stop_pos= `select @binlog_start_pos + 69`;
--disable_query_log --disable_query_log
select "--- start-datetime --" as ""; select "--- start-datetime --" as "";
--enable_query_log --enable_query_log
--exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 --exec $MYSQL_BINLOG --short-form "--start-datetime=1970-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002
--disable_query_log --disable_query_log
select "--- stop-datetime --" as ""; select "--- stop-datetime --" as "";
--enable_query_log --enable_query_log
--exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002 --exec $MYSQL_BINLOG --short-form "--stop-datetime=1970-01-21 15:32:24" $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.000002
--disable_query_log --disable_query_log
select "--- Remote --" as ""; select "--- Remote --" as "";
...@@ -137,11 +137,11 @@ let $stop_pos= `select @binlog_start_pos + 770`; ...@@ -137,11 +137,11 @@ let $stop_pos= `select @binlog_start_pos + 770`;
--disable_query_log --disable_query_log
select "--- start-datetime --" as ""; select "--- start-datetime --" as "";
--enable_query_log --enable_query_log
--exec $MYSQL_BINLOG --short-form "--start-datetime=2020-01-21 15:32:24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 --exec $MYSQL_BINLOG --short-form "--start-datetime=1970-01-21 15:32:24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
--disable_query_log --disable_query_log
select "--- stop-datetime --" as ""; select "--- stop-datetime --" as "";
--enable_query_log --enable_query_log
--exec $MYSQL_BINLOG --short-form "--stop-datetime=2020-01-21 15:32:24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 --exec $MYSQL_BINLOG --short-form "--stop-datetime=1970-01-21 15:32:24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001
--disable_query_log --disable_query_log
select "--- Remote with 2 binlogs on command line --" as ""; select "--- Remote with 2 binlogs on command line --" as "";
...@@ -166,11 +166,11 @@ let $stop_pos= `select @binlog_start_pos + 28`; ...@@ -166,11 +166,11 @@ let $stop_pos= `select @binlog_start_pos + 28`;
--disable_query_log --disable_query_log
select "--- start-datetime --" as ""; select "--- start-datetime --" as "";
--enable_query_log --enable_query_log
--exec $MYSQL_BINLOG --short-form "--start-datetime=20200121153224" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 --exec $MYSQL_BINLOG --short-form "--start-datetime=19700121153224" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
--disable_query_log --disable_query_log
select "--- stop-datetime --" as ""; select "--- stop-datetime --" as "";
--enable_query_log --enable_query_log
--exec $MYSQL_BINLOG --short-form "--stop-datetime=2020/01/21 15@32@24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002 --exec $MYSQL_BINLOG --short-form "--stop-datetime=1970/01/21 15@32@24" --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 master-bin.000002
--disable_query_log --disable_query_log
select "--- to-last-log --" as ""; select "--- to-last-log --" as "";
......
...@@ -821,7 +821,7 @@ use mysqltest1| ...@@ -821,7 +821,7 @@ use mysqltest1|
# - Event ev1 # - Event ev1
CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO CREATE EVENT ev1 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN BEGIN
DECLARE 1 CHAR(10); DECLARE 1 CHAR(10);
...@@ -838,7 +838,7 @@ END| ...@@ -838,7 +838,7 @@ END|
# - Event ev2 # - Event ev2
CREATE EVENT ev2 ON SCHEDULE AT '2030-01-01 00:00:00' DO CREATE EVENT ev2 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN BEGIN
DECLARE 1 CHAR(10) CHARACTER SET utf8; DECLARE 1 CHAR(10) CHARACTER SET utf8;
...@@ -855,7 +855,7 @@ END| ...@@ -855,7 +855,7 @@ END|
# - Event ev3 # - Event ev3
CREATE EVENT mysqltest2.ev3 ON SCHEDULE AT '2030-01-01 00:00:00' DO CREATE EVENT mysqltest2.ev3 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN BEGIN
DECLARE 1 CHAR(10) CHARACTER SET utf8; DECLARE 1 CHAR(10) CHARACTER SET utf8;
...@@ -872,7 +872,7 @@ END| ...@@ -872,7 +872,7 @@ END|
# - Event ev4 # - Event ev4
CREATE EVENT mysqltest2.ev4 ON SCHEDULE AT '2030-01-01 00:00:00' DO CREATE EVENT mysqltest2.ev4 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN BEGIN
DECLARE 1 CHAR(10) CHARACTER SET utf8; DECLARE 1 CHAR(10) CHARACTER SET utf8;
......
...@@ -821,7 +821,7 @@ use mysqltest1| ...@@ -821,7 +821,7 @@ use mysqltest1|
# - Event ev1 # - Event ev1
CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO CREATE EVENT ev1 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN BEGIN
DECLARE перем1 CHAR(10); DECLARE перем1 CHAR(10);
...@@ -838,7 +838,7 @@ END| ...@@ -838,7 +838,7 @@ END|
# - Event ev2 # - Event ev2
CREATE EVENT ev2 ON SCHEDULE AT '2030-01-01 00:00:00' DO CREATE EVENT ev2 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8; DECLARE перем1 CHAR(10) CHARACTER SET utf8;
...@@ -855,7 +855,7 @@ END| ...@@ -855,7 +855,7 @@ END|
# - Event ev3 # - Event ev3
CREATE EVENT mysqltest2.ev3 ON SCHEDULE AT '2030-01-01 00:00:00' DO CREATE EVENT mysqltest2.ev3 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8; DECLARE перем1 CHAR(10) CHARACTER SET utf8;
...@@ -872,7 +872,7 @@ END| ...@@ -872,7 +872,7 @@ END|
# - Event ev4 # - Event ev4
CREATE EVENT mysqltest2.ev4 ON SCHEDULE AT '2030-01-01 00:00:00' DO CREATE EVENT mysqltest2.ev4 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN BEGIN
DECLARE перем1 CHAR(10) CHARACTER SET utf8; DECLARE перем1 CHAR(10) CHARACTER SET utf8;
......
...@@ -67,7 +67,7 @@ drop event event2; ...@@ -67,7 +67,7 @@ drop event event2;
CREATE EVENT event_starts_test ON SCHEDULE EVERY 10 SECOND COMMENT "" DO SELECT 1; CREATE EVENT event_starts_test ON SCHEDULE EVERY 10 SECOND COMMENT "" DO SELECT 1;
SELECT interval_field, interval_value, body FROM mysql.event WHERE db='events_test' AND name='event_starts_test'; SELECT interval_field, interval_value, body FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test'; SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
ALTER EVENT event_starts_test ON SCHEDULE AT '2020-02-02 20:00:02'; ALTER EVENT event_starts_test ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE;
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test'; SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
ALTER EVENT event_starts_test COMMENT "non-empty comment"; ALTER EVENT event_starts_test COMMENT "non-empty comment";
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test'; SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
...@@ -75,7 +75,7 @@ ALTER EVENT event_starts_test COMMENT ""; ...@@ -75,7 +75,7 @@ ALTER EVENT event_starts_test COMMENT "";
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test'; SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
DROP EVENT event_starts_test; DROP EVENT event_starts_test;
CREATE EVENT event_starts_test ON SCHEDULE EVERY 20 SECOND STARTS '2020-02-02 20:00:02' ENDS '2022-02-02 20:00:02' DO SELECT 2; CREATE EVENT event_starts_test ON SCHEDULE EVERY 20 SECOND STARTS '1970-01-02 00:00:00' ENDS '1970-01-03 00:00:00' ON COMPLETION PRESERVE DISABLE DO SELECT 2;
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test'; SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
ALTER EVENT event_starts_test COMMENT "non-empty comment"; ALTER EVENT event_starts_test COMMENT "non-empty comment";
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test'; SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
......
...@@ -1156,7 +1156,7 @@ CREATE TRIGGER t1_bi BEFORE INSERT ON t1 ...@@ -1156,7 +1156,7 @@ CREATE TRIGGER t1_bi BEFORE INSERT ON t1
FOR EACH ROW FOR EACH ROW
SET NEW.c1 = ''; SET NEW.c1 = '';
CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO SELECT '' AS test; CREATE EVENT ev1 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO SELECT '' AS test;
# Test: switch the character set and show that SHOW CREATE output is # Test: switch the character set and show that SHOW CREATE output is
# automatically converted to the new character_set_client. # automatically converted to the new character_set_client.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment