Debian Codegraph @

mysql-test/suite/galera/t/galera_forced_binlog_format.test

raw
1 #
2 # Test that wsrep_forced_binlog_format=ROW indeed prevents the log to be switched to STATEMENT format on a per-connection basis
3 #
4
5 --source include/have_log_bin.inc
6 --source include/have_innodb.inc
7 --source include/galera_cluster.inc
8
9 --connection node_1
10 SET GLOBAL wsrep_on=OFF;
11 RESET MASTER;
12 SET GLOBAL wsrep_on=ON;
13 FLUSH BINARY LOGS;
14
15 --disable_warnings
16 SET SESSION binlog_format = 'STATEMENT';
17 --enable_warnings
18
19 CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
20 INSERT INTO t1 VALUES (1);
21
22 --disable_warnings
23 SET SESSION binlog_format = 'MIXED';
24 --enable_warnings
25
26 INSERT INTO t1 VALUES (2);
27
28 --replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
29 --replace_column 2 <Pos> 5 <End_log_pos>
30 SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
31
32 DROP TABLE t1;
33
34 --echo #
35 --echo # MDEV-9401: wsrep_forced_binlog_format with binlog causes crash
36 --echo #
37 SET SESSION binlog_format = 'ROW';
38 CREATE DATABASE testdb_9401;
39 USE testdb_9401;
40 CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
41 CREATE USER dummy@localhost;
42 GRANT ALL PRIVILEGES ON testdb_9401.t1 TO dummy@localhost;
43 FLUSH PRIVILEGES;
44 SHOW GRANTS FOR dummy@localhost;
45 # Cleanup
46 REVOKE ALL PRIVILEGES, GRANT OPTION FROM dummy@localhost;
47 DROP USER dummy@localhost;
48 DROP DATABASE testdb_9401;
49
50 #--source include/galera_end.inc
51 --echo # End of tests