1
0
mirror of https://github.com/MariaDB/server.git synced 2025-04-26 11:49:09 +03:00
mariadb/mysql-test/suite/innodb/t/default_row_format_create.test
Alexander Barkov 36eba98817 MDEV-19123 Change default charset from latin1 to utf8mb4
Changing the default server character set from latin1 to utf8mb4.
2024-07-11 10:21:07 +04:00

85 lines
2.8 KiB
Plaintext

--source include/have_innodb.inc
--source include/innodb_row_format.inc
--source include/test_db_charset_latin1.inc
CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB;
--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
SHOW TABLE STATUS LIKE 't1';
DROP TABLE t1;
CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
SHOW TABLE STATUS LIKE 't1';
DROP TABLE t1;
CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT;
--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
SHOW TABLE STATUS LIKE 't1';
DROP TABLE t1;
CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
SHOW TABLE STATUS LIKE 't1';
DROP TABLE t1;
--disable_query_log
SET @save_innodb_read_only_compressed=@@GLOBAL.innodb_read_only_compressed;
SET GLOBAL innodb_read_only_compressed=OFF;
--enable_query_log
CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB
ROW_FORMAT=COMPRESSED;
--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
SHOW TABLE STATUS LIKE 't1';
TRUNCATE TABLE t1;
--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
SHOW TABLE STATUS LIKE 't1';
--disable_query_log
SET GLOBAL innodb_read_only_compressed=@save_innodb_read_only_compressed;
--enable_query_log
DROP TABLE t1;
--error 0,ER_CANT_CREATE_TABLE
CREATE TABLE t1 (c1 INT) ENGINE=InnoDB page_compressed=1;
--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
SHOW TABLE STATUS LIKE 't1';
DROP TABLE IF EXISTS t1;
SET @save_format = @@GLOBAL.innodb_default_row_format;
SET GLOBAL innodb_default_row_format = redundant;
CREATE TABLE t1 (c1 INT) ENGINE=InnoDB;
SET GLOBAL innodb_default_row_format = @save_format;
TRUNCATE TABLE t1;
--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
SHOW TABLE STATUS LIKE 't1';
DROP TABLE t1;
SET @save_level=@@GLOBAL.innodb_compression_level;
SET GLOBAL innodb_compression_level=0;
--error ER_CANT_CREATE_TABLE
CREATE TABLE t(c INT) ENGINE=InnoDB page_compressed=1;
SHOW WARNINGS;
--disable_warnings
--error 0,ER_CANT_CREATE_TABLE
CREATE TABLE t(c INT) ENGINE=InnoDB page_compressed=1 page_compression_level=1;
DROP TABLE IF EXISTS t;
SET GLOBAL innodb_compression_level=1;
--error 0,ER_CANT_CREATE_TABLE
CREATE TABLE t(c INT) ENGINE=InnoDB page_compressed=1;
DROP TABLE IF EXISTS t;
--enable_warnings
SET GLOBAL innodb_compression_level=1;
CREATE TABLE t(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC page_compressed=1;
CREATE TEMPORARY TABLE tt(a INT PRIMARY KEY)
ROW_FORMAT=DYNAMIC page_compressed=1 ENGINE=InnoDB;
SET GLOBAL innodb_compression_level=0;
--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t FORCE, ROW_FORMAT=DEFAULT, ALGORITHM=INPLACE;
--error ER_CANT_CREATE_TABLE
ALTER TABLE t FORCE, ROW_FORMAT=DEFAULT, ALGORITHM=COPY;
DROP TABLE t;
TRUNCATE tt;
SET GLOBAL innodb_compression_level=@save_level;
--source include/test_db_charset_restore.inc