| 1 |
SET GLOBAL innodb_file_per_table=ON; |
| 2 |
# |
| 3 |
# WL5980 Remote tablespace debug error injection tests. |
| 4 |
# |
| 5 |
CREATE TABLE t1 (a int KEY, b text) ENGINE=Innodb DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir' ; |
| 6 |
INSERT INTO t1 VALUES (1, "tablespace"); |
| 7 |
SELECT * FROM t1; |
| 8 |
a b |
| 9 |
1 tablespace |
| 10 |
# |
| 11 |
# Test the first injection point in fil_rename_tablespace(). |
| 12 |
# Make sure the table is useable after this failure. |
| 13 |
# |
| 14 |
SET SESSION debug="+d,fil_rename_tablespace_failure_1"; |
| 15 |
RENAME TABLE t1 TO t2; |
| 16 |
SET SESSION debug="-d,fil_rename_tablespace_failure_1"; |
| 17 |
INSERT INTO t1 VALUES (2, "tablespace"); |
| 18 |
SELECT * FROM t1; |
| 19 |
a b |
| 20 |
1 tablespace |
| 21 |
2 tablespace |
| 22 |
# |
| 23 |
# Test the second injection point in fil_rename_tablespace(). |
| 24 |
# Make sure the table is useable after this failure. |
| 25 |
# |
| 26 |
SET SESSION debug="+d,fil_rename_tablespace_failure_2"; |
| 27 |
RENAME TABLE t1 TO t2; |
| 28 |
SET SESSION debug="-d,fil_rename_tablespace_failure_2"; |
| 29 |
INSERT INTO t1 VALUES (3, "tablespace"); |
| 30 |
SELECT * FROM t1; |
| 31 |
a b |
| 32 |
1 tablespace |
| 33 |
2 tablespace |
| 34 |
3 tablespace |
| 35 |
# |
| 36 |
# Test the injection point in dict_table_rename_in_cache(). |
| 37 |
# Make sure the table is useable after this failure. |
| 38 |
# |
| 39 |
SET SESSION debug="+d,dict_table_rename_in_cache_failure"; |
| 40 |
RENAME TABLE t1 TO t2; |
| 41 |
SET SESSION debug="-d,dict_table_rename_in_cache_failure"; |
| 42 |
INSERT INTO t1 VALUES (4, "tablespace"); |
| 43 |
SELECT * FROM t1; |
| 44 |
a b |
| 45 |
1 tablespace |
| 46 |
2 tablespace |
| 47 |
3 tablespace |
| 48 |
4 tablespace |
| 49 |
# |
| 50 |
# Cleanup |
| 51 |
# |
| 52 |
DROP TABLE t1; |