mirror of
https://github.com/MariaDB/server.git
synced 2025-07-21 21:22:27 +03:00
* be strict in CREATE TABLE, just like in ALTER TABLE, because CREATE TABLE, just like ALTER TABLE, can be rolled back for any engine * but don't auto-convert warnings into errors for engine warnings (handler::create) - this matches ALTER TABLE behavior * and not when creating a default record, these errors are handled specially (and replaced with ER_INVALID_DEFAULT) * always issue a Note when a non-unique key is truncated, because it's not a Warning that can be converted to an Error. Before this commit it was a Note for blobs and a Warning for all other data types.
75 lines
3.5 KiB
Plaintext
75 lines
3.5 KiB
Plaintext
call mtr.add_suppression("InnoDB: Cannot add field `c1` in table `test`\\.`tab0`");
|
|
SELECT @@innodb_strict_mode;
|
|
@@innodb_strict_mode
|
|
1
|
|
SELECT @@innodb_file_per_table;
|
|
@@innodb_file_per_table
|
|
1
|
|
SET @file_format = @@GLOBAL.innodb_file_format;
|
|
SET GLOBAL innodb_large_prefix=ON;
|
|
Warnings:
|
|
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
|
|
SET SQL_MODE=strict_all_tables;
|
|
CREATE TABLE tab0 (c1 VARCHAR(65530), KEY(c1(3073))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
|
Warnings:
|
|
Note 1071 Specified key was too long; max key length is 3072 bytes
|
|
SHOW CREATE TABLE tab0;
|
|
Table Create Table
|
|
tab0 CREATE TABLE `tab0` (
|
|
`c1` varchar(65530) DEFAULT NULL,
|
|
KEY `c1` (`c1`(3072))
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
|
|
DROP TABLE tab0;
|
|
CREATE TABLE tab0 (c1 VARCHAR(65530), KEY(c1(3073))) ENGINE=InnoDB KEY_BLOCK_SIZE=2;
|
|
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
|
|
SET GLOBAL innodb_file_format=Antelope;
|
|
Warnings:
|
|
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
|
|
CREATE TABLE tab0(c1 INT,c2 LONGBLOB ) ENGINE=InnoDB ROW_FORMAT=Dynamic;
|
|
ERROR HY000: Can't create table `test`.`tab0` (errno: 140 "Wrong create options")
|
|
SET GLOBAL innodb_file_format=Default;
|
|
Warnings:
|
|
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
|
|
CREATE TABLE tab0(c1 INT,c2 LONGBLOB ) ENGINE=InnoDB ROW_FORMAT=Dynamic;
|
|
DROP TABLE tab0;
|
|
SELECT @@innodb_file_format;
|
|
@@innodb_file_format
|
|
Barracuda
|
|
SET GLOBAL innodb_strict_mode=OFF;
|
|
SET GLOBAL innodb_strict_mode=Default;
|
|
SELECT @@innodb_strict_mode;
|
|
@@innodb_strict_mode
|
|
1
|
|
SET GLOBAL innodb_large_prefix=OFF;
|
|
Warnings:
|
|
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
|
|
SELECT @@innodb_large_prefix;
|
|
@@innodb_large_prefix
|
|
0
|
|
SET GLOBAL innodb_large_prefix=Default;
|
|
Warnings:
|
|
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
|
|
SELECT @@innodb_large_prefix;
|
|
@@innodb_large_prefix
|
|
1
|
|
SET GLOBAL innodb_file_format_max=Default;
|
|
Warnings:
|
|
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
|
|
SELECT @@innodb_file_format_max;
|
|
@@innodb_file_format_max
|
|
Antelope
|
|
CREATE TABLE tab1(c1 int ) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
|
SELECT @@innodb_file_format_max;
|
|
@@innodb_file_format_max
|
|
Barracuda
|
|
SET GLOBAL innodb_file_format_max=Default;
|
|
Warnings:
|
|
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
|
|
SET GLOBAL innodb_large_prefix=off;
|
|
Warnings:
|
|
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
|
|
SET GLOBAL innodb_file_format = @file_format;
|
|
Warnings:
|
|
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
|
|
DROP TABLE tab1;
|