Debian Codegraph @

mysql-test/suite/rpl_nogtid/r/rpl_nogtid_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 OFF
39 CHANGE REPLICATION SOURCE TO SOURCE_LOG_FILE='master-bin.000001', SOURCE_LOG_POS=SAVED_POS;
40 include/start_slave.inc
41 # Sync master and slave events.
42 [connection master]
43 include/sync_slave_sql_with_master.inc
44 # Check that we have table 't1' now.
45 include/diff_tables.inc [master:t1, slave:t1]
46 # Cleanup
47 [connection master]
48 DROP TABLE t0,t1;
49 include/sync_slave_sql_with_master.inc
50 #
51 # R3 Verify that executing CREATE TABLE ... SELECT with sql mode set
52 # to ANSI gets replicated to slave. This test is added for Bug#33064062.
53 #
54 [connection master]
55 SET @orig_sql_mode_session= @@SESSION.sql_mode;
56 SET SESSION sql_mode='ANSI';
57 CREATE TABLE t1 AS SELECT 1;
58 include/sync_slave_sql_with_master.inc
59 include/diff_tables.inc [master:t1, slave:t1]
60 [connection master]
61 SET SESSION sql_mode= @orig_sql_mode_session;
62 DROP TABLE t1;
63 include/sync_slave_sql_with_master.inc
64 include/rpl_end.inc