Debian Codegraph @

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

raw
1 include/master-slave.inc
2 [connection master]
3 # Initialize
4 connection slave;
5 ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
6 # Setup data
7 connection master;
8 CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=InnoDB;
9 CREATE TABLE ta (a int);
10 include/save_master_gtid.inc
11 connection slave;
12 include/sync_with_master_gtid.inc
13 connection master;
14 SET sql_log_bin=0;
15 CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
16 RETURNS INT DETERMINISTIC
17 BEGIN
18 RETURN x;
19 END
20 ||
21 SET sql_log_bin=1;
22 connection slave;
23 SET sql_log_bin=0;
24 CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
25 RETURNS INT DETERMINISTIC
26 BEGIN
27 IF d1 != '' THEN
28 SET debug_sync = d1;
29 END IF;
30 IF d2 != '' THEN
31 SET debug_sync = d2;
32 END IF;
33 RETURN x;
34 END
35 ||
36 SET sql_log_bin=1;
37 include/stop_slave.inc
38 SET @old_parallel_threads =@@GLOBAL.slave_parallel_threads;
39 SET @old_parallel_mode =@@GLOBAL.slave_parallel_mode;
40 SET @old_gtid_strict_mode =@@GLOBAL.gtid_strict_mode;
41 SET GLOBAL slave_parallel_threads=10;
42 SET GLOBAL slave_parallel_mode=conservative;
43 SET GLOBAL gtid_strict_mode=ON;
44 include/start_slave.inc
45 connection master;
46 SET @old_format= @@SESSION.binlog_format;
47 SET binlog_format=statement;
48 INSERT INTO t1 VALUES (foo(1, 'rpl_parallel_after_mark_start_commit WAIT_FOR sig_go', ''));
49 ANALYZE TABLE ta;
50 Table Op Msg_type Msg_text
51 test.ta analyze status Engine-independent statistics collected
52 test.ta analyze status Table is already up to date
53 include/save_master_gtid.inc
54 connection slave;
55 SELECT info FROM information_schema.processlist WHERE state = "Waiting for prior transaction to commit";
56 info
57 ANALYZE TABLE ta
58 set @@debug_sync="now signal sig_go";
59 include/sync_with_master_gtid.inc
60 # Cleanup
61 connection master;
62 DROP TABLE t1,ta;
63 connection slave;
64 SET DEBUG_SYNC='RESET';
65 connection master;
66 SET DEBUG_SYNC='RESET';
67 DROP FUNCTION foo;
68 include/save_master_gtid.inc
69 connection slave;
70 include/sync_with_master_gtid.inc
71 include/stop_slave.inc
72 SET @@GLOBAL.slave_parallel_threads=@old_parallel_threads;
73 SET @@GLOBAL.slave_parallel_mode =@old_parallel_mode;
74 SET @@GLOBAL.gtid_strict_mode =@old_gtid_strict_mode;
75 include/start_slave.inc
76 include/rpl_end.inc