| 1 |
# ************************************************************** |
| 2 |
# wl8307 : Check default_row_format functionality by cross |
| 3 |
# Replication Master (M) 5.7 and Slave (S) 5.6. But the |
| 4 |
# problem is that MTR does not support cross version. |
| 5 |
# Hence this testcase assumes slave version is 5.6 by |
| 6 |
# setting the Default_row_format=compact,which is same |
| 7 |
# in mysql-5.6. |
| 8 |
# case 1 : The main aim of this testcase is to check the DDL |
| 9 |
# failure on slave side, when user try to create a table |
| 10 |
# with index column size is greater than 767 bytes on |
| 11 |
# master which will (DDL) fail on slave side. |
| 12 |
# Master (M) : *.opt file no need to set as default is |
| 13 |
# row_format=Dynamic.(mysql-5.7). |
| 14 |
# Slave (S) : *.opt file will be set with default |
| 15 |
# row_format=Compact (mysql-5.6). |
| 16 |
# ************************************************************** |
| 17 |
--source include/not_group_replication_plugin.inc |
| 18 |
--source include/master-slave.inc |
| 19 |
# This test should not run with GTID=on |
| 20 |
|
| 21 |
# Set expected error nos on slave side |
| 22 |
connection slave; |
| 23 |
stop slave; |
| 24 |
SET GLOBAL SQL_REPLICA_SKIP_COUNTER=4; |
| 25 |
start slave; |
| 26 |
|
| 27 |
connection master; |
| 28 |
USE test; |
| 29 |
|
| 30 |
# Check Dynamic (default) |
| 31 |
SELECT @@innodb_default_row_format; |
| 32 |
|
| 33 |
# Create Index prefix greater than 767 bytes |
| 34 |
CREATE TABLE tab(a INT PRIMARY KEY, b VARCHAR(5000) CHARSET latin1, KEY idx1(b(3070))) |
| 35 |
ENGINE= InnoDB; |
| 36 |
|
| 37 |
# Insert a record |
| 38 |
INSERT INTO tab(a,b) VALUES(1,'Check with max prefix'); |
| 39 |
|
| 40 |
# Connect to slave |
| 41 |
--source include/sync_slave_sql_with_master.inc |
| 42 |
|
| 43 |
# Check Compact (default) |
| 44 |
SELECT @@innodb_default_row_format; |
| 45 |
|
| 46 |
# Check DDL should fail on slave |
| 47 |
--error ER_NO_SUCH_TABLE |
| 48 |
SHOW CREATE TABLE tab; |
| 49 |
|
| 50 |
# Cleanup |
| 51 |
connection master; |
| 52 |
DROP TABLE tab; |
| 53 |
|
| 54 |
# Before closing sync slave |
| 55 |
--source include/sync_slave_sql_with_master.inc |
| 56 |
|
| 57 |
--source include/rpl_end.inc |