Debian Codegraph @

mysql-test/suite/rpl/t/rpl_sql_require_primary_key.test

raw
1 # This test case is binary log format agnostic
2 --source include/have_binlog_format_row.inc
3 --source include/master-slave.inc
4
5 #
6 # Testing replication of sql_require_primary_key system variable
7 # (WL#11807)
8 #
9
10 # Create a table without pk on master
11 CREATE TABLE t1 (c1 INT, c2 TEXT);
12 --source include/sync_slave_sql_with_master.inc
13
14 # Assert that table was replicated to the slave
15 SHOW CREATE TABLE t1;
16
17 # Client session on slave shall fail to create pk less table by default
18 --error ER_TABLE_WITHOUT_PK
19 CREATE TABLE t2 (c1 INT, c2 TEXT);
20
21
22 --source include/rpl_connection_master.inc
23
24 # Cleanup
25 DROP TABLE t1;
26 --source include/rpl_end.inc