| 1 |
--source include/have_innodb_max_16k.inc |
| 2 |
|
| 3 |
set global innodb_compression_level = 0; |
| 4 |
let MYSQLD_DATADIR =`SELECT @@datadir`; |
| 5 |
|
| 6 |
CREATE DATABASE d1; |
| 7 |
CREATE TABLE d1.t1 (f1 longblob) row_format=compressed; |
| 8 |
|
| 9 |
INSERT INTO d1.t1 VALUES (repeat('x', 11000000)); |
| 10 |
|
| 11 |
FLUSH TABLES d1.t1 FOR EXPORT; |
| 12 |
|
| 13 |
perl; |
| 14 |
require 'include/innodb-util.inc'; |
| 15 |
ib_backup_tablespaces("d1", "t1"); |
| 16 |
EOF |
| 17 |
|
| 18 |
UNLOCK TABLES; |
| 19 |
drop table d1.t1; |
| 20 |
|
| 21 |
CREATE TABLE d1.t1 (f1 longblob) row_format=compressed; |
| 22 |
ALTER TABLE d1.t1 DISCARD TABLESPACE; |
| 23 |
|
| 24 |
# Restore files |
| 25 |
perl; |
| 26 |
require 'include/innodb-util.inc'; |
| 27 |
ib_restore_tablespaces("d1", "t1"); |
| 28 |
EOF |
| 29 |
|
| 30 |
ALTER TABLE d1.t1 IMPORT TABLESPACE; |
| 31 |
|
| 32 |
drop table d1.t1; |
| 33 |
DROP DATABASE d1; |
| 34 |
|
| 35 |
perl; |
| 36 |
require 'include/innodb-util.inc'; |
| 37 |
ib_unlink_tablespace("d1", "t1"); |
| 38 |
EOF |
| 39 |
set global innodb_compression_level = default; |
| 40 |
|
| 41 |
# cleanup |
| 42 |
--remove_file $MYSQLTEST_VARDIR/tmp/t1.cfg |
| 43 |
--remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd |