| 1 |
# Test clone with concurrent encryption DDL |
| 2 |
--source include/have_debug_sync.inc |
| 3 |
--source include/big_test.inc |
| 4 |
|
| 5 |
--source include/have_innodb_max_16k.inc |
| 6 |
--source ../include/encrypt_begin.inc |
| 7 |
|
| 8 |
--replace_result $CLONE_PLUGIN CLONE_PLUGIN |
| 9 |
--eval INSTALL PLUGIN clone SONAME '$CLONE_PLUGIN' |
| 10 |
|
| 11 |
--let $ddl_no_table = 1 |
| 12 |
--let $ddl_encryption = 1 |
| 13 |
|
| 14 |
--let $encryption_enable = ENCRYPTION = "Y" |
| 15 |
--let $encryption_disable = ENCRYPTION = "N" |
| 16 |
|
| 17 |
if ($ddl_compress) { |
| 18 |
--let $compression_enable = COMPRESSION = "LZ4" |
| 19 |
--let $compression_disable = COMPRESSION = "None" |
| 20 |
if ($ddl_no_encrypt) { |
| 21 |
--let $encryption_enable = |
| 22 |
--let $encryption_disable = |
| 23 |
} |
| 24 |
} |
| 25 |
|
| 26 |
--source ../include/create_ddl_schema.inc |
| 27 |
|
| 28 |
--let $dml_stmt_check = call execute_dml(1, 0, 100, 100, 10, 0) |
| 29 |
|
| 30 |
--echo # 1. CREATE TABLE with encryption while clone in progress |
| 31 |
--let $ddl_op1 = CREATE TABLE |
| 32 |
--let $ddl_stmt1 = (col1 INT PRIMARY KEY, col2 int, col3 varchar(64), col4 BLOB) |
| 33 |
--let $ddl_post1 = $encryption_enable $compression_enable |
| 34 |
|
| 35 |
--let $dml_stmt1 = INSERT INTO t1 SELECT * FROM t |
| 36 |
--let $dml_stmt11 = INSERT INTO t11 SELECT * FROM t |
| 37 |
|
| 38 |
--let $dml_stmt2 = CALL execute_dml(0, 0, 100, 100, 10, 0) |
| 39 |
--let $dml_stmt21 = INSERT INTO t21 SELECT * FROM t |
| 40 |
|
| 41 |
--source ../include/ddl_common.inc |
| 42 |
|
| 43 |
--echo # 2. ALTER TABLE remove encryption while clone in progress |
| 44 |
--let $ddl_op1 = ALTER TABLE |
| 45 |
--let $ddl_stmt1 = $encryption_disable $compression_disable |
| 46 |
--let $ddl_post1 = |
| 47 |
|
| 48 |
--let $dml_stmt1 = call execute_dml(1, 0, 100, 100, 10, 0) |
| 49 |
--let $dml_stmt11 = INSERT INTO t11 SELECT * FROM t ON DUPLICATE KEY UPDATE col2 = t11.col2 + 1; |
| 50 |
--let $dml_stmt2 = call execute_dml(1, 0, 100, 100, 10, 0) |
| 51 |
--let $dml_stmt21 = INSERT INTO t21 SELECT * FROM t ON DUPLICATE KEY UPDATE col2 = t21.col2 + 1; |
| 52 |
|
| 53 |
--source ../include/ddl_common.inc |
| 54 |
|
| 55 |
--echo # 3. ALTER TABLE add encryption while clone in progress |
| 56 |
--let $ddl_op1 = ALTER TABLE |
| 57 |
--let $ddl_stmt1 = $encryption_enable $compression_enable |
| 58 |
--let $ddl_post1 = |
| 59 |
|
| 60 |
--let $dml_stmt1 = call execute_dml(1, 0, 100, 100, 10, 0) |
| 61 |
--let $dml_stmt11 = INSERT INTO t11 SELECT * FROM t ON DUPLICATE KEY UPDATE col2 = t11.col2 + 1; |
| 62 |
--let $dml_stmt2 = call execute_dml(1, 0, 100, 100, 10, 0) |
| 63 |
--let $dml_stmt21 = INSERT INTO t21 SELECT * FROM t ON DUPLICATE KEY UPDATE col2 = t21.col2 + 1; |
| 64 |
|
| 65 |
--source ../include/ddl_common.inc |
| 66 |
|
| 67 |
--echo # 2. DROP TABLE while clone in progress |
| 68 |
--let $ddl_op1 = DROP TABLE |
| 69 |
--let $ddl_stmt1 = |
| 70 |
--let $ddl_post1 = |
| 71 |
|
| 72 |
--let $dml_stmt1 = SHOW TABLES |
| 73 |
--let $dml_stmt11 = SHOW TABLES |
| 74 |
|
| 75 |
--let $dml_stmt2 = SHOW TABLES |
| 76 |
--let $dml_stmt21 = SHOW TABLES |
| 77 |
|
| 78 |
--let $ddl_skip_check = 1 |
| 79 |
|
| 80 |
--source ../include/ddl_common.inc |
| 81 |
|
| 82 |
--echo # Cleanup |
| 83 |
--let $ddl_drop_schema_tables = 1 |
| 84 |
--let $ddl_recreate_schema_tables = 1 |
| 85 |
--source ../include/drop_ddl_schema.inc |
| 86 |
|
| 87 |
--echo # Uninstall clone |
| 88 |
UNINSTALL PLUGIN clone; |
| 89 |
|
| 90 |
--source ../include/encrypt_end.inc |