Debian Codegraph @

mysql-test/suite/innodb/t/innodb-bug-14084530.test

raw
1
2 let MYSQLD_DATADIR =`SELECT @@datadir`;
3
4 SET AUTOCOMMIT = 0;
5
6 # Export/import on the same instance, with --innodb-file-per-table=1
7 CREATE DATABASE testdb_wl5522;
8 CREATE TABLE testdb_wl5522.t1 (c1 int ) engine = Innodb;
9
10 BEGIN;
11 INSERT INTO testdb_wl5522.t1 VALUES (1),(123),(331);
12 ROLLBACK;
13
14 SELECT c1 FROM testdb_wl5522.t1;
15
16 FLUSH TABLES testdb_wl5522.t1 FOR EXPORT;
17 perl;
18 require 'include/innodb-util.inc';
19 ib_backup_tablespaces("testdb_wl5522", "t1");
20 EOF
21 UNLOCK TABLES;
22
23 DROP TABLE testdb_wl5522.t1;
24
25 CREATE TABLE testdb_wl5522.t1 (c1 int ) ENGINE = Innodb;
26 ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE;
27
28 perl;
29 require 'include/innodb-util.inc';
30 ib_discard_tablespaces("testdb_wl5522", "t1");
31 ib_restore_tablespaces("testdb_wl5522", "t1");
32 EOF
33
34 ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE;
35 CHECK TABLE testdb_wl5522.t1;
36 SELECT c1 FROM testdb_wl5522.t1;
37
38 SET AUTOCOMMIT = 1;
39 DROP TABLE testdb_wl5522.t1;
40 DROP DATABASE testdb_wl5522;
41
42 # Cleanup
43 --remove_file $MYSQLTEST_VARDIR/tmp/t1.cfg
44 --remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd