Debian Codegraph @

mysql-test/suite/rpl_gtid/r/rpl_gtid_create_select.result

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6 # Setup schema common to master and slave.
7 [connection master]
8 CREATE TABLE t0 (f1 INT);
9 INSERT INTO t0 VALUES (1);
10 INSERT INTO t0 VALUES (2);
11 INSERT INTO t0 VALUES (3);
12 INSERT INTO t0 VALUES (4);
13 include/sync_slave_sql_with_master.inc
14 include/diff_tables.inc [master:t0, slave:t0]
15 # Stop the slave, so that we enable debug flag and apply binlog events
16 # after master generates binlog events for CREATE TABLE ... SELECT.
17 STOP SLAVE;
18 Warnings:
19 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
20 [connection master]
21 include/save_master_pos.inc
22 CREATE TABLE t1 AS SELECT * FROM t0;
23 FLUSH LOGS;
24 [connection slave]
25 # Crash slave server when applying row event (the INSERT)
26 SET global DEBUG='+d, crash_on_transactional_ddl_insert';
27 START SLAVE;
28 Warnings:
29 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
30 # Wait for server to stop
31 # Restart the server.
32 include/rpl_start_server.inc [server_number=2]
33 include/assert.inc [Make sure there is only table 't0' in schema 'test'.]
34 # Reset the master log position back to event that starts
35 # CREATE TABLE ... SELECT and start the slave, without causing crash.
36 SELECT @@GLOBAL.GTID_MODE;
37 @@GLOBAL.GTID_MODE
38 ON
39 include/start_slave.inc
40 # Sync master and slave events.
41 [connection master]
42 include/sync_slave_sql_with_master.inc
43 # Check that we have table 't1' now.
44 include/diff_tables.inc [master:t1, slave:t1]
45 # Cleanup
46 [connection master]
47 DROP TABLE t0,t1;
48 include/sync_slave_sql_with_master.inc
49 #
50 # R3 Verify that executing CREATE TABLE ... SELECT with sql mode set
51 # to ANSI gets replicated to slave. This test is added for Bug#33064062.
52 #
53 [connection master]
54 SET @orig_sql_mode_session= @@SESSION.sql_mode;
55 SET SESSION sql_mode='ANSI';
56 CREATE TABLE t1 AS SELECT 1;
57 include/sync_slave_sql_with_master.inc
58 include/diff_tables.inc [master:t1, slave:t1]
59 [connection master]
60 SET SESSION sql_mode= @orig_sql_mode_session;
61 DROP TABLE t1;
62 include/sync_slave_sql_with_master.inc
63 include/rpl_end.inc