Server IP : 172.67.216.182 / Your IP : 104.23.175.105 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/mysql-test/suite/innodb/r/ |
Upload File : |
# # CREATE TABLESPACE related tests for 32k page sizes. # SET DEFAULT_STORAGE_ENGINE=InnoDB; # Strict-mode has no effect on CREATE TABLESPACE. But it does affect # whether an invalid KEY_BLOCK_SIZE is rejected or adjusted. SHOW VARIABLES LIKE 'innodb_strict_mode'; Variable_name Value innodb_strict_mode ON SHOW VARIABLES LIKE 'innodb_file_per_table'; Variable_name Value innodb_file_per_table ON # # Create a tablespace with compressed page sizes that can match # innodb-page-size. # CREATE TABLESPACE s_1k ADD DATAFILE 's_1k.ibd' FILE_BLOCK_SIZE=1k; ERROR HY000: InnoDB: Cannot create a COMPRESSED tablespace when innodb_page_size > 16k. SHOW WARNINGS; Level Code Message Error 1478 InnoDB: Cannot create a COMPRESSED tablespace when innodb_page_size > 16k. Error 1528 Failed to create TABLESPACE s_1k Error 1031 Table storage engine for 's_1k' doesn't have this option CREATE TABLESPACE s_2k ADD DATAFILE 's_2k.ibd' FILE_BLOCK_SIZE=2k; ERROR HY000: InnoDB: Cannot create a COMPRESSED tablespace when innodb_page_size > 16k. SHOW WARNINGS; Level Code Message Error 1478 InnoDB: Cannot create a COMPRESSED tablespace when innodb_page_size > 16k. Error 1528 Failed to create TABLESPACE s_2k Error 1031 Table storage engine for 's_2k' doesn't have this option CREATE TABLESPACE s_4k ADD DATAFILE 's_4k.ibd' FILE_BLOCK_SIZE=4k; ERROR HY000: InnoDB: Cannot create a COMPRESSED tablespace when innodb_page_size > 16k. SHOW WARNINGS; Level Code Message Error 1478 InnoDB: Cannot create a COMPRESSED tablespace when innodb_page_size > 16k. Error 1528 Failed to create TABLESPACE s_4k Error 1031 Table storage engine for 's_4k' doesn't have this option CREATE TABLESPACE s_8k ADD DATAFILE 's_8k.ibd' FILE_BLOCK_SIZE=8k; ERROR HY000: InnoDB: Cannot create a COMPRESSED tablespace when innodb_page_size > 16k. SHOW WARNINGS; Level Code Message Error 1478 InnoDB: Cannot create a COMPRESSED tablespace when innodb_page_size > 16k. Error 1528 Failed to create TABLESPACE s_8k Error 1031 Table storage engine for 's_8k' doesn't have this option CREATE TABLESPACE s_16k ADD DATAFILE 's_16k.ibd' FILE_BLOCK_SIZE=16k; ERROR HY000: InnoDB: Cannot create a COMPRESSED tablespace when innodb_page_size > 16k. SHOW WARNINGS; Level Code Message Error 1478 InnoDB: Cannot create a COMPRESSED tablespace when innodb_page_size > 16k. Error 1528 Failed to create TABLESPACE s_16k Error 1031 Table storage engine for 's_16k' doesn't have this option CREATE TABLESPACE s_32k ADD DATAFILE 's_32k.ibd' FILE_BLOCK_SIZE=32k; ERROR HY000: InnoDB: Cannot create a COMPRESSED tablespace when innodb_page_size > 16k. SHOW WARNINGS; Level Code Message Error 1478 InnoDB: Cannot create a COMPRESSED tablespace when innodb_page_size > 16k. Error 1528 Failed to create TABLESPACE s_32k Error 1031 Table storage engine for 's_32k' doesn't have this option CREATE TABLESPACE s_64k ADD DATAFILE 's_64k.ibd' FILE_BLOCK_SIZE=64k; === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path s_64k General DEFAULT 0 Any MYSQLD_DATADIR/s_64k.ibd === information_schema.files === Space_Name File_Type Engine Status Tablespace_Name Path s_64k TABLESPACE InnoDB NORMAL s_64k MYSQLD_DATADIR/s_64k.ibd # # Add tables to the tablespaces. # CREATE TABLE t_zip1k_in_64k (a int, b text) ROW_FORMAT=Compressed KEY_BLOCK_SIZE=1 TABLESPACE s_64k; ERROR HY000: InnoDB: Tablespace `s_64k` cannot contain a COMPRESSED table SHOW WARNINGS; Level Code Message Error 1478 InnoDB: Tablespace `s_64k` cannot contain a COMPRESSED table Error 1031 Table storage engine for 't_zip1k_in_64k' doesn't have this option CREATE TABLE t_zip2k_in_64k (a int, b text) ROW_FORMAT=Compressed KEY_BLOCK_SIZE=2 TABLESPACE s_64k; ERROR HY000: InnoDB: Tablespace `s_64k` cannot contain a COMPRESSED table SHOW WARNINGS; Level Code Message Error 1478 InnoDB: Tablespace `s_64k` cannot contain a COMPRESSED table Error 1031 Table storage engine for 't_zip2k_in_64k' doesn't have this option CREATE TABLE t_zip4k_in_64k (a int, b text) ROW_FORMAT=Compressed KEY_BLOCK_SIZE=4 TABLESPACE s_64k; ERROR HY000: InnoDB: Tablespace `s_64k` cannot contain a COMPRESSED table SHOW WARNINGS; Level Code Message Error 1478 InnoDB: Tablespace `s_64k` cannot contain a COMPRESSED table Error 1031 Table storage engine for 't_zip4k_in_64k' doesn't have this option CREATE TABLE t_zip8k_in_64k (a int, b text) ROW_FORMAT=Compressed KEY_BLOCK_SIZE=8 TABLESPACE s_64k; ERROR HY000: InnoDB: Tablespace `s_64k` cannot contain a COMPRESSED table SHOW WARNINGS; Level Code Message Error 1478 InnoDB: Tablespace `s_64k` cannot contain a COMPRESSED table Error 1031 Table storage engine for 't_zip8k_in_64k' doesn't have this option CREATE TABLE t_zip16k_in_64k (a int, b text) ROW_FORMAT=Compressed KEY_BLOCK_SIZE=16 TABLESPACE s_64k; ERROR HY000: InnoDB: Tablespace `s_64k` cannot contain a COMPRESSED table SHOW WARNINGS; Level Code Message Error 1478 InnoDB: Tablespace `s_64k` cannot contain a COMPRESSED table Error 1031 Table storage engine for 't_zip16k_in_64k' doesn't have this option CREATE TABLE t_zip32k_in_64k (a int, b text) ROW_FORMAT=Compressed KEY_BLOCK_SIZE=32 TABLESPACE s_64k; ERROR HY000: InnoDB: Tablespace `s_64k` cannot contain a COMPRESSED table SHOW WARNINGS; Level Code Message Error 1478 InnoDB: Tablespace `s_64k` cannot contain a COMPRESSED table Error 1031 Table storage engine for 't_zip32k_in_64k' doesn't have this option CREATE TABLE t_zip64k_in_64k (a int, b text) ROW_FORMAT=Compressed KEY_BLOCK_SIZE=32 TABLESPACE s_64k; ERROR HY000: InnoDB: Tablespace `s_64k` cannot contain a COMPRESSED table SHOW WARNINGS; Level Code Message Error 1478 InnoDB: Tablespace `s_64k` cannot contain a COMPRESSED table Error 1031 Table storage engine for 't_zip64k_in_64k' doesn't have this option 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; # 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'); # Restart mysqld # restart # # Try to drop a tablespace which is not empty # DROP TABLESPACE s_64k; ERROR HY000: Failed to drop TABLESPACE s_64k SHOW WARNINGS; Level Code Message Error 1529 Failed to drop TABLESPACE s_64k Error 3120 Tablespace `s_64k` is not empty. # # Add more data to the existing Tables # 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'); # # Restart the server and make sure that everything is OK. # # restart === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path s_64k General DEFAULT 0 Any MYSQLD_DATADIR/s_64k.ibd === information_schema.files === Space_Name File_Type Engine Status Tablespace_Name Path s_64k TABLESPACE InnoDB NORMAL s_64k MYSQLD_DATADIR/s_64k.ibd === information_schema.innodb_sys_tables and innodb_sys_tablespaces === Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type test/t_com_in_64k s_64k 129 5 Compact 0 General test/t_dyn_in_64k s_64k 161 5 Dynamic 0 General test/t_red_in_64k s_64k 128 5 Redundant 0 General # Directory of MYSQLD_DATADIR/ s_64k.ibd # Directory of MYSQLD_DATADIR/test/ # # Clean-up. # CHECK TABLE t_red_in_64k; Table Op Msg_type Msg_text test.t_red_in_64k check status OK CHECK TABLE t_com_in_64k; Table Op Msg_type Msg_text test.t_com_in_64k check status OK CHECK TABLE t_dyn_in_64k; Table Op Msg_type Msg_text test.t_dyn_in_64k check status OK DROP TABLE t_red_in_64k; DROP TABLE t_com_in_64k; DROP TABLE t_dyn_in_64k; DROP TABLESPACE s_64k;