4143 kevin.lewis@stripped 2012-08-13
Bug#14320968 - Problems with innodb-multiple-tablespaces.test
There is one occurance of this test failing in the week since the fixe was pushed.
This change is just to the testcase. It stops using the control file aa.ibd
which was not important to the test. The aa.isl file was somehow removed
by InnoDB or was not created. Now the test uses a copy of a previous
tablespace, nolink.ibd, in order to create the needed 'wrong' tablespaces.
modified:
mysql-test/suite/innodb/r/innodb-multiple-tablespaces.result
mysql-test/suite/innodb/t/innodb-multiple-tablespaces.test
4142 Inaam Rana 2012-08-13
Bug#14175020 INCONSISTENT NAME FOR INNODB_MAX_IO_CAPACITY OPTION
rb://1185
approved by: Marko Makela
Rename innodb_max_io_capacity to innodb_io_capacity_max so that it is
alphabetically closer to innodb_io_capacity. Makes for better
documentation.
renamed:
mysql-test/suite/sys_vars/r/innodb_max_io_capacity_basic.result => mysql-test/suite/sys_vars/r/innodb_io_capacity_max_basic.result
mysql-test/suite/sys_vars/t/innodb_max_io_capacity_basic.test => mysql-test/suite/sys_vars/t/innodb_io_capacity_max_basic.test
modified:
mysql-test/suite/sys_vars/r/innodb_io_capacity_basic.result
mysql-test/suite/sys_vars/t/innodb_io_capacity_basic.test
storage/innobase/handler/ha_innodb.cc
mysql-test/suite/sys_vars/r/innodb_io_capacity_max_basic.result
mysql-test/suite/sys_vars/t/innodb_io_capacity_max_basic.test
=== modified file 'mysql-test/suite/innodb/r/innodb-multiple-tablespaces.result'
--- a/mysql-test/suite/innodb/r/innodb-multiple-tablespaces.result revid:inaam.rana@stripped
+++ b/mysql-test/suite/innodb/r/innodb-multiple-tablespaces.result revid:kevin.lewis@stripped
@@ -105,6 +105,7 @@ yyy.ibd
# WWW; Put the wrong file in all three locations
# NOLINK; Delete the ISL file Since remote location is still in SYS_DATAFILES,
# it should still be found. And the ISL file should be re-created.
+# Make a backup of this tablespace to use later.
---- MYSQLD_DATADIR/test
nnn.frm
nolink.frm
@@ -140,6 +141,7 @@ yyy.ibd
yyy.isl
---- MYSQL_TMP_DIR/alt_dir/test
nolink.ibd
+nolink.ibd.bak
nwy.ibd
nyw.ibd
nyy.ibd
@@ -308,6 +310,7 @@ yyy.ibd
yyy.isl
---- MYSQL_TMP_DIR/alt_dir/test
nolink.ibd
+nolink.ibd.bak
nwy.ibd
nyw.ibd
nyy.ibd
@@ -352,6 +355,7 @@ yny.ibd
yyn.ibd
yyy.ibd
---- MYSQL_TMP_DIR/alt_dir/test
+nolink.ibd.bak
nwy.ibd
nyy.ibd
www.ibd
@@ -370,6 +374,7 @@ yyy.ibd
#
---- MYSQLD_DATADIR/test
---- MYSQL_TMP_DIR/alt_dir/test
+nolink.ibd.bak
---- MYSQL_TMP_DIR/new_dir/test
#
# Create some tables again and this time, crash instead of shutdown
@@ -385,11 +390,10 @@ yyy.ibd
# SYS_DATAFILES is unavailable during recovery.
# Link File will refer to the file at alt_dir.
# In each case except the control tablespace, the Link file will
-# exist with a file name in alt_dir. 'aa' is the control table and
-# is alphabetically before the other tablespace names so it will be
-# recovered first by InnoDB. It is the source of the 'wrong' tablespaces.
+# exist with a file name in alt_dir. 'fnolink.ibd.bak' is the
+# source of the 'wrong' tablespaces.
+#
# Tablename Default_Tablespace Remote_Tablespace
-# aa Yes No
# ny Yes Yes
# wy Wrong Yes
# yn Yes No
@@ -398,8 +402,6 @@ yyy.ibd
#
set global innodb_file_per_table=on;
set global innodb_file_format='Barracuda';
-CREATE TABLE aa (c1 INT KEY, c2 TEXT) ENGINE=InnoDB;
-INSERT INTO aa VALUES (1, 'aa - control table');
CREATE TABLE ny (c1 INT KEY, c2 TEXT) ENGINE=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
INSERT INTO ny VALUES (1, 'ny');
CREATE TABLE wy (c1 INT KEY, c2 TEXT) ENGINE=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
@@ -414,16 +416,11 @@ INSERT INTO yy VALUES (1, 'yy');
# Crash the server, copy and remove files.
#
BEGIN;
-INSERT INTO aa VALUES (2, 'aa');
INSERT INTO ny VALUES (2, 'ny');
INSERT INTO wy VALUES (2, 'wy');
INSERT INTO yn VALUES (2, 'yn');
INSERT INTO yw VALUES (2, 'yw');
INSERT INTO yy VALUES (2, 'yy');
-SELECT * FROM aa;
-c1 c2
-1 aa - control table
-2 aa
SELECT * FROM ny;
c1 c2
1 ny
@@ -450,8 +447,6 @@ ERROR HY000: Lost connection to MySQL se
#
# Now that the engine is not running, move files around to test various scenarios.
#
-# AA; Control table, used as the source of 'wrong' tablespaces.
-# AA also has a link file which points to the file in the default datadir.
# NY; Tablespace found in alt_dir but not the default directory.
# WY; The wrong tablespace is found in the default directory
# and the correct one in alt_dir.
@@ -459,9 +454,6 @@ ERROR HY000: Lost connection to MySQL se
# YN; Tablespace found the default directory but not in alt_dir.
# YY; Found in both default directory and alt-dir.
---- MYSQLD_DATADIR/test
-aa.frm
-aa.ibd
-aa.isl
ny.frm
ny.isl
wy.frm
@@ -477,16 +469,15 @@ yy.frm
yy.ibd
yy.isl
---- MYSQL_TMP_DIR/alt_dir/test
+nolink.ibd.bak
ny.ibd
wy.ibd
yw.ibd
yy.ibd
#
# Start the server with innodb-force-recovery=1 so that it does not quit
-# when it finds multiple possible locations for aa, yy, wy and yw.
+# when it finds multiple possible locations for yy, wy and yw.
#
-SELECT * FROM aa;
-ERROR 42S02: Table 'test.aa' doesn't exist
SELECT * FROM ny;
c1 c2
1 ny
@@ -499,8 +490,6 @@ SELECT * FROM yw;
ERROR 42S02: Table 'test.yw' doesn't exist
SELECT * FROM yy;
ERROR 42S02: Table 'test.yy' doesn't exist
-SHOW CREATE TABLE aa;
-ERROR 42S02: Table 'test.aa' doesn't exist
SHOW CREATE TABLE ny;
Table Create Table
ny CREATE TABLE `ny` (
@@ -524,7 +513,6 @@ ERROR 42S02: Table 'test.yy' doesn't exi
SELECT path FROM information_schema.innodb_sys_datafiles
WHERE path LIKE '%test%' ORDER BY space;
path
-MYSQLD_DATADIR/test/aa.ibd
MYSQL_TMP_DIR/alt_dir/test/ny.ibd
MYSQL_TMP_DIR/alt_dir/test/wy.ibd
MYSQL_TMP_DIR/alt_dir/test/yn.ibd
@@ -534,10 +522,33 @@ MYSQL_TMP_DIR/alt_dir/test/yy.ibd
# Shutdown the server and remove extra tablespace files.
#
#
+# List of files before removing unused files
+#
+---- MYSQLD_DATADIR/test
+ny.frm
+ny.isl
+wy.frm
+wy.ibd
+wy.isl
+yn.frm
+yn.ibd
+yn.isl
+yw.frm
+yw.ibd
+yw.isl
+yy.frm
+yy.ibd
+yy.isl
+---- MYSQL_TMP_DIR/alt_dir/test
+nolink.ibd.bak
+ny.ibd
+wy.ibd
+yw.ibd
+yy.ibd
+#
# List of files before restart and DROP TABLES
#
---- MYSQLD_DATADIR/test
-aa.frm
ny.frm
wy.frm
yn.frm
@@ -547,7 +558,6 @@ yy.frm
#
# Start the server without using force_recover.
#
-DROP TABLE aa;
DROP TABLE ny;
DROP TABLE wy;
DROP TABLE yn;
=== modified file 'mysql-test/suite/innodb/t/innodb-multiple-tablespaces.test'
--- a/mysql-test/suite/innodb/t/innodb-multiple-tablespaces.test revid:inaam.rana@stripped
+++ b/mysql-test/suite/innodb/t/innodb-multiple-tablespaces.test revid:kevin.lewis@stripped
@@ -194,6 +194,9 @@ INSERT INTO nolink VALUES (1, 'no link f
--echo # it should still be found. And the ISL file should be re-created.
--remove_file $MYSQLD_DATADIR/test/nolink.isl
+--echo # Make a backup of this tablespace to use later.
+--copy_file $MYSQL_TMP_DIR/alt_dir/test/nolink.ibd $MYSQL_TMP_DIR/alt_dir/test/nolink.ibd.bak
+
--echo ---- MYSQLD_DATADIR/test
--list_files $MYSQLD_DATADIR/test
--echo ---- MYSQL_TMP_DIR/alt_dir/test
@@ -336,11 +339,10 @@ DROP TABLE nolink;
--echo # SYS_DATAFILES is unavailable during recovery.
--echo # Link File will refer to the file at alt_dir.
--echo # In each case except the control tablespace, the Link file will
---echo # exist with a file name in alt_dir. 'aa' is the control table and
---echo # is alphabetically before the other tablespace names so it will be
---echo # recovered first by InnoDB. It is the source of the 'wrong' tablespaces.
+--echo # exist with a file name in alt_dir. 'fnolink.ibd.bak' is the
+--echo # source of the 'wrong' tablespaces.
+--echo #
--echo # Tablename Default_Tablespace Remote_Tablespace
---echo # aa Yes No
--echo # ny Yes Yes
--echo # wy Wrong Yes
--echo # yn Yes No
@@ -352,10 +354,6 @@ set global innodb_file_per_table=on;
set global innodb_file_format='Barracuda';
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
-eval CREATE TABLE aa (c1 INT KEY, c2 TEXT) ENGINE=InnoDB;
-INSERT INTO aa VALUES (1, 'aa - control table');
-
---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
eval CREATE TABLE ny (c1 INT KEY, c2 TEXT) ENGINE=InnoDB $data_directory;
INSERT INTO ny VALUES (1, 'ny');
@@ -379,14 +377,12 @@ INSERT INTO yy VALUES (1, 'yy');
--echo # Crash the server, copy and remove files.
--echo #
BEGIN;
-INSERT INTO aa VALUES (2, 'aa');
INSERT INTO ny VALUES (2, 'ny');
INSERT INTO wy VALUES (2, 'wy');
INSERT INTO yn VALUES (2, 'yn');
INSERT INTO yw VALUES (2, 'yw');
INSERT INTO yy VALUES (2, 'yy');
-SELECT * FROM aa;
SELECT * FROM ny;
SELECT * FROM wy;
SELECT * FROM yn;
@@ -405,19 +401,16 @@ COMMIT;
--echo #
--echo # Now that the engine is not running, move files around to test various scenarios.
--echo #
---echo # AA; Control table, used as the source of 'wrong' tablespaces.
---echo # AA also has a link file which points to the file in the default datadir.
---exec echo $MYSQLD_DATADIR/test/aa.ibd > $MYSQLD_DATADIR/test/aa.isl
--echo # NY; Tablespace found in alt_dir but not the default directory.
--echo # WY; The wrong tablespace is found in the default directory
--echo # and the correct one in alt_dir.
---copy_file $MYSQLD_DATADIR/test/aa.ibd $MYSQLD_DATADIR/test/wy.ibd
+--copy_file $MYSQL_TMP_DIR/alt_dir/test/nolink.ibd.bak $MYSQLD_DATADIR/test/wy.ibd
--echo # YW; Tablespace is found in the default directory but the wrong file in alt_dir.
--move_file $MYSQL_TMP_DIR/alt_dir/test/yw.ibd $MYSQLD_DATADIR/test/yw.ibd
---copy_file $MYSQLD_DATADIR/test/aa.ibd $MYSQL_TMP_DIR/alt_dir/test/yw.ibd
+--copy_file $MYSQL_TMP_DIR/alt_dir/test/nolink.ibd.bak $MYSQL_TMP_DIR/alt_dir/test/yw.ibd
--echo # YN; Tablespace found the default directory but not in alt_dir.
--move_file $MYSQL_TMP_DIR/alt_dir/test/yn.ibd $MYSQLD_DATADIR/test/yn.ibd
@@ -432,15 +425,13 @@ COMMIT;
--echo #
--echo # Start the server with innodb-force-recovery=1 so that it does not quit
---echo # when it finds multiple possible locations for aa, yy, wy and yw.
+--echo # when it finds multiple possible locations for yy, wy and yw.
--echo #
--enable_reconnect
--exec echo "restart:--innodb-force-recovery=1" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--source include/wait_until_connected_again.inc
--disable_reconnect
---error ER_NO_SUCH_TABLE
-SELECT * FROM aa;
SELECT * FROM ny;
--error ER_NO_SUCH_TABLE
SELECT * FROM wy;
@@ -450,8 +441,6 @@ SELECT * FROM yw;
--error ER_NO_SUCH_TABLE
SELECT * FROM yy;
---error ER_NO_SUCH_TABLE
-SHOW CREATE TABLE aa;
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SHOW CREATE TABLE ny;
--error ER_NO_SUCH_TABLE
@@ -471,8 +460,15 @@ SELECT path FROM information_schema.inno
--echo #
--source include/shutdown_mysqld.inc
---remove_file $MYSQLD_DATADIR/test/aa.ibd
---remove_file $MYSQLD_DATADIR/test/aa.isl
+--echo #
+--echo # List of files before removing unused files
+--echo #
+
+--echo ---- MYSQLD_DATADIR/test
+--list_files $MYSQLD_DATADIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--list_files $MYSQL_TMP_DIR/alt_dir/test
+
--remove_file $MYSQLD_DATADIR/test/ny.isl
--remove_file $MYSQLD_DATADIR/test/wy.ibd
--remove_file $MYSQLD_DATADIR/test/wy.isl
@@ -483,6 +479,7 @@ SELECT path FROM information_schema.inno
--remove_file $MYSQLD_DATADIR/test/yy.ibd
--remove_file $MYSQLD_DATADIR/test/yy.isl
+--remove_file $MYSQL_TMP_DIR/alt_dir/test/nolink.ibd.bak
--remove_file $MYSQL_TMP_DIR/alt_dir/test/ny.ibd
--remove_file $MYSQL_TMP_DIR/alt_dir/test/wy.ibd
--remove_file $MYSQL_TMP_DIR/alt_dir/test/yw.ibd
@@ -502,7 +499,6 @@ SELECT path FROM information_schema.inno
--echo #
--source include/start_mysqld.inc
-DROP TABLE aa;
DROP TABLE ny;
DROP TABLE wy;
DROP TABLE yn;
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.6 branch (kevin.lewis:4142 to 4143) Bug#14320968 | kevin.lewis | 14 Aug |