File: rpl_set_statement.test

package info (click to toggle)
mariadb 1%3A11.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 772,520 kB
  • sloc: ansic: 2,414,714; cpp: 1,791,394; asm: 381,336; perl: 62,905; sh: 49,647; pascal: 40,897; java: 39,363; python: 20,791; yacc: 20,432; sql: 17,907; xml: 12,344; ruby: 8,544; cs: 6,542; makefile: 6,145; ada: 1,879; lex: 1,193; javascript: 996; objc: 80; tcl: 73; awk: 46; php: 22
file content (61 lines) | stat: -rw-r--r-- 1,780 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
--source include/master-slave.inc
--source include/have_binlog_format_statement.inc
set sql_mode="";
connection slave;
set sql_mode="";
connection master;

--disable_warnings
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
--enable_warnings

call mtr.add_suppression("Unsafe statement written to the binary log*");
CREATE TABLE t1 (a bigint unsigned not null);
CREATE TABLE t2 (a char(255) not null);

--echo
--echo There are the following types of variables:
--echo 1) variables that are NOT replicated correctly when using STATEMENT mode;
--echo

--let $rpl_ssvt_var_name=max_join_size
--let $rpl_ssvt_var_value=2
--let $rpl_ssvt_table=t1
--source suite/rpl/include/rpl_set_statement.inc

--echo 
--echo 2) variables thar ARE replicated correctly 
--echo They must be replicated correctly with "SET STATEMENT" too.
--echo 
--let $rpl_ssvt_var_name=auto_increment_increment
--let $rpl_ssvt_var_value=10
--let $rpl_ssvt_table=t1
--source suite/rpl/include/rpl_set_statement.inc

--echo
--echo 3) sql_mode which is replicated correctly exept NO_DIR_IN_CREATE value;
--echo
--let $rpl_ssvt_var_name=sql_mode
--let $rpl_ssvt_var_value='ERROR_FOR_DIVISION_BY_ZERO'
--let $rpl_ssvt_table=t2
--source suite/rpl/include/rpl_set_statement.inc
--let $rpl_ssvt_var_name=sql_mode
--let $rpl_ssvt_var_value='NO_DIR_IN_CREATE'
--let $rpl_ssvt_table=t2
--source suite/rpl/include/rpl_set_statement.inc

--echo
--echo 4) variables that are not replicated at all:
--echo default_storage_engine, storage_engine, max_heap_table_size
--echo
--let $rpl_ssvt_var_name=max_heap_table_size
--let $rpl_ssvt_var_value=16384
--let $rpl_ssvt_table=t1
--source suite/rpl/include/rpl_set_statement.inc

connection master;
DROP TABLE t1;
DROP TABLE t2;
sync_slave_with_master;
source include/stop_slave.inc;