Current Path : /home/usr.opt/mysql57/mysql-test/suite/innodb/t/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/suite/innodb/t/create_tablespace_64k.test |
# # WL#6205 - A series of tests to show the correct behavior for # CREATE TABLESPACE and associated SQL statements for 64k page size. # --source include/have_innodb.inc --source include/have_innodb_64k.inc --source include/not_embedded.inc --echo # --echo # CREATE TABLESPACE related tests for 32k page sizes. --echo # SET DEFAULT_STORAGE_ENGINE=InnoDB; LET $MYSQLD_DATADIR = `select @@datadir`; LET $INNODB_PAGE_SIZE = `select @@innodb_page_size`; --echo # Strict-mode has no effect on CREATE TABLESPACE. But it does affect --echo # whether an invalid KEY_BLOCK_SIZE is rejected or adjusted. SHOW VARIABLES LIKE 'innodb_strict_mode'; SHOW VARIABLES LIKE 'innodb_file_per_table'; --echo # --echo # Create a tablespace with compressed page sizes that can match --echo # innodb-page-size. --echo # --error ER_ILLEGAL_HA_CREATE_OPTION CREATE TABLESPACE s_1k ADD DATAFILE 's_1k.ibd' FILE_BLOCK_SIZE=1k; SHOW WARNINGS; --error ER_ILLEGAL_HA_CREATE_OPTION CREATE TABLESPACE s_2k ADD DATAFILE 's_2k.ibd' FILE_BLOCK_SIZE=2k; SHOW WARNINGS; --error ER_ILLEGAL_HA_CREATE_OPTION CREATE TABLESPACE s_4k ADD DATAFILE 's_4k.ibd' FILE_BLOCK_SIZE=4k; SHOW WARNINGS; --error ER_ILLEGAL_HA_CREATE_OPTION CREATE TABLESPACE s_8k ADD DATAFILE 's_8k.ibd' FILE_BLOCK_SIZE=8k; SHOW WARNINGS; --error ER_ILLEGAL_HA_CREATE_OPTION CREATE TABLESPACE s_16k ADD DATAFILE 's_16k.ibd' FILE_BLOCK_SIZE=16k; SHOW WARNINGS; --error ER_ILLEGAL_HA_CREATE_OPTION CREATE TABLESPACE s_32k ADD DATAFILE 's_32k.ibd' FILE_BLOCK_SIZE=32k; SHOW WARNINGS; CREATE TABLESPACE s_64k ADD DATAFILE 's_64k.ibd' FILE_BLOCK_SIZE=64k; --source suite/innodb/include/show_i_s_tablespaces.inc --echo # --echo # Add tables to the tablespaces. --echo # --error ER_ILLEGAL_HA_CREATE_OPTION CREATE TABLE t_zip1k_in_64k (a int, b text) ROW_FORMAT=Compressed KEY_BLOCK_SIZE=1 TABLESPACE s_64k; SHOW WARNINGS; --error ER_ILLEGAL_HA_CREATE_OPTION CREATE TABLE t_zip2k_in_64k (a int, b text) ROW_FORMAT=Compressed KEY_BLOCK_SIZE=2 TABLESPACE s_64k; SHOW WARNINGS; --error ER_ILLEGAL_HA_CREATE_OPTION CREATE TABLE t_zip4k_in_64k (a int, b text) ROW_FORMAT=Compressed KEY_BLOCK_SIZE=4 TABLESPACE s_64k; SHOW WARNINGS; --error ER_ILLEGAL_HA_CREATE_OPTION CREATE TABLE t_zip8k_in_64k (a int, b text) ROW_FORMAT=Compressed KEY_BLOCK_SIZE=8 TABLESPACE s_64k; SHOW WARNINGS; --error ER_ILLEGAL_HA_CREATE_OPTION CREATE TABLE t_zip16k_in_64k (a int, b text) ROW_FORMAT=Compressed KEY_BLOCK_SIZE=16 TABLESPACE s_64k; SHOW WARNINGS; --error ER_ILLEGAL_HA_CREATE_OPTION CREATE TABLE t_zip32k_in_64k (a int, b text) ROW_FORMAT=Compressed KEY_BLOCK_SIZE=32 TABLESPACE s_64k; SHOW WARNINGS; --error ER_ILLEGAL_HA_CREATE_OPTION CREATE TABLE t_zip64k_in_64k (a int, b text) ROW_FORMAT=Compressed KEY_BLOCK_SIZE=32 TABLESPACE s_64k; SHOW WARNINGS; CREATE TABLE t_red_in_64k (a int, b text) ROW_FORMAT=redundant TABLESPACE s_64k; CREATE TABLE t_com_in_64k (a int, b text) ROW_FORMAT=compact TABLESPACE s_64k; CREATE TABLE t_dyn_in_64k (a int, b text) ROW_FORMAT=dynamic TABLESPACE s_64k; --echo # Add data to the existing Tables INSERT INTO t_red_in_64k VALUES (1,'a'),(2,'b'),(3,'c'); INSERT INTO t_com_in_64k VALUES (1,'a'),(2,'b'),(3,'c'); INSERT INTO t_dyn_in_64k VALUES (1,'a'),(2,'b'),(3,'c'); --echo # Restart mysqld --source include/restart_mysqld.inc --echo # --echo # Try to drop a tablespace which is not empty --echo # --error ER_DROP_FILEGROUP_FAILED DROP TABLESPACE s_64k; SHOW WARNINGS; --echo # --echo # Add more data to the existing Tables --echo # INSERT INTO t_red_in_64k VALUES (4,'d'); INSERT INTO t_com_in_64k VALUES (4,'d'); INSERT INTO t_dyn_in_64k VALUES (4,'d'); --echo # --echo # Restart the server and make sure that everything is OK. --echo # --source include/restart_mysqld.inc --source suite/innodb/include/show_i_s_tablespaces.inc --source suite/innodb/include/show_i_s_tables.inc --echo # Directory of MYSQLD_DATADIR/ --list_files $MYSQLD_DATADIR/ *.ibd --echo # Directory of MYSQLD_DATADIR/test/ --list_files $MYSQLD_DATADIR/test/ *.ibd --echo # --echo # Clean-up. --echo # CHECK TABLE t_red_in_64k; CHECK TABLE t_com_in_64k; CHECK TABLE t_dyn_in_64k; DROP TABLE t_red_in_64k; DROP TABLE t_com_in_64k; DROP TABLE t_dyn_in_64k; DROP TABLESPACE s_64k;