| 1 |
# |
| 2 |
# Bug#30591967 BACKUP FAILS WITH "CANNOT STORE RESULT" ERROR |
| 3 |
# WHEN DDL EXECUTED IN PARALLEL |
| 4 |
# |
| 5 |
# |
| 6 |
# Case 1 : Using non-partitioned table. |
| 7 |
# |
| 8 |
CREATE DATABASE db1; |
| 9 |
CREATE TABLE db1.t1 (f1 INT) ENGINE='InnoDB'; |
| 10 |
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLES WHERE name like 'db1/t1'; |
| 11 |
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE INSTANT_COLS TOTAL_ROW_VERSIONS INITIAL_COLUMN_COUNTS CURRENT_COLUMN_COUNTS TOTAL_COLUMN_COUNTS |
| 12 |
# db1/t1 33 4 # Dynamic 0 Single 0 0 1 1 1 |
| 13 |
# Evict db1.t1 from innodb cache by restarting the server. |
| 14 |
# restart |
| 15 |
# Wait after acquiring table object, but before schema object is acquired. |
| 16 |
SET GLOBAL DEBUG= '+d,before_acquire_schema_by_private_id'; |
| 17 |
SET DEBUG_SYNC="wait_before_acquire_schema_by_private_id SIGNAL cond1 WAIT_FOR cond2"; |
| 18 |
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLES WHERE name = 'db1/t1';; |
| 19 |
# Drop the schema db1 in other session. |
| 20 |
SET DEBUG_SYNC= 'now WAIT_FOR cond1'; |
| 21 |
DROP DATABASE db1; |
| 22 |
SET DEBUG_SYNC= 'now SIGNAL cond2'; |
| 23 |
# Continue acquiring db1. reap results |
| 24 |
# in a error ER_BAD_DB_ERROR without fix. |
| 25 |
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE INSTANT_COLS TOTAL_ROW_VERSIONS INITIAL_COLUMN_COUNTS CURRENT_COLUMN_COUNTS TOTAL_COLUMN_COUNTS |
| 26 |
# Cleanup |
| 27 |
SET DEBUG_SYNC= 'RESET'; |
| 28 |
SET GLOBAL DEBUG= DEFAULT; |
| 29 |
# |
| 30 |
# Case 2 : Using partitioned table. |
| 31 |
# |
| 32 |
CREATE DATABASE db1; |
| 33 |
CREATE TABLE db1.t1 (a INT NOT NULL, b INT NOT NULL) |
| 34 |
PARTITION BY KEY (a) PARTITIONS 1; |
| 35 |
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLES WHERE name like 'db1/t1#p#p0'; |
| 36 |
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE INSTANT_COLS TOTAL_ROW_VERSIONS INITIAL_COLUMN_COUNTS CURRENT_COLUMN_COUNTS TOTAL_COLUMN_COUNTS |
| 37 |
# db1/t1#p#p0 33 5 # Dynamic 0 Single 0 0 2 2 2 |
| 38 |
# Evict db1.t1 from innodb cache by restarting the server. |
| 39 |
# restart |
| 40 |
# Wait after acquiring table object, but before schema object is acquired. |
| 41 |
SET GLOBAL DEBUG= '+d,before_acquire_schema_by_private_id'; |
| 42 |
SET DEBUG_SYNC="wait_before_acquire_schema_by_private_id SIGNAL cond1 WAIT_FOR cond2"; |
| 43 |
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLES WHERE name = 'db1/t1#p#p0';; |
| 44 |
# Drop the schema db1 in other session. |
| 45 |
SET DEBUG_SYNC= 'now WAIT_FOR cond1'; |
| 46 |
DROP DATABASE db1; |
| 47 |
SET DEBUG_SYNC= 'now SIGNAL cond2'; |
| 48 |
# Continue acquiring db1. reap results |
| 49 |
# in a error ER_BAD_DB_ERROR without fix. |
| 50 |
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE INSTANT_COLS TOTAL_ROW_VERSIONS INITIAL_COLUMN_COUNTS CURRENT_COLUMN_COUNTS TOTAL_COLUMN_COUNTS |
| 51 |
# Cleanup |
| 52 |
SET DEBUG_SYNC= 'RESET'; |
| 53 |
SET GLOBAL DEBUG= DEFAULT; |