Debian Codegraph @

mysql-test/suite/rpl/r/rpl_old_master_29078.result

raw
1 #
2 # MDEV-29078 For old binary logs explicit_defaults_for_timestamp presumed to be OFF, server value ignored
3 #
4 include/master-slave.inc
5 [connection master]
6 connection slave;
7 include/stop_slave.inc
8 connection master;
9 flush binary logs;
10 create table t2 (a timestamp);
11 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
12 /*!40019 SET @@session.max_delayed_threads=0*/;
13 /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
14 DELIMITER /*!*/;
15 ROLLBACK/*!*/;
16 use `test`/*!*/;
17 SET TIMESTAMP=1658586280/*!*/;
18 SET @@session.pseudo_thread_id=999999999/*!*/;
19 SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.system_versioning_insert_history=0/*!*/;
20 SET @@session.sql_mode=1411383296/*!*/;
21 SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
22 /*!\C utf8mb3 *//*!*/;
23 SET @@session.character_set_client=utf8mb3,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
24 SET @@session.lc_time_names=0/*!*/;
25 SET @@session.collation_database=DEFAULT/*!*/;
26 create table t1 (f1 timestamp, f2 timestamp)
27 /*!*/;
28 START TRANSACTION
29 /*!*/;
30 SET TIMESTAMP=1658586288/*!*/;
31 insert t1 values (NULL, NULL)
32 /*!*/;
33 SET TIMESTAMP=1658586288/*!*/;
34 COMMIT
35 /*!*/;
36 START TRANSACTION
37 /*!*/;
38 SET TIMESTAMP=1658586335/*!*/;
39 insert t1 () values ()
40 /*!*/;
41 SET TIMESTAMP=1658586335/*!*/;
42 COMMIT
43 /*!*/;
44 DELIMITER ;
45 # End of log file
46 ROLLBACK /* added by mysqlbinlog */;
47 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
48 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
49 connection slave;
50 set global explicit_defaults_for_timestamp=0;
51 Warnings:
52 Warning 1287 'explicit_defaults_for_timestamp=0' is deprecated and will be removed in a future release
53 include/reset_slave.inc
54 include/start_slave.inc
55 show create table t1;
56 Table Create Table
57 t1 CREATE TABLE `t1` (
58 `f1` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
59 `f2` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
60 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
61 show create table t2;
62 Table Create Table
63 t2 CREATE TABLE `t2` (
64 `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
65 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
66 set time_zone='+2:00';
67 select * from t1;
68 f1 f2
69 2022-07-23 16:24:48 2022-07-23 16:24:48
70 2022-07-23 16:25:35 0000-00-00 00:00:00
71 drop table t1;
72 include/stop_slave.inc
73 set global explicit_defaults_for_timestamp=1;
74 include/reset_slave.inc
75 Warnings:
76 Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
77 include/start_slave.inc
78 show create table t1;
79 Table Create Table
80 t1 CREATE TABLE `t1` (
81 `f1` timestamp NULL DEFAULT NULL,
82 `f2` timestamp NULL DEFAULT NULL
83 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
84 show create table t2;
85 Table Create Table
86 t2 CREATE TABLE `t2` (
87 `a` timestamp NULL DEFAULT NULL
88 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
89 select * from t1;
90 f1 f2
91 NULL NULL
92 NULL NULL
93 drop table t1;
94 connection master;
95 drop table t2;
96 include/rpl_end.inc