| 1 |
# There are two variations of the test: |
| 2 |
# 1. Create multiple tables and preform test queries |
| 3 |
# 2. Create multiple tables, restart mysqld and perform test queries |
| 4 |
# 3. BUG 31215415 - shutdown right after trying to rebuild discarded partition |
| 5 |
# |
| 6 |
# Have a look at include/discarded_partition.inc for more details |
| 7 |
|
| 8 |
--echo # Testing discarded partitions without restart |
| 9 |
--let $discarded_partition_option = PREPARE |
| 10 |
--source suite/innodb/include/discarded_partition.inc |
| 11 |
|
| 12 |
--let $discarded_partition_option = SELECT_TEST |
| 13 |
--source suite/innodb/include/discarded_partition.inc |
| 14 |
|
| 15 |
--let $discarded_partition_option = REBUILD_PARTITION_TEST |
| 16 |
--source suite/innodb/include/discarded_partition.inc |
| 17 |
|
| 18 |
--let $discarded_partition_option = CREATE_SECONDARY_INDEX_TEST |
| 19 |
--source suite/innodb/include/discarded_partition.inc |
| 20 |
|
| 21 |
--let $discarded_partition_option = DROP_TEST |
| 22 |
--source suite/innodb/include/discarded_partition.inc |
| 23 |
|
| 24 |
|
| 25 |
--echo # Testing discarded partitions with restart |
| 26 |
--let $discarded_partition_option = PREPARE |
| 27 |
--source suite/innodb/include/discarded_partition.inc |
| 28 |
|
| 29 |
--source include/restart_mysqld.inc |
| 30 |
--let $discarded_partition_option = SELECT_TEST |
| 31 |
--source suite/innodb/include/discarded_partition.inc |
| 32 |
|
| 33 |
--let $discarded_partition_option = REBUILD_PARTITION_TEST |
| 34 |
--source suite/innodb/include/discarded_partition.inc |
| 35 |
|
| 36 |
--let $discarded_partition_option = CREATE_SECONDARY_INDEX_TEST |
| 37 |
--source suite/innodb/include/discarded_partition.inc |
| 38 |
|
| 39 |
--let $discarded_partition_option = DROP_TEST |
| 40 |
--source suite/innodb/include/discarded_partition.inc |
| 41 |
|
| 42 |
--echo # Test shutdown just after rebuild partition |
| 43 |
--let $discarded_partition_option = PREPARE |
| 44 |
--source suite/innodb/include/discarded_partition.inc |
| 45 |
|
| 46 |
--error ER_TABLESPACE_DISCARDED |
| 47 |
ALTER TABLE partitions.t1 REBUILD PARTITION p0; |
| 48 |
|
| 49 |
--source include/restart_mysqld.inc |
| 50 |
|
| 51 |
--let $discarded_partition_option = DROP_TEST |
| 52 |
--source suite/innodb/include/discarded_partition.inc |
| 53 |
|
| 54 |
|
| 55 |
--disable_query_log |
| 56 |
call mtr.add_suppression("\\[Warning\\].* Tablespace .*, name '.*', file '.*' is missing"); |
| 57 |
call mtr.add_suppression("\\[Warning\\].* Tablespace for table `.*`\\.`.*` /\\* Partition `.*` \\*/ is set as discarded"); |
| 58 |
call mtr.add_suppression("\\[Warning\\].* Cannot calculate statistics for table `.*`.`.*` /\\* Partition `.*` \\*/ because the \\.ibd file is missing\\. Please refer to http://dev\\.mysql\\.com/doc/refman/8.0/en/innodb-troubleshooting\\.html for how to resolve the issue"); |
| 59 |
--enable_query_log |
| 60 |
|