mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Remove deprecated InnoDB file format parameters
The following options will be removed: innodb_file_format innodb_file_format_check innodb_file_format_max innodb_large_prefix They have been deprecated in MySQL 5.7.7 (and MariaDB 10.2.2) in WL#7703. The file_format column in two INFORMATION_SCHEMA tables will be removed: innodb_sys_tablespaces innodb_sys_tables Code to update the file format tag at the end of page 0:5 (TRX_SYS_PAGE in the InnoDB system tablespace) will be removed. When initializing a new database, the bytes will remain 0. All references to the Barracuda file format will be removed. Some references to the Antelope file format (meaning ROW_FORMAT=REDUNDANT or ROW_FORMAT=COMPACT) will remain. This basically ports WL#7704 from MySQL 8.0.0 to MariaDB 10.3.1: commit 4a69dc2a95995501ed92d59a1de74414a38540c6 Author: Marko Mäkelä <marko.makela@oracle.com> Date: Wed Mar 11 22:19:49 2015 +0200
This commit is contained in:
parent
3d615e4b1a
commit
0c92794db3
112 changed files with 253 additions and 4492 deletions
|
@ -1726,9 +1726,6 @@ mem_free_and_error:
|
|||
|
||||
srv_adaptive_flushing = FALSE;
|
||||
srv_use_sys_malloc = TRUE;
|
||||
srv_file_format = 1; /* Barracuda */
|
||||
srv_max_file_format_at_startup = UNIV_FORMAT_MIN; /* on */
|
||||
/* --------------------------------------------------*/
|
||||
|
||||
srv_file_flush_method_str = innobase_unix_file_flush_method;
|
||||
|
||||
|
|
|
@ -191,8 +191,10 @@ drop table t1;
|
|||
#
|
||||
if(!$is_heap)
|
||||
{
|
||||
--error ER_TOO_LONG_KEY
|
||||
--error 0,ER_TOO_LONG_KEY
|
||||
eval create table t1 (a text character set utf8mb4, primary key(a(371))) engine $engine;
|
||||
show warnings;
|
||||
drop table if exists t1;
|
||||
}
|
||||
|
||||
#
|
||||
|
|
|
@ -28,7 +28,7 @@ BEGIN
|
|||
-- Dump all global variables except those
|
||||
-- that are supposed to change
|
||||
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE variable_name NOT IN ('timestamp', 'innodb_file_format_max')
|
||||
WHERE variable_name NOT IN ('timestamp')
|
||||
AND variable_name not like "Last_IO_Err*"
|
||||
AND variable_name != 'INNODB_IBUF_MAX_SIZE'
|
||||
AND variable_name != 'INNODB_USE_NATIVE_AIO'
|
||||
|
|
|
@ -244,7 +244,9 @@ hex(s1)
|
|||
413F
|
||||
drop table t1;
|
||||
create table t1 (a text character set utf8mb4, primary key(a(371))) engine InnoDB;
|
||||
ERROR 42000: Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
drop table if exists t1;
|
||||
CREATE TABLE t1 ( a varchar(10) ) CHARACTER SET utf8mb4 ENGINE InnoDB;
|
||||
INSERT INTO t1 VALUES ( 'test' );
|
||||
SELECT a.a, b.a FROM t1 a, t1 b WHERE a.a = b.a;
|
||||
|
@ -1425,8 +1427,6 @@ CREATE TABLE t1 (
|
|||
a varchar(255) NOT NULL default '',
|
||||
KEY a (a)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
insert into t1 values (_utf8mb4 0xe880bd);
|
||||
insert into t1 values (_utf8mb4 0x5b);
|
||||
select hex(a) from t1;
|
||||
|
@ -1473,8 +1473,6 @@ DROP TABLE IF EXISTS t1;
|
|||
Warnings:
|
||||
Note 1051 Unknown table 'test.t1'
|
||||
CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
|
||||
INSERT INTO t1 VALUES('uu');
|
||||
check table t1;
|
||||
|
@ -2346,8 +2344,6 @@ Tape TINYTEXT,
|
|||
PRIMARY KEY (clipid),
|
||||
KEY tape(Tape(255))
|
||||
) CHARACTER SET=utf8mb4 ENGINE InnoDB;
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
ALTER TABLE t1 ADD mos TINYINT DEFAULT 0 AFTER clipid;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
|
@ -2356,7 +2352,7 @@ t1 CREATE TABLE `t1` (
|
|||
`mos` tinyint(4) DEFAULT 0,
|
||||
`Tape` tinytext DEFAULT NULL,
|
||||
PRIMARY KEY (`clipid`),
|
||||
KEY `tape` (`Tape`(191))
|
||||
KEY `tape` (`Tape`(255))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
|
||||
DROP TABLE t1;
|
||||
#
|
||||
|
|
|
@ -244,7 +244,12 @@ hex(s1)
|
|||
413F
|
||||
drop table t1;
|
||||
create table t1 (a text character set utf8mb4, primary key(a(371))) engine MyISAM;
|
||||
ERROR 42000: Specified key was too long; max key length is 1000 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 1000 bytes
|
||||
drop table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 'test.t1'
|
||||
CREATE TABLE t1 ( a varchar(10) ) CHARACTER SET utf8mb4 ENGINE MyISAM;
|
||||
INSERT INTO t1 VALUES ( 'test' );
|
||||
SELECT a.a, b.a FROM t1 a, t1 b WHERE a.a = b.a;
|
||||
|
|
|
@ -852,8 +852,6 @@ SUBPARTITION BY KEY(f6) SUBPARTITIONS 4 (
|
|||
PARTITION p0 VALUES IN (1,3,9,null),
|
||||
PARTITION p1 VALUES IN (2,4,0)
|
||||
);
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
INSERT INTO t2 VALUES
|
||||
('k','s',3,'b','j'),('a','b',NULL,'v','j'),('c','m',9,'t',NULL),
|
||||
('b','l',9,'b',NULL),('i','y',3,'o','w'),('c','m',NULL,'a','m'),
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
--sync-relay-log-info=1 --relay-log-recovery=1 --loose-innodb_file_format_check=1 --default-storage-engine=MyISAM --loose-innodb-file-per-table=0
|
||||
--sync-relay-log-info=1 --relay-log-recovery=1 --default-storage-engine=MyISAM --loose-innodb-file-per-table=0
|
||||
--skip-core-file --skip-slave-start
|
||||
|
|
|
@ -12,4 +12,3 @@
|
|||
|
||||
innodb_scrub : MDEV-8139 scrubbing does not work reliably
|
||||
innodb_scrub_background : MDEV-8139 scrubbing does not work reliably
|
||||
innodb_encryption-page-compression : MDEV-11420
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
SET GLOBAL innodb_file_per_table = ON;
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
create table t1 (a varchar(255)) engine=innodb encrypted=yes;
|
||||
create table t2 (a varchar(255)) engine=innodb;
|
||||
show warnings;
|
||||
|
|
|
@ -5,6 +5,8 @@ NAME
|
|||
mysql/innodb_table_stats
|
||||
mysql/innodb_index_stats
|
||||
innodb_system
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
set global innodb_compression_algorithm = 1;
|
||||
create database enctests;
|
||||
use enctests;
|
||||
create table t1(a int not null primary key, b char(200)) engine=innodb;
|
||||
|
|
|
@ -5,7 +5,6 @@ call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
|||
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
|
||||
# Restart mysqld --file-key-management-filename=keys2.txt
|
||||
# Wait max 10 min for key encryption threads to encrypt all spaces
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
create table t1(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=4;
|
||||
create table t2(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed;
|
||||
|
|
|
@ -4,12 +4,8 @@ call mtr.add_suppression("Plugin 'file_key_management' .*");
|
|||
call mtr.add_suppression("InnoDB: cannot enable encryption, encryption plugin is not available");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
|
||||
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t2 cannot be decrypted.");
|
||||
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t3 cannot be decrypted.");
|
||||
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t4 cannot be decrypted.");
|
||||
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted.");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file test/t[1-4] cannot be decrypted");
|
||||
# Restart mysqld --file-key-management-filename=keys2.txt
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
create table t1(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=20;
|
||||
create table t2(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
SET GLOBAL innodb_encryption_threads = 4;
|
||||
SET GLOBAL innodb_encrypt_tables = on;
|
||||
|
|
|
@ -40,7 +40,6 @@ NOT FOUND /author/ in t5.ibd
|
|||
NOT FOUND /mangled/ in t6.ibd
|
||||
# t7 ... on expecting NOT FOUND
|
||||
NOT FOUND /mysql/ in t7.ibd
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
ALTER TABLE t1 ADD COLUMN b int default 2;
|
||||
ALTER TABLE t2 ADD COLUMN b int default 2;
|
||||
|
|
|
@ -14,10 +14,7 @@
|
|||
--let t3_IBD = $MYSQLD_DATADIR/test/t3.ibd
|
||||
--let SEARCH_RANGE = 10000000
|
||||
|
||||
--disable_warnings
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
--enable_warnings
|
||||
|
||||
create table t1 (a varchar(255)) engine=innodb encrypted=yes;
|
||||
create table t2 (a varchar(255)) engine=innodb;
|
||||
|
|
|
@ -6,18 +6,10 @@
|
|||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||
|
||||
--disable_query_log
|
||||
--disable_warnings
|
||||
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
|
||||
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
|
||||
let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
|
||||
let $encryption = `SELECT @@innodb_encrypt_tables`;
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
# zlib
|
||||
set global innodb_compression_algorithm = 1;
|
||||
--enable_warnings
|
||||
--enable_query_log
|
||||
|
||||
create database enctests;
|
||||
use enctests;
|
||||
|
@ -90,13 +82,3 @@ SET GLOBAL innodb_encrypt_tables=ON;
|
|||
|
||||
use test;
|
||||
drop database enctests;
|
||||
# reset system
|
||||
|
||||
--disable_query_log
|
||||
--disable_warnings
|
||||
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
|
||||
EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
|
||||
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
|
||||
set global innodb_compression_algorithm = DEFAULT;
|
||||
--enable_warnings
|
||||
--enable_query_log
|
||||
|
|
|
@ -18,10 +18,7 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile
|
|||
--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--disable_warnings
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
--enable_warnings
|
||||
|
||||
create table t1(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=4;
|
||||
create table t2(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed;
|
||||
|
|
|
@ -9,19 +9,13 @@ call mtr.add_suppression("Plugin 'file_key_management' .*");
|
|||
call mtr.add_suppression("InnoDB: cannot enable encryption, encryption plugin is not available");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
|
||||
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t2 cannot be decrypted.");
|
||||
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t3 cannot be decrypted.");
|
||||
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t4 cannot be decrypted.");
|
||||
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted.");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file test/t[1-4] cannot be decrypted");
|
||||
|
||||
--echo # Restart mysqld --file-key-management-filename=keys2.txt
|
||||
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
--disable_warnings
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
--enable_warnings
|
||||
|
||||
create table t1(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=20;
|
||||
create table t2(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed;
|
||||
|
|
|
@ -5,6 +5,7 @@ let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
|
|||
let $innodb_encrypt_tables_orig = `SELECT @@innodb_encrypt_tables`;
|
||||
let $innodb_encryption_threads_orig = `SELECT @@innodb_encryption_threads`;
|
||||
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
SET GLOBAL innodb_encryption_threads = 4;
|
||||
SET GLOBAL innodb_encrypt_tables = on;
|
||||
|
||||
|
|
|
@ -75,10 +75,7 @@ set autocommit=1;
|
|||
|
||||
-- source include/start_mysqld.inc
|
||||
|
||||
--disable_warnings
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
--enable_warnings
|
||||
|
||||
ALTER TABLE t1 ADD COLUMN b int default 2;
|
||||
ALTER TABLE t2 ADD COLUMN b int default 2;
|
||||
|
|
|
@ -123,5 +123,3 @@ delete from t1;
|
|||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP PROCEDURE setcrash;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
|
|
@ -123,5 +123,3 @@ delete from t1;
|
|||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP PROCEDURE setcrash;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
# Test 1) Show the page size from Information Schema
|
||||
SELECT variable_value FROM information_schema.global_status
|
||||
WHERE LOWER(variable_name) = 'innodb_page_size';
|
||||
|
@ -968,5 +965,3 @@ COL196 TEXT,
|
|||
COL197 TEXT)
|
||||
row_format=compact,ENGINE=INNODB;
|
||||
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
|
|
@ -54,6 +54,6 @@ connection default;
|
|||
ALTER TABLE t MODIFY c2 INT NULL, ALGORITHM=INPLACE;
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
|
||||
WHERE NAME='test/t';
|
||||
TABLE_ID NAME FLAG N_COLS SPACE FILE_FORMAT ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
|
||||
# test/t 33 6 # Barracuda Dynamic 0 Single
|
||||
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
|
||||
# test/t 33 6 # Dynamic 0 Single
|
||||
DROP TABLE t;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
create table t1 (c1 int not null primary key auto_increment, b char(200)) engine=innodb page_compressed=1;
|
||||
insert into t1 values(NULL,'compressed_text_aaaaaaaaabbbbbbbbbbbbbccccccccccccc');
|
||||
|
|
|
@ -2355,15 +2355,9 @@ a b
|
|||
20 NULL
|
||||
drop table t1;
|
||||
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create table t1 (v varchar(65530), key(v));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
Warning 1071 Specified key was too long; max key length is 3072 bytes
|
||||
drop table t1;
|
||||
create table t1 (v varchar(65536));
|
||||
Warnings:
|
||||
|
@ -2528,55 +2522,6 @@ t9 CREATE TABLE `t9` (
|
|||
KEY `col1` (`col1`,`col2`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
drop table t1, t2, t3, t4, t5, t6, t7, t8, t9;
|
||||
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create table t1 (col1 varchar(768), index(col1))
|
||||
character set = latin1 engine = innodb;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
create table t2 (col1 varbinary(768), index(col1))
|
||||
character set = latin1 engine = innodb;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
create table t3 (col1 text, index(col1(768)))
|
||||
character set = latin1 engine = innodb;
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
create table t4 (col1 blob, index(col1(768)))
|
||||
character set = latin1 engine = innodb;
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`col1` varchar(768) DEFAULT NULL,
|
||||
KEY `col1` (`col1`(767))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
drop table t1, t2, t3, t4;
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create table t1 (col1 varchar(768) primary key)
|
||||
character set = latin1 engine = innodb;
|
||||
ERROR 42000: Specified key was too long; max key length is 767 bytes
|
||||
create table t2 (col1 varbinary(768) primary key)
|
||||
character set = latin1 engine = innodb;
|
||||
ERROR 42000: Specified key was too long; max key length is 767 bytes
|
||||
create table t3 (col1 text, primary key(col1(768)))
|
||||
character set = latin1 engine = innodb;
|
||||
ERROR 42000: Specified key was too long; max key length is 767 bytes
|
||||
create table t4 (col1 blob, primary key(col1(768)))
|
||||
character set = latin1 engine = innodb;
|
||||
ERROR 42000: Specified key was too long; max key length is 767 bytes
|
||||
SET sql_mode = default;
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
CREATE TABLE t1
|
||||
(
|
||||
id INT PRIMARY KEY
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
set @old_innodb_file_format_max=@@innodb_file_format_max;
|
||||
select @old_innodb_file_format_max;
|
||||
@old_innodb_file_format_max
|
||||
Barracuda
|
||||
set global innodb_file_format_max = Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Antelope
|
||||
set global innodb_file_format_max = @old_innodb_file_format_max;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Barracuda
|
||||
set global innodb_file_format_max = cheetah;
|
||||
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'cheetah'
|
||||
set global innodb_file_format_max = Bear;
|
||||
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'Bear'
|
||||
set global innodb_file_format_max = on;
|
||||
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'ON'
|
||||
set global innodb_file_format_max = off;
|
||||
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'off'
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
|
@ -1,66 +0,0 @@
|
|||
select @@innodb_file_format;
|
||||
@@innodb_file_format
|
||||
Barracuda
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
1
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Barracuda
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_format=barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_format=cheetah;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'cheetah'
|
||||
select @@innodb_file_format;
|
||||
@@innodb_file_format
|
||||
Barracuda
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select @@innodb_file_format;
|
||||
@@innodb_file_format
|
||||
Barracuda
|
||||
set global innodb_file_format=on;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'ON'
|
||||
set global innodb_file_format=off;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'off'
|
||||
select @@innodb_file_format;
|
||||
@@innodb_file_format
|
||||
Barracuda
|
||||
set global innodb_file_format_max=antelope;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_format_max=barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_format_max=cheetah;
|
||||
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'cheetah'
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Antelope
|
||||
set global innodb_file_format=on;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'ON'
|
||||
set global innodb_file_format=off;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'off'
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Antelope
|
||||
set global innodb_file_format_max=antelope;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_format_check=off;
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
|
@ -1165,8 +1165,6 @@ a b
|
|||
drop table t1,t2;
|
||||
create table t1(f1 varchar(800) binary not null, key(f1))
|
||||
character set utf8 collate utf8_general_ci;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
insert into t1 values('aaa');
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c FLOAT, KEY b(b)) ENGINE = INNODB;
|
||||
|
@ -1546,13 +1544,11 @@ create table t1(a text) engine=innodb default charset=utf8;
|
|||
insert into t1 values('aaa');
|
||||
set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for
|
||||
alter table t1 add index(a(1024));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` text DEFAULT NULL,
|
||||
KEY `a` (`a`(255))
|
||||
KEY `a` (`a`(1024))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
CREATE TABLE worklog5743 (
|
||||
col_1_text TEXT(4000) , col_2_text TEXT(4000) ,
|
||||
PRIMARY KEY (col_1_text(3072))
|
||||
|
@ -87,6 +84,3 @@ worklog5743;
|
|||
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
|
||||
1 1
|
||||
DROP TABLE worklog5743;
|
||||
SET GLOBAL innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
|
|
@ -346,7 +346,7 @@ Warnings:
|
|||
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_buffer_page_lru but the InnoDB storage engine is not installed
|
||||
select * from information_schema.innodb_buffer_stats;
|
||||
select * from information_schema.innodb_sys_tables;
|
||||
TABLE_ID NAME FLAG N_COLS SPACE FILE_FORMAT ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
|
||||
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
|
||||
Warnings:
|
||||
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_sys_tables but the InnoDB storage engine is not installed
|
||||
select * from information_schema.innodb_sys_tablestats;
|
||||
|
@ -374,7 +374,7 @@ ID FOR_COL_NAME REF_COL_NAME POS
|
|||
Warnings:
|
||||
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_sys_foreign_cols but the InnoDB storage engine is not installed
|
||||
select * from information_schema.innodb_sys_tablespaces;
|
||||
SPACE NAME FLAG FILE_FORMAT ROW_FORMAT PAGE_SIZE ZIP_PAGE_SIZE SPACE_TYPE FS_BLOCK_SIZE FILE_SIZE ALLOCATED_SIZE
|
||||
SPACE NAME FLAG ROW_FORMAT PAGE_SIZE ZIP_PAGE_SIZE SPACE_TYPE FS_BLOCK_SIZE FILE_SIZE ALLOCATED_SIZE
|
||||
Warnings:
|
||||
Warning 1012 InnoDB: SELECTing from INFORMATION_SCHEMA.innodb_sys_tablespaces but the InnoDB storage engine is not installed
|
||||
select * from information_schema.innodb_sys_datafiles;
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
--source include/have_debug.inc
|
||||
--source include/have_log_bin.inc
|
||||
|
||||
let $file_format_max=`SELECT @@innodb_file_format_max`;
|
||||
CREATE TABLE t1(a CHAR(255),
|
||||
b CHAR(255),
|
||||
c CHAR(255),
|
||||
|
@ -77,6 +76,3 @@ while ($numtests)
|
|||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP PROCEDURE setcrash;
|
||||
--disable_query_log
|
||||
eval SET GLOBAL innodb_file_format_max=$file_format_max;
|
||||
--enable_query_log
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
--source include/have_debug.inc
|
||||
--source include/have_log_bin.inc
|
||||
|
||||
let $file_format_max=`SELECT @@innodb_file_format_max`;
|
||||
CREATE TABLE t1(a CHAR(255),
|
||||
b CHAR(255),
|
||||
c CHAR(255),
|
||||
|
@ -77,6 +76,3 @@ while ($numtests)
|
|||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP PROCEDURE setcrash;
|
||||
--disable_query_log
|
||||
eval SET GLOBAL innodb_file_format_max=$file_format_max;
|
||||
--enable_query_log
|
||||
|
|
|
@ -5,13 +5,7 @@
|
|||
|
||||
call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
|
||||
|
||||
--disable_query_log
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
# These values can change during the test
|
||||
let $innodb_large_prefix_orig = `SELECT @@innodb_large_prefix`;
|
||||
--enable_query_log
|
||||
|
||||
SET GLOBAL innodb_large_prefix = OFF;
|
||||
|
||||
--echo # Test 1) Show the page size from Information Schema
|
||||
SELECT variable_value FROM information_schema.global_status
|
||||
|
@ -942,11 +936,3 @@ COL195 TEXT,
|
|||
COL196 TEXT,
|
||||
COL197 TEXT)
|
||||
row_format=compact,ENGINE=INNODB;
|
||||
|
||||
#
|
||||
# restore environment to the state it was before this test execution
|
||||
#
|
||||
|
||||
--disable_query_log
|
||||
EVAL SET GLOBAL innodb_large_prefix = $innodb_large_prefix_orig;
|
||||
--enable_query_log
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
--source include/have_innodb.inc
|
||||
|
||||
--disable_query_log
|
||||
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
|
||||
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
|
||||
let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
|
||||
--enable_query_log
|
||||
|
||||
--disable_warnings
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
--enable_warnings
|
||||
|
||||
create table t1 (c1 int not null primary key auto_increment, b char(200)) engine=innodb page_compressed=1;
|
||||
insert into t1 values(NULL,'compressed_text_aaaaaaaaabbbbbbbbbbbbbccccccccccccc');
|
||||
|
@ -43,9 +37,6 @@ drop table t1;
|
|||
|
||||
# reset system
|
||||
--disable_query_log
|
||||
--disable_warnings
|
||||
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
|
||||
EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
|
||||
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
|
||||
--enable_warnings
|
||||
--enable_query_log
|
||||
|
|
|
@ -1410,9 +1410,7 @@ source include/varchar.inc;
|
|||
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
||||
# Embedded server doesn't chdir to data directory
|
||||
--replace_result $MYSQLTEST_VARDIR . master-data/ ''
|
||||
SET GLOBAL innodb_large_prefix=OFF;
|
||||
create table t1 (v varchar(65530), key(v));
|
||||
SET GLOBAL innodb_large_prefix=default;
|
||||
drop table t1;
|
||||
create table t1 (v varchar(65536));
|
||||
show create table t1;
|
||||
|
@ -1580,39 +1578,6 @@ show create table t9;
|
|||
|
||||
drop table t1, t2, t3, t4, t5, t6, t7, t8, t9;
|
||||
|
||||
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
||||
SET GLOBAL innodb_large_prefix=OFF;
|
||||
# these should have their index length trimmed
|
||||
create table t1 (col1 varchar(768), index(col1))
|
||||
character set = latin1 engine = innodb;
|
||||
create table t2 (col1 varbinary(768), index(col1))
|
||||
character set = latin1 engine = innodb;
|
||||
create table t3 (col1 text, index(col1(768)))
|
||||
character set = latin1 engine = innodb;
|
||||
create table t4 (col1 blob, index(col1(768)))
|
||||
character set = latin1 engine = innodb;
|
||||
SET GLOBAL innodb_large_prefix=default;
|
||||
|
||||
show create table t1;
|
||||
|
||||
drop table t1, t2, t3, t4;
|
||||
|
||||
# these should be refused
|
||||
set global innodb_large_prefix=OFF;
|
||||
--error ER_TOO_LONG_KEY
|
||||
create table t1 (col1 varchar(768) primary key)
|
||||
character set = latin1 engine = innodb;
|
||||
--error ER_TOO_LONG_KEY
|
||||
create table t2 (col1 varbinary(768) primary key)
|
||||
character set = latin1 engine = innodb;
|
||||
--error ER_TOO_LONG_KEY
|
||||
create table t3 (col1 text, primary key(col1(768)))
|
||||
character set = latin1 engine = innodb;
|
||||
--error ER_TOO_LONG_KEY
|
||||
create table t4 (col1 blob, primary key(col1(768)))
|
||||
character set = latin1 engine = innodb;
|
||||
SET sql_mode = default;
|
||||
set global innodb_large_prefix=default;
|
||||
#
|
||||
# Test improved foreign key error messages (bug #3443)
|
||||
#
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
--source include/have_innodb.inc
|
||||
# This is the unit test for bug #47167.
|
||||
# It tests setting the global variable "innodb_file_format_max" (
|
||||
# originally "innodb_file_format_check") with a user-Defined Variable.
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/restart_and_reinit.inc
|
||||
|
||||
# Save the value (Antelope) in 'innodb_file_format_max' to
|
||||
# 'old_innodb_file_format_max'
|
||||
set @old_innodb_file_format_max=@@innodb_file_format_max;
|
||||
|
||||
# @old_innodb_file_format_max shall have the value of 'Antelope'
|
||||
select @old_innodb_file_format_max;
|
||||
|
||||
# Reset the value in 'innodb_file_format_max' to 'Barracuda'
|
||||
set global innodb_file_format_max = Barracuda;
|
||||
|
||||
select @@innodb_file_format_max;
|
||||
|
||||
# Set 'innodb_file_format_max' to its default value, which
|
||||
# is the latest file format supported in the current release.
|
||||
set global innodb_file_format_max = DEFAULT;
|
||||
|
||||
select @@innodb_file_format_max;
|
||||
|
||||
# Put the saved value back to 'innodb_file_format_max'
|
||||
set global innodb_file_format_max = @old_innodb_file_format_max;
|
||||
|
||||
# Check whether 'innodb_file_format_max' get its original value.
|
||||
select @@innodb_file_format_max;
|
||||
|
||||
# Following are negative tests, all should fail.
|
||||
--disable_warnings
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format_max = cheetah;
|
||||
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format_max = Bear;
|
||||
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format_max = on;
|
||||
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format_max = off;
|
||||
--enable_warnings
|
||||
|
||||
# Put the saved value back to 'innodb_file_format_max'
|
||||
--disable_query_log
|
||||
set global innodb_file_format_max = @old_innodb_file_format_max;
|
||||
--enable_query_log
|
|
@ -1,44 +0,0 @@
|
|||
-- source include/restart_and_reinit.inc
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
let $innodb_file_format_orig=`select @@innodb_file_format`;
|
||||
let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
|
||||
|
||||
select @@innodb_file_format;
|
||||
select @@innodb_file_format_check;
|
||||
select @@innodb_file_format_max;
|
||||
set global innodb_file_format=antelope;
|
||||
set global innodb_file_format=barracuda;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format=cheetah;
|
||||
select @@innodb_file_format;
|
||||
set global innodb_file_format=default;
|
||||
select @@innodb_file_format;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format=on;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format=off;
|
||||
select @@innodb_file_format;
|
||||
set global innodb_file_format_max=antelope;
|
||||
set global innodb_file_format_max=barracuda;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format_max=cheetah;
|
||||
select @@innodb_file_format_max;
|
||||
set global innodb_file_format_max=default;
|
||||
select @@innodb_file_format_max;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format=on;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format=off;
|
||||
select @@innodb_file_format_max;
|
||||
set global innodb_file_format_max=antelope;
|
||||
|
||||
# innodb_file_format_check is read only variable, can be
|
||||
# set as server startup parameter
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global innodb_file_format_check=off;
|
||||
|
||||
--disable_query_log
|
||||
eval SET GLOBAL innodb_file_format=$innodb_file_format_orig;
|
||||
eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig;
|
||||
--enable_query_log
|
|
@ -1,3 +1,2 @@
|
|||
--loose-innodb-lock-wait-timeout=2
|
||||
--default-storage-engine=MyISAM
|
||||
--loose-innodb-large-prefix=off
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
# Test restart the server and "shutdown_server" looks for pid file
|
||||
# which is not there with embedded mode
|
||||
--source include/not_embedded.inc
|
||||
# Save innodb variables
|
||||
let $innodb_large_prefix_orig=`select @@innodb_large_prefix`;
|
||||
|
||||
set global innodb_large_prefix=1;
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Stop the server in between when prefix index are created and see if state is
|
||||
|
@ -97,8 +93,3 @@ SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
|
|||
worklog5743;
|
||||
|
||||
DROP TABLE worklog5743;
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
eval SET GLOBAL innodb_large_prefix=$innodb_large_prefix_orig;
|
||||
|
|
|
@ -31,7 +31,6 @@ call mtr.add_suppression("Parent table of FTS auxiliary table "
|
|||
# create test-bed
|
||||
#
|
||||
let $per_table = `select @@innodb_file_per_table`;
|
||||
let $format = `select @@innodb_file_format`;
|
||||
|
||||
eval set global innodb_file_per_table = on;
|
||||
let $WL6501_TMP_DIR = `select @@tmpdir`;
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
# create test-bed
|
||||
#
|
||||
let $per_table = `select @@innodb_file_per_table`;
|
||||
let $format = `select @@innodb_file_format`;
|
||||
|
||||
let $WL6501_TMP_DIR = `select @@tmpdir`;
|
||||
let $WL6501_DATA_DIR = `select @@datadir`;
|
||||
|
@ -108,5 +107,4 @@ drop procedure populate_small;
|
|||
#
|
||||
# remove test-bed
|
||||
#
|
||||
eval set global innodb_file_format = $format;
|
||||
eval set global innodb_file_per_table = $per_table;
|
||||
|
|
|
@ -282,26 +282,6 @@ Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
|||
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
|
||||
Got one of the listed errors
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `test`.`t4` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
|
||||
Got one of the listed errors
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
# Test 7) This series of tests were moved from innodb-index to here
|
||||
# because the second alter table t1 assumes a 16k page size.
|
||||
# Moving the test allows the rest of innodb-index to be run on all
|
||||
|
|
|
@ -245,28 +245,6 @@ Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
|||
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
|
||||
ERROR HY000: Can't create table `test`.`t4` (errno: 140 "Wrong create options")
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE=8 cannot be larger than 4.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `test`.`t4` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
|
||||
ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 4.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
# Test 7) Not included here; 16k only
|
||||
# Test 8) Test creating a table that could lead to undo log overflow.
|
||||
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
|
||||
|
|
|
@ -257,27 +257,6 @@ Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
|||
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
|
||||
ERROR HY000: Can't create table `test`.`t4` (errno: 140 "Wrong create options")
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `test`.`t4` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
|
||||
ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 8.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
# Test 7) Not included here; 16k only
|
||||
# Test 8) Test creating a table that could lead to undo log overflow.
|
||||
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
SET default_storage_engine=InnoDB;
|
||||
SET GLOBAL innodb_file_format=`Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
SET SESSION innodb_strict_mode = ON;
|
||||
# Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
|
||||
|
@ -260,76 +257,10 @@ Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 1
|
|||
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
# Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
|
||||
# and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope
|
||||
# and that they can be set to default values during strict mode.
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4;
|
||||
Got one of the listed errors
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
|
||||
Got one of the listed errors
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Redundant row_format=REDUNDANT
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Compact row_format=COMPACT
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=2;
|
||||
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
|
||||
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
|
||||
Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
DROP TABLE t1;
|
||||
# and a valid non-zero KEY_BLOCK_SIZE
|
||||
# can be set to default values during strict mode.
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
@ -344,9 +275,6 @@ Level Code Message
|
|||
ALTER TABLE t1 ADD COLUMN f2 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
# Test 8) StrictMode=ON, Make sure ROW_FORMAT=COMPRESSED
|
||||
# and a valid non-zero KEY_BLOCK_SIZE are rejected with
|
||||
# innodb_file_per_table=OFF and that they can be set to default
|
||||
|
@ -744,9 +672,7 @@ Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15.
|
|||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Dynamic key_block_size=15
|
||||
# Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
|
||||
valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT
|
||||
is reverted to Antelope and then used again when ROW_FORMAT=Barracuda.
|
||||
# Test 15) StrictMode=OFF.
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
|
@ -754,27 +680,12 @@ Level Code Message
|
|||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Compressed row_format=COMPRESSED key_block_size=1
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Dynamic row_format=COMPRESSED key_block_size=1
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
t1 Compressed row_format=COMPRESSED key_block_size=1
|
||||
ALTER TABLE t1 ADD COLUMN f2 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
|
@ -788,18 +699,12 @@ Level Code Message
|
|||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Dynamic row_format=DYNAMIC
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
t1 Dynamic row_format=DYNAMIC
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
ALTER TABLE t1 ADD COLUMN f2 INT;
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
|
@ -853,5 +758,3 @@ TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
|||
t1 Dynamic row_format=DYNAMIC
|
||||
# Cleanup
|
||||
DROP TABLE t1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
|
|
@ -94,18 +94,6 @@ create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
|
|||
create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
|
||||
create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
|
||||
create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_1(a2(4000));
|
||||
Got one of the listed errors
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_1(a2(4000));
|
||||
Got one of the listed errors
|
||||
show warnings;
|
||||
|
@ -128,19 +116,6 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
|
|||
create index idx6 on worklog5743_1(a1, a2(428));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET sql_mode= '';
|
||||
create index idx1 on worklog5743_2(a2(4000));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_2(a2(4000));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
|
@ -163,18 +138,6 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
|
|||
create index idx6 on worklog5743_2(a1, a2(940));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_4(a2(4000));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_4(a2(4000));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
|
@ -197,18 +160,6 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
|
|||
create index idx6 on worklog5743_4(a1, a2(1964));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_8(a2(1000));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_8(a2(3073));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
|
@ -237,18 +188,6 @@ Error 1071 Specified key was too long; max key length is 3072 bytes
|
|||
create index idx7 on worklog5743_8(a1, a2(2000), a3(1068));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_16(a2(1000));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_16(a2(3073));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
|
@ -283,37 +222,21 @@ insert into worklog5743_2 values(9, repeat("a", 10000));
|
|||
insert into worklog5743_4 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
|
||||
insert into worklog5743_16 values(9, repeat("a", 10000), repeat("a", 10000));
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
insert into worklog5743_1 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_2 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_4 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
|
||||
insert into worklog5743_16 values(2, repeat("b", 10000), repeat("b", 10000));
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_8;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_16;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
begin;
|
||||
update worklog5743_1 set a1 = 1000;
|
||||
update worklog5743_2 set a1 = 1000;
|
||||
|
@ -323,23 +246,18 @@ update worklog5743_16 set a1 = 1000;
|
|||
select a1, left(a2, 20) from worklog5743_1;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_8;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_16;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
|
|
|
@ -7,26 +7,26 @@ Level Code Message
|
|||
insert into worklog5743 values(repeat("a", 20000));
|
||||
update worklog5743 set a = (repeat("b", 16000));
|
||||
SET sql_mode= '';
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release
|
||||
create index idx on worklog5743(a(900));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 768 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 768 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
SET sql_mode= default;
|
||||
begin;
|
||||
update worklog5743 set a = (repeat("x", 17000));
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
connect con1,localhost,root,,;
|
||||
select a = repeat("x", 17000) from worklog5743;
|
||||
a = repeat("x", 17000)
|
||||
0
|
||||
select a = repeat("b", 16000) from worklog5743;
|
||||
a = repeat("b", 16000)
|
||||
1
|
||||
connect con2,localhost,root,,;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
|
@ -34,6 +34,7 @@ READ-UNCOMMITTED
|
|||
select a = repeat("x", 17000) from worklog5743;
|
||||
a = repeat("x", 17000)
|
||||
1
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 2 ###
|
||||
|
@ -46,23 +47,24 @@ Level Code Message
|
|||
insert into worklog5743 values(9, repeat("a", 10000));
|
||||
begin;
|
||||
update worklog5743 set a1 = 1111;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1`,(`test`.`worklog5743`.`a2` = repeat('a',10000)) AS `a2 = repeat("a", 10000)` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx idx 5 const 1
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
9 1
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 3 ###
|
||||
|
@ -71,37 +73,36 @@ create index idx on worklog5743(a1, a2(50));
|
|||
insert into worklog5743 values(9, repeat("a", 10000));
|
||||
begin;
|
||||
update worklog5743 set a1 = 2222;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1`,(`test`.`worklog5743`.`a2` = repeat('a',10000)) AS `a2 = repeat("a", 10000)` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx idx 5 const 1
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
9 1
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 4 ###
|
||||
create table worklog5743_1(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=1;
|
||||
create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
|
||||
create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_1(a2(4000));
|
||||
ERROR 42000: Specified key was too long; max key length is 767 bytes
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1982. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 767 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1982. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx3 on worklog5743_1(a2(436));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1982. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
|
@ -118,18 +119,13 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
|
|||
create index idx6 on worklog5743_1(a1, a2(428));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET sql_mode= '';
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release
|
||||
create index idx1 on worklog5743_2(a2(4000));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 768 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 768 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
show create table worklog5743_2;
|
||||
Table Create Table
|
||||
worklog5743_2 CREATE TABLE `worklog5743_2` (
|
||||
|
@ -139,16 +135,16 @@ worklog5743_2 CREATE TABLE `worklog5743_2` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2
|
||||
create index idx3 on worklog5743_2(a2(769));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 768 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 768 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
create index idx4 on worklog5743_2(a2(768));
|
||||
Warnings:
|
||||
Warning 1831 Duplicate index 'idx4' defined on the table 'test.worklog5743_2'. This is deprecated and will be disallowed in a future release
|
||||
Note 1831 Duplicate index `idx4`. This is deprecated and will be disallowed in a future release
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1831 Duplicate index 'idx4' defined on the table 'test.worklog5743_2'. This is deprecated and will be disallowed in a future release
|
||||
Note 1831 Duplicate index `idx4`. This is deprecated and will be disallowed in a future release
|
||||
create index idx5 on worklog5743_2(a1, a2(765));
|
||||
ERROR 42000: Specified key was too long; max key length is 768 bytes
|
||||
show warnings;
|
||||
|
@ -157,34 +153,31 @@ Error 1071 Specified key was too long; max key length is 768 bytes
|
|||
create index idx6 on worklog5743_2(a1, a2(764));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_4(a2(4000));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
show create table worklog5743_4;
|
||||
Table Create Table
|
||||
worklog5743_4 CREATE TABLE `worklog5743_4` (
|
||||
`a1` int(11) DEFAULT NULL,
|
||||
`a2` text NOT NULL,
|
||||
KEY `idx1` (`a2`(767))
|
||||
KEY `idx1` (`a2`(768))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
|
||||
create index idx3 on worklog5743_4(a2(769));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
create index idx4 on worklog5743_4(a2(768));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
Note 1831 Duplicate index `idx4`. This is deprecated and will be disallowed in a future release
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
Note 1831 Duplicate index `idx4`. This is deprecated and will be disallowed in a future release
|
||||
create index idx5 on worklog5743_4(a1, a2(765));
|
||||
ERROR 42000: Specified key was too long; max key length is 768 bytes
|
||||
show warnings;
|
||||
|
@ -197,27 +190,15 @@ SET sql_mode= default;
|
|||
insert into worklog5743_1 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_2 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_4 values(9, repeat("a", 10000));
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
insert into worklog5743_1 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_2 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_4 values(2, repeat("b", 10000));
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
begin;
|
||||
update worklog5743_1 set a1 = 1000;
|
||||
update worklog5743_2 set a1 = 1000;
|
||||
|
@ -225,33 +206,25 @@ update worklog5743_4 set a1 = 1000;
|
|||
select a1, left(a2, 20) from worklog5743_1;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743_1 NULL ref idx6 idx6 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743_1`.`a1` AS `a1`,left(`test`.`worklog5743_1`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_1` where (`test`.`worklog5743_1`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_1 ref idx6 idx6 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743_2 NULL ref idx6 idx6 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743_2`.`a1` AS `a1`,left(`test`.`worklog5743_2`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_2` where (`test`.`worklog5743_2`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_2 ref idx6 idx6 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743_4 NULL ref idx6 idx6 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743_4`.`a1` AS `a1`,left(`test`.`worklog5743_4`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_4` where (`test`.`worklog5743_4`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_4 ref idx6 idx6 5 const 1
|
||||
select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
|
@ -261,6 +234,7 @@ a1 left(a2, 20)
|
|||
select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
|
@ -271,6 +245,7 @@ select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
|
|||
a1 left(a2, 20)
|
||||
select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743_1;
|
||||
drop table worklog5743_2;
|
||||
|
@ -282,6 +257,7 @@ ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
|||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Error 1071 Specified key was too long; max key length is 768 bytes
|
||||
drop table worklog5743;
|
||||
create table worklog5743(a1 int, a2 varchar(3072)) ROW_FORMAT=DYNAMIC;
|
||||
create index idx1 on worklog5743(a2);
|
||||
|
@ -318,23 +294,24 @@ Level Code Message
|
|||
insert into worklog5743 values(9, repeat("a", 764));
|
||||
begin;
|
||||
update worklog5743 set a1 = 4444;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1 from worklog5743 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743 NULL ref idx1 idx1 5 const 1 100.00 Using index
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx1 idx1 5 const 1 Using index
|
||||
select a1 from worklog5743 where a1 = 9;
|
||||
a1
|
||||
9
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1 from worklog5743 where a1 = 9;
|
||||
a1
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 6 ###
|
||||
|
@ -342,7 +319,7 @@ create table worklog5743(a TEXT not null, primary key (a(1000)));
|
|||
ERROR 42000: Specified key was too long; max key length is 768 bytes
|
||||
create table worklog5743(a TEXT) ROW_FORMAT=COMPACT;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx on worklog5743(a(767));
|
||||
insert into worklog5743 values(repeat("a", 20000));
|
||||
begin;
|
||||
|
@ -351,9 +328,12 @@ update worklog5743 set a = (repeat("x", 25000));
|
|||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
connection con1;
|
||||
select a = repeat("a", 20000) from worklog5743;
|
||||
a = repeat("a", 20000)
|
||||
1
|
||||
disconnect con1;
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
|
@ -362,26 +342,26 @@ select a = repeat("x", 25000) from worklog5743;
|
|||
a = repeat("x", 25000)
|
||||
1
|
||||
1
|
||||
disconnect con2;
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 7 ###
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
|
||||
SET sql_mode= '';
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release
|
||||
create index idx1 on worklog5743(a(769));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 768 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 768 bytes
|
||||
Note 1071 Specified key was too long; max key length is 768 bytes
|
||||
SET sql_mode= default;
|
||||
create index idx2 on worklog5743(a(768));
|
||||
Warnings:
|
||||
Warning 1831 Duplicate index 'idx2' defined on the table 'test.worklog5743'. This is deprecated and will be disallowed in a future release
|
||||
Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1831 Duplicate index 'idx2' defined on the table 'test.worklog5743'. This is deprecated and will be disallowed in a future release
|
||||
Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release
|
||||
show create table worklog5743;
|
||||
Table Create Table
|
||||
worklog5743 CREATE TABLE `worklog5743` (
|
||||
|
@ -393,12 +373,12 @@ insert into worklog5743 values(repeat("a", 768));
|
|||
drop table worklog5743;
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=REDUNDANT;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx2 on worklog5743(a(767));
|
||||
drop table worklog5743;
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=COMPACT;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx2 on worklog5743(a(767));
|
||||
drop table worklog5743;
|
||||
SET GLOBAL innodb_file_per_table=1;
|
||||
|
|
|
@ -7,26 +7,26 @@ Level Code Message
|
|||
insert into worklog5743 values(repeat("a", 20000));
|
||||
update worklog5743 set a = (repeat("b", 16000));
|
||||
SET sql_mode= '';
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release
|
||||
create index idx on worklog5743(a(2000));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
SET sql_mode= default;
|
||||
begin;
|
||||
update worklog5743 set a = (repeat("x", 17000));
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
connect con1,localhost,root,,;
|
||||
select a = repeat("x", 17000) from worklog5743;
|
||||
a = repeat("x", 17000)
|
||||
0
|
||||
select a = repeat("b", 16000) from worklog5743;
|
||||
a = repeat("b", 16000)
|
||||
1
|
||||
connect con2,localhost,root,,;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
|
@ -34,6 +34,7 @@ READ-UNCOMMITTED
|
|||
select a = repeat("x", 17000) from worklog5743;
|
||||
a = repeat("x", 17000)
|
||||
1
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 2 ###
|
||||
|
@ -46,23 +47,24 @@ Level Code Message
|
|||
insert into worklog5743 values(9, repeat("a", 10000));
|
||||
begin;
|
||||
update worklog5743 set a1 = 1000;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1`,(`test`.`worklog5743`.`a2` = repeat('a',10000)) AS `a2 = repeat("a", 10000)` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx idx 5 const 1
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
9 1
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 3 ###
|
||||
|
@ -71,23 +73,24 @@ create index idx on worklog5743(a1, a2(50));
|
|||
insert into worklog5743 values(9, repeat("a", 10000));
|
||||
begin;
|
||||
update worklog5743 set a1 = 1000;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1`,(`test`.`worklog5743`.`a2` = repeat('a',10000)) AS `a2 = repeat("a", 10000)` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx idx 5 const 1
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
9 1
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 4 ###
|
||||
|
@ -95,22 +98,12 @@ create table worklog5743_1(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=1;
|
|||
create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
|
||||
create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
|
||||
create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_1(a2(4000));
|
||||
ERROR 42000: Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_1(a2(4000));
|
||||
ERROR 42000: Specified key was too long; max key length is 1536 bytes
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx3 on worklog5743_1(a2(436));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
|
@ -127,26 +120,11 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
|
|||
create index idx6 on worklog5743_1(a1, a2(428));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET sql_mode= '';
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release
|
||||
create index idx1 on worklog5743_2(a2(4000));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_2(a2(4000));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx3 on worklog5743_2(a2(948));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
|
@ -164,30 +142,18 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
|
|||
create index idx6 on worklog5743_2(a1, a2(940));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_4(a2(4000));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx3 on worklog5743_4(a2(1537));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
create index idx4 on worklog5743_4(a2(1536));
|
||||
Warnings:
|
||||
Warning 1831 Duplicate index 'idx4' defined on the table 'test.worklog5743_4'. This is deprecated and will be disallowed in a future release
|
||||
Note 1831 Duplicate index `idx4`. This is deprecated and will be disallowed in a future release
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1831 Duplicate index 'idx4' defined on the table 'test.worklog5743_4'. This is deprecated and will be disallowed in a future release
|
||||
Note 1831 Duplicate index `idx4`. This is deprecated and will be disallowed in a future release
|
||||
create index idx5 on worklog5743_4(a1, a2(1533));
|
||||
ERROR 42000: Specified key was too long; max key length is 1536 bytes
|
||||
show warnings;
|
||||
|
@ -196,30 +162,18 @@ Error 1071 Specified key was too long; max key length is 1536 bytes
|
|||
create index idx6 on worklog5743_4(a1, a2(1532));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_8(a2(1000));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_8(a2(3073));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
create index idx3 on worklog5743_8(a2(3072));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
create index idx4 on worklog5743_8(a1, a2(1533));
|
||||
ERROR 42000: Specified key was too long; max key length is 1536 bytes
|
||||
show warnings;
|
||||
|
@ -233,32 +187,18 @@ insert into worklog5743_1 values(9, repeat("a", 10000));
|
|||
insert into worklog5743_2 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_4 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
insert into worklog5743_1 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_2 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_4 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_8;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
begin;
|
||||
update worklog5743_1 set a1 = 1000;
|
||||
update worklog5743_2 set a1 = 1000;
|
||||
|
@ -267,42 +207,31 @@ update worklog5743_8 set a1 = 1000;
|
|||
select a1, left(a2, 20) from worklog5743_1;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_8;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743_1 NULL ref idx6 idx6 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743_1`.`a1` AS `a1`,left(`test`.`worklog5743_1`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_1` where (`test`.`worklog5743_1`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_1 ref idx6 idx6 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743_2 NULL ref idx6 idx6 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743_2`.`a1` AS `a1`,left(`test`.`worklog5743_2`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_2` where (`test`.`worklog5743_2`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_2 ref idx6 idx6 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743_4 NULL ref idx6 idx6 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743_4`.`a1` AS `a1`,left(`test`.`worklog5743_4`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_4` where (`test`.`worklog5743_4`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_4 ref idx6 idx6 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743_8 NULL ref idx5 idx5 5 const 1 100.00 NULL
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743_8`.`a1` AS `a1`,left(`test`.`worklog5743_8`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_8` where (`test`.`worklog5743_8`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_8 ref idx5 idx5 5 const 1
|
||||
select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
|
@ -315,6 +244,7 @@ a1 left(a2, 20)
|
|||
select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
|
@ -327,6 +257,7 @@ select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
|||
a1 left(a2, 20)
|
||||
select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743_1;
|
||||
drop table worklog5743_2;
|
||||
|
@ -363,31 +294,32 @@ insert into worklog5743 values(9, repeat("a", 1532));
|
|||
update worklog5743 set a1 = 1000;
|
||||
begin;
|
||||
update worklog5743 set a1 = 1000;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1 from worklog5743 where a1 = 9;
|
||||
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE worklog5743 NULL ref idx1 idx1 5 const 1 100.00 Using index
|
||||
Warnings:
|
||||
Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx1 idx1 5 const 1 Using index
|
||||
select a1 from worklog5743 where a1 = 9;
|
||||
a1
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1 from worklog5743 where a1 = 9;
|
||||
a1
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 6 ###
|
||||
create table worklog5743(a TEXT not null, primary key (a(1000)))
|
||||
row_format=compact;
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create table worklog5743(a TEXT) row_format=compact;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx on worklog5743(a(767));
|
||||
insert into worklog5743 values(repeat("a", 20000));
|
||||
begin;
|
||||
|
@ -396,9 +328,12 @@ update worklog5743 set a = (repeat("x", 25000));
|
|||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
connection con1;
|
||||
select a = repeat("a", 20000) from worklog5743;
|
||||
a = repeat("a", 20000)
|
||||
1
|
||||
disconnect con1;
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
|
@ -407,19 +342,19 @@ select a = repeat("x", 25000) from worklog5743;
|
|||
a = repeat("x", 25000)
|
||||
1
|
||||
1
|
||||
disconnect con2;
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 7 ###
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
|
||||
SET sql_mode= '';
|
||||
Warnings:
|
||||
Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release
|
||||
create index idx1 on worklog5743(a(3073));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
create index idx2 on worklog5743(a(3072));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1536 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1536 bytes
|
||||
SET sql_mode= default;
|
||||
show create table worklog5743;
|
||||
Table Create Table
|
||||
|
@ -431,12 +366,12 @@ worklog5743 CREATE TABLE `worklog5743` (
|
|||
drop table worklog5743;
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=REDUNDANT;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx2 on worklog5743(a(767));
|
||||
drop table worklog5743;
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=COMPACT;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx2 on worklog5743(a(767));
|
||||
drop table worklog5743;
|
||||
SET GLOBAL innodb_file_per_table=1;
|
||||
|
|
|
@ -7,9 +7,6 @@ table_name row_format data_length index_length
|
|||
SET @save_innodb_stats_on_metadata=@@global.innodb_stats_on_metadata;
|
||||
set session innodb_strict_mode=0;
|
||||
set global innodb_file_per_table=off;
|
||||
set global innodb_file_format=`0`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET @@global.innodb_stats_on_metadata=ON;
|
||||
create table t0(a int primary key) engine=innodb row_format=compressed;
|
||||
Warnings:
|
||||
|
@ -19,7 +16,6 @@ create table t00(a int primary key) engine=innodb
|
|||
key_block_size=4 row_format=compressed;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
|
||||
|
@ -29,23 +25,17 @@ create table t3(a int primary key) engine=innodb row_format=compact;
|
|||
create table t4(a int primary key) engine=innodb key_block_size=9;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9.
|
||||
create table t5(a int primary key) engine=innodb
|
||||
key_block_size=1 row_format=redundant;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
|
||||
set global innodb_file_per_table=on;
|
||||
create table t6(a int primary key) engine=innodb
|
||||
key_block_size=1 row_format=redundant;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
|
||||
set global innodb_file_format=`1`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
|
||||
create table t7(a int primary key) engine=innodb
|
||||
key_block_size=1 row_format=redundant;
|
||||
Warnings:
|
||||
|
@ -159,40 +149,7 @@ count(*)
|
|||
1
|
||||
update t1 set c3 = repeat('E', 20000) where c1 = 1;
|
||||
drop table t1;
|
||||
set global innodb_file_format=`0`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select @@innodb_file_format;
|
||||
@@innodb_file_format
|
||||
Antelope
|
||||
set global innodb_file_format=`1`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select @@innodb_file_format;
|
||||
@@innodb_file_format
|
||||
Barracuda
|
||||
set global innodb_file_format=`2`;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '2'
|
||||
set global innodb_file_format=`-1`;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '-1'
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_format=`Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_format=`Cheetah`;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'Cheetah'
|
||||
set global innodb_file_format=`abc`;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'abc'
|
||||
set global innodb_file_format=`1a`;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '1a'
|
||||
set global innodb_file_format=``;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of ''
|
||||
set global innodb_file_per_table = on;
|
||||
set global innodb_file_format = `1`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set innodb_strict_mode = off;
|
||||
create table t1 (id int primary key) engine = innodb key_block_size = 0;
|
||||
drop table t1;
|
||||
|
@ -325,84 +282,4 @@ mysqltest_innodb_zip t7 Dynamic {valid} 0
|
|||
mysqltest_innodb_zip t8 Compact {valid} 0
|
||||
mysqltest_innodb_zip t9 Redundant {valid} 0
|
||||
drop table t7, t8, t9;
|
||||
set global innodb_file_per_table = on;
|
||||
set global innodb_file_format = `0`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create table t1 (id int primary key) engine = innodb key_block_size = 1;
|
||||
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t1` (errno: 140 "Wrong create options")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `mysqltest_innodb_zip`.`t1` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
create table t2 (id int primary key) engine = innodb key_block_size = 2;
|
||||
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
create table t3 (id int primary key) engine = innodb key_block_size = 4;
|
||||
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
create table t6 (id int primary key) engine = innodb row_format = compressed;
|
||||
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t6` (errno: 140 "Wrong create options")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `mysqltest_innodb_zip`.`t6` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
create table t7 (id int primary key) engine = innodb row_format = dynamic;
|
||||
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t7` (errno: 140 "Wrong create options")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table `mysqltest_innodb_zip`.`t7` (errno: 140 "Wrong create options")
|
||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||
create table t8 (id int primary key) engine = innodb row_format = compact;
|
||||
create table t9 (id int primary key) engine = innodb row_format = redundant;
|
||||
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
|
||||
table_schema table_name row_format data_length index_length
|
||||
mysqltest_innodb_zip t8 Compact {valid} 0
|
||||
mysqltest_innodb_zip t9 Redundant {valid} 0
|
||||
drop table t8, t9;
|
||||
set global innodb_file_per_table=1;
|
||||
set global innodb_file_format=Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_per_table=on;
|
||||
set global innodb_file_format=`Barracuda`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_format_max=`Antelope`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create table normal_table (
|
||||
c1 int
|
||||
) engine = innodb;
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Barracuda
|
||||
create table zip_table (
|
||||
c1 int
|
||||
) engine = innodb key_block_size = 4;
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Barracuda
|
||||
set global innodb_file_format_max=`Antelope`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Antelope
|
||||
show table status;
|
||||
select @@innodb_file_format_max;
|
||||
@@innodb_file_format_max
|
||||
Barracuda
|
||||
drop table normal_table, zip_table;
|
||||
DROP DATABASE mysqltest_innodb_zip;
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
set global innodb_file_per_table=on;
|
||||
set global innodb_file_format=`1`;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create table t1(a text) engine=innodb key_block_size=8;
|
||||
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
|
||||
page_size
|
||||
|
@ -14,5 +11,3 @@ create table t2(a text) engine=innodb;
|
|||
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
|
||||
page_size
|
||||
drop table t2;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
|
|
|
@ -1,538 +0,0 @@
|
|||
SET default_storage_engine=InnoDB;
|
||||
call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_strict_mode=1;
|
||||
### Test 1 ###
|
||||
create table worklog5743(a TEXT not null, primary key (a(1000))) ROW_FORMAT=DYNAMIC;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
insert into worklog5743 values(repeat("a", 20000));
|
||||
update worklog5743 set a = (repeat("b", 16000));
|
||||
create index idx on worklog5743(a(2000));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
begin;
|
||||
update worklog5743 set a = (repeat("x", 17000));
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
connect con1,localhost,root,,;
|
||||
select a = repeat("x", 17000) from worklog5743;
|
||||
a = repeat("x", 17000)
|
||||
0
|
||||
select a = repeat("b", 16000) from worklog5743;
|
||||
a = repeat("b", 16000)
|
||||
1
|
||||
connect con2,localhost,root,,;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a = repeat("x", 17000) from worklog5743;
|
||||
a = repeat("x", 17000)
|
||||
1
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 2 ###
|
||||
create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
create index idx on worklog5743(a1, a2(2000));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
insert into worklog5743 values(9, repeat("a", 10000));
|
||||
begin;
|
||||
update worklog5743 set a1 = 1000;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx idx 5 const 1
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
9 1
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 3 ###
|
||||
create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
|
||||
create index idx on worklog5743(a1, a2(50));
|
||||
insert into worklog5743 values(9, repeat("a", 10000));
|
||||
begin;
|
||||
update worklog5743 set a1 = 1000;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx idx 5 const 1
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
9 1
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
a1 a2 = repeat("a", 10000)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 4 ###
|
||||
create table worklog5743_1(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=1;
|
||||
create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
|
||||
create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
|
||||
create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
|
||||
create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
|
||||
set sql_mode='';
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_1(a2(4000));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_1(a2(4000));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx3 on worklog5743_1(a2(436));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx4 on worklog5743_1(a2(434));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
create index idx5 on worklog5743_1(a1, a2(430));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx6 on worklog5743_1(a1, a2(428));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_2(a2(4000));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_2(a2(4000));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx3 on worklog5743_2(a2(948));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx4 on worklog5743_2(a2(946));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
create index idx5 on worklog5743_2(a1, a2(942));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx6 on worklog5743_2(a1, a2(940));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_4(a2(4000));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_4(a2(4000));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx3 on worklog5743_4(a2(1972));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx4 on worklog5743_4(a2(1970));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
create index idx5 on worklog5743_4(a1, a2(1966));
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
|
||||
create index idx6 on worklog5743_4(a1, a2(1964));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_8(a2(1000));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_8(a2(3073));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx3 on worklog5743_8(a2(3072));
|
||||
Warnings:
|
||||
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
|
||||
create index idx4 on worklog5743_8(a1, a2(3069));
|
||||
ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx5 on worklog5743_8(a1, a2(3068));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
create index idx6 on worklog5743_8(a1, a2(2000), a3(1069));
|
||||
ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx7 on worklog5743_8(a1, a2(2000), a3(1068));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx1 on worklog5743_16(a2(1000));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 767 bytes
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
create index idx2 on worklog5743_16(a2(3073));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx3 on worklog5743_16(a2(3072));
|
||||
Warnings:
|
||||
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Note 1831 Duplicate index `idx3`. This is deprecated and will be disallowed in a future release
|
||||
create index idx4 on worklog5743_16(a1, a2(3069));
|
||||
ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx5 on worklog5743_16(a1, a2(3068));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
create index idx6 on worklog5743_16(a1, a2(2000), a3(1069));
|
||||
ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx7 on worklog5743_16(a1, a2(2000), a3(1068));
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set sql_mode=default;
|
||||
insert into worklog5743_1 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_2 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_4 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
|
||||
insert into worklog5743_16 values(9, repeat("a", 10000), repeat("a", 10000));
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
insert into worklog5743_1 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_2 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_4 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
|
||||
insert into worklog5743_16 values(2, repeat("b", 10000), repeat("b", 10000));
|
||||
set global innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_8;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_16;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
2 bbbbbbbbbbbbbbbbbbbb
|
||||
begin;
|
||||
update worklog5743_1 set a1 = 1000;
|
||||
update worklog5743_2 set a1 = 1000;
|
||||
update worklog5743_4 set a1 = 1000;
|
||||
update worklog5743_8 set a1 = 1000;
|
||||
update worklog5743_16 set a1 = 1000;
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_8;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
select a1, left(a2, 20) from worklog5743_16;
|
||||
a1 left(a2, 20)
|
||||
1000 aaaaaaaaaaaaaaaaaaaa
|
||||
1000 bbbbbbbbbbbbbbbbbbbb
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_1 ref idx6 idx6 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_2 ref idx6 idx6 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_4 ref idx6 idx6 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_8 ref idx5,idx7 idx5 5 const 1
|
||||
explain select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743_16 ref idx5,idx7 idx5 5 const 1
|
||||
select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
9 aaaaaaaaaaaaaaaaaaaa
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
|
||||
a1 left(a2, 20)
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743_1;
|
||||
drop table worklog5743_2;
|
||||
drop table worklog5743_4;
|
||||
drop table worklog5743_8;
|
||||
drop table worklog5743_16;
|
||||
### Test 5 ###
|
||||
create table worklog5743(a1 int,
|
||||
a2 varchar(20000),
|
||||
a3 varchar(3073),
|
||||
a4 varchar(3072),
|
||||
a5 varchar(3069),
|
||||
a6 varchar(3068))
|
||||
ROW_FORMAT=DYNAMIC;
|
||||
set sql_mode='';
|
||||
create index idx1 on worklog5743(a2);
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx2 on worklog5743(a3);
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx3 on worklog5743(a4);
|
||||
show warnings;
|
||||
Level Code Message
|
||||
create index idx4 on worklog5743(a1, a2);
|
||||
ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx5 on worklog5743(a1, a5);
|
||||
ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx6 on worklog5743(a1, a6);
|
||||
show warnings;
|
||||
Level Code Message
|
||||
show create table worklog5743;
|
||||
Table Create Table
|
||||
worklog5743 CREATE TABLE `worklog5743` (
|
||||
`a1` int(11) DEFAULT NULL,
|
||||
`a2` varchar(20000) DEFAULT NULL,
|
||||
`a3` varchar(3073) DEFAULT NULL,
|
||||
`a4` varchar(3072) DEFAULT NULL,
|
||||
`a5` varchar(3069) DEFAULT NULL,
|
||||
`a6` varchar(3068) DEFAULT NULL,
|
||||
KEY `idx1` (`a2`(3072)),
|
||||
KEY `idx2` (`a3`(3072)),
|
||||
KEY `idx3` (`a4`),
|
||||
KEY `idx6` (`a1`,`a6`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
|
||||
set sql_mode=default;
|
||||
insert into worklog5743 values(9,
|
||||
repeat("a", 20000), repeat("a", 3073),
|
||||
repeat("a", 3072), repeat("a", 3069),
|
||||
repeat("a", 3068));
|
||||
begin;
|
||||
update worklog5743 set a1 = 1000;
|
||||
connection con1;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
explain select a1 from worklog5743 where a1 = 9;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE worklog5743 ref idx6 idx6 5 const 1 Using index
|
||||
select a1 from worklog5743 where a1 = 9;
|
||||
a1
|
||||
9
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a1 from worklog5743 where a1 = 9;
|
||||
a1
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 6 ###
|
||||
create table worklog5743(a TEXT not null, primary key (a(1000))) row_format=COMPACT;
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create table worklog5743(a TEXT) row_format=COMPACT;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx on worklog5743(a(767));
|
||||
insert into worklog5743 values(repeat("a", 20000));
|
||||
begin;
|
||||
insert into worklog5743 values(repeat("b", 20000));
|
||||
update worklog5743 set a = (repeat("x", 25000));
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
REPEATABLE-READ
|
||||
connection con1;
|
||||
select a = repeat("a", 20000) from worklog5743;
|
||||
a = repeat("a", 20000)
|
||||
1
|
||||
disconnect con1;
|
||||
connection con2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
@@session.tx_isolation
|
||||
READ-UNCOMMITTED
|
||||
select a = repeat("x", 25000) from worklog5743;
|
||||
a = repeat("x", 25000)
|
||||
1
|
||||
1
|
||||
disconnect con2;
|
||||
connection default;
|
||||
rollback;
|
||||
drop table worklog5743;
|
||||
### Test 7 ###
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
|
||||
set statement sql_mode = '' for
|
||||
create index idx1 on worklog5743(a(3073));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx2 on worklog5743(a(3072));
|
||||
Warnings:
|
||||
Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release
|
||||
show create table worklog5743;
|
||||
Table Create Table
|
||||
worklog5743 CREATE TABLE `worklog5743` (
|
||||
`a` text NOT NULL,
|
||||
KEY `idx1` (`a`(3072)),
|
||||
KEY `idx2` (`a`(3072))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
|
||||
drop table worklog5743;
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=REDUNDANT;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx2 on worklog5743(a(767));
|
||||
drop table worklog5743;
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=COMPACT;
|
||||
create index idx on worklog5743(a(768));
|
||||
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
|
||||
create index idx2 on worklog5743(a(767));
|
||||
drop table worklog5743;
|
||||
SET GLOBAL innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SET GLOBAL innodb_strict_mode = DEFAULT;
|
|
@ -109,9 +109,6 @@ drop table t2;
|
|||
drop table t3;
|
||||
drop procedure populate;
|
||||
drop procedure populate_small;
|
||||
set global innodb_file_format = Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_per_table = 1;
|
||||
set innodb_strict_mode=OFF;
|
||||
create procedure populate()
|
||||
|
@ -222,9 +219,6 @@ drop table t2;
|
|||
drop table t3;
|
||||
drop procedure populate;
|
||||
drop procedure populate_small;
|
||||
set global innodb_file_format = Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_per_table = 1;
|
||||
set innodb_strict_mode=OFF;
|
||||
create procedure populate()
|
||||
|
@ -339,7 +333,4 @@ drop table t2;
|
|||
drop table t3;
|
||||
drop procedure populate;
|
||||
drop procedure populate_small;
|
||||
set global innodb_file_format = Barracuda;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
set global innodb_file_per_table = 1;
|
||||
|
|
|
@ -298,15 +298,6 @@ SHOW WARNINGS;
|
|||
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
SET GLOBAL innodb_file_format = `Antelope`;
|
||||
--error ER_ILLEGAL_HA,1005
|
||||
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
|
||||
SHOW WARNINGS;
|
||||
--error ER_ILLEGAL_HA,1005
|
||||
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
|
||||
|
||||
--echo # Test 7) This series of tests were moved from innodb-index to here
|
||||
--echo # because the second alter table t1 assumes a 16k page size.
|
||||
|
|
|
@ -247,15 +247,6 @@ SHOW WARNINGS;
|
|||
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
SET GLOBAL innodb_file_format = `Antelope`;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
|
||||
SHOW WARNINGS;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
|
||||
|
||||
--echo # Test 7) Not included here; 16k only
|
||||
|
||||
|
|
|
@ -264,15 +264,6 @@ SHOW WARNINGS;
|
|||
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
SET GLOBAL innodb_file_format = `Antelope`;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
|
||||
SHOW WARNINGS;
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
|
||||
|
||||
--echo # Test 7) Not included here; 16k only
|
||||
|
||||
|
|
|
@ -36,8 +36,7 @@
|
|||
# 4) KEY_BLOCK_SIZE=1,2,4,8 & 16 are incompatible with COMPACT, DYNAMIC &
|
||||
# REDUNDANT.
|
||||
# 5) KEY_BLOCK_SIZE=1,2,4,8 & 16 as well as ROW_FORMAT=COMPRESSED
|
||||
# are incompatible with innodb_file_format=Antelope
|
||||
# and innodb_file_per_table=OFF
|
||||
# are incompatible with innodb_file_per_table=OFF
|
||||
# 6) KEY_BLOCK_SIZE on an ALTER must occur with ROW_FORMAT=COMPRESSED
|
||||
# or ROW_FORMAT=DEFAULT if the ROW_FORMAT was previously specified
|
||||
# as COMPACT, DYNAMIC or REDUNDANT.
|
||||
|
@ -49,7 +48,7 @@
|
|||
# 2. Ignore a bad ROW_FORMAT, defaulting to COMPACT.
|
||||
# 3. Ignore a valid KEY_BLOCK_SIZE when an incompatible but valid
|
||||
# ROW_FORMAT is specified.
|
||||
# 4. If innodb_file_format=Antelope or innodb_file_per_table=OFF
|
||||
# 4. If innodb_file_per_table=OFF
|
||||
# it will ignore ROW_FORMAT=COMPRESSED and non-zero KEY_BLOCK_SIZEs.
|
||||
#
|
||||
# See InnoDB documentation page "SQL Compression Syntax Warnings and Errors"
|
||||
|
@ -61,13 +60,9 @@
|
|||
-- source include/have_innodb_zip.inc
|
||||
SET default_storage_engine=InnoDB;
|
||||
|
||||
--disable_query_log
|
||||
# These values can change during the test
|
||||
LET $innodb_file_format_orig=`select @@innodb_file_format`;
|
||||
LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
|
||||
--enable_query_log
|
||||
|
||||
SET GLOBAL innodb_file_format=`Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
|
||||
# The first half of these tests are with strict mode ON.
|
||||
|
@ -216,40 +211,9 @@ CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9;
|
|||
SHOW WARNINGS;
|
||||
|
||||
--echo # Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
|
||||
--echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope
|
||||
--echo # and that they can be set to default values during strict mode.
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
--error ER_ILLEGAL_HA,1005
|
||||
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4;
|
||||
SHOW WARNINGS;
|
||||
--error ER_ILLEGAL_HA,1005
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
|
||||
SHOW WARNINGS;
|
||||
--error 1005
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
|
||||
SHOW WARNINGS;
|
||||
--error ER_ILLEGAL_HA_CREATE_OPTION
|
||||
ALTER TABLE t1 KEY_BLOCK_SIZE=2;
|
||||
SHOW WARNINGS;
|
||||
--error ER_ILLEGAL_HA_CREATE_OPTION
|
||||
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
|
||||
SHOW WARNINGS;
|
||||
--error ER_ILLEGAL_HA_CREATE_OPTION
|
||||
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
DROP TABLE t1;
|
||||
--echo # and a valid non-zero KEY_BLOCK_SIZE
|
||||
--echo # can be set to default values during strict mode.
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
SHOW CREATE TABLE t1;
|
||||
SHOW WARNINGS;
|
||||
|
@ -257,7 +221,6 @@ ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
|
|||
SHOW WARNINGS;
|
||||
ALTER TABLE t1 ADD COLUMN f2 INT;
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
|
||||
--echo # Test 8) StrictMode=ON, Make sure ROW_FORMAT=COMPRESSED
|
||||
--echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with
|
||||
|
@ -466,18 +429,14 @@ CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15;
|
|||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
|
||||
--echo # Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
|
||||
--echo valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT
|
||||
--echo is reverted to Antelope and then used again when ROW_FORMAT=Barracuda.
|
||||
--echo # Test 15) StrictMode=OFF.
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
ALTER TABLE t1 ADD COLUMN f2 INT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
|
@ -485,11 +444,9 @@ DROP TABLE t1;
|
|||
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
ALTER TABLE t1 ADD COLUMN f1 INT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
ALTER TABLE t1 ADD COLUMN f2 INT;
|
||||
SHOW WARNINGS;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
|
||||
|
@ -527,6 +484,5 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
|
|||
DROP TABLE t1;
|
||||
|
||||
--disable_query_log
|
||||
EVAL SET GLOBAL innodb_file_format=$innodb_file_format_orig;
|
||||
EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
|
||||
--enable_query_log
|
||||
|
|
|
@ -137,11 +137,6 @@ create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
|
|||
# See page_zip_empty_size() and Bug #47495 for more detail.
|
||||
|
||||
# Test edge cases for indexes using key_block_size=1
|
||||
set global innodb_large_prefix=0;
|
||||
-- error ER_TOO_LONG_KEY,1118
|
||||
create index idx1 on worklog5743_1(a2(4000));
|
||||
show warnings;
|
||||
set global innodb_large_prefix=1;
|
||||
-- error ER_TOO_LONG_KEY,1118
|
||||
create index idx2 on worklog5743_1(a2(4000));
|
||||
show warnings;
|
||||
|
@ -159,12 +154,6 @@ create index idx6 on worklog5743_1(a1, a2(428));
|
|||
show warnings;
|
||||
|
||||
# Test edge cases for indexes using key_block_size=2
|
||||
set global innodb_large_prefix=0;
|
||||
# Check index creation behavior without STRICT mode
|
||||
SET sql_mode= '';
|
||||
create index idx1 on worklog5743_2(a2(4000));
|
||||
show warnings;
|
||||
set global innodb_large_prefix=1;
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create index idx2 on worklog5743_2(a2(4000));
|
||||
show warnings;
|
||||
|
@ -182,10 +171,6 @@ create index idx6 on worklog5743_2(a1, a2(940));
|
|||
show warnings;
|
||||
|
||||
# Test edge cases for indexes using key_block_size=4
|
||||
set global innodb_large_prefix=0;
|
||||
create index idx1 on worklog5743_4(a2(4000));
|
||||
show warnings;
|
||||
set global innodb_large_prefix=1;
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create index idx2 on worklog5743_4(a2(4000));
|
||||
show warnings;
|
||||
|
@ -203,10 +188,6 @@ create index idx6 on worklog5743_4(a1, a2(1964));
|
|||
show warnings;
|
||||
|
||||
# Test edge cases for indexes using key_block_size=8
|
||||
set global innodb_large_prefix=0;
|
||||
create index idx1 on worklog5743_8(a2(1000));
|
||||
show warnings;
|
||||
set global innodb_large_prefix=1;
|
||||
create index idx2 on worklog5743_8(a2(3073));
|
||||
show warnings;
|
||||
create index idx3 on worklog5743_8(a2(3072));
|
||||
|
@ -223,10 +204,6 @@ create index idx7 on worklog5743_8(a1, a2(2000), a3(1068));
|
|||
show warnings;
|
||||
|
||||
# Test edge cases for indexes using key_block_size=16
|
||||
set global innodb_large_prefix=0;
|
||||
create index idx1 on worklog5743_16(a2(1000));
|
||||
show warnings;
|
||||
set global innodb_large_prefix=1;
|
||||
create index idx2 on worklog5743_16(a2(3073));
|
||||
show warnings;
|
||||
create index idx3 on worklog5743_16(a2(3072));
|
||||
|
@ -250,16 +227,6 @@ insert into worklog5743_4 values(9, repeat("a", 10000));
|
|||
insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
|
||||
insert into worklog5743_16 values(9, repeat("a", 10000), repeat("a", 10000));
|
||||
|
||||
# Now if we change the global innodb_large_prefix back to 767,
|
||||
# updates to these indexes should still be allowed.
|
||||
set global innodb_large_prefix=0;
|
||||
insert into worklog5743_1 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_2 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_4 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
|
||||
insert into worklog5743_16 values(2, repeat("b", 10000), repeat("b", 10000));
|
||||
set global innodb_large_prefix=1;
|
||||
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
|
|
|
@ -136,8 +136,7 @@ create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
|
|||
# See page_zip_empty_size() and Bug #47495 for more detail.
|
||||
|
||||
# Test edge cases for indexes using key_block_size=1
|
||||
set global innodb_large_prefix=0;
|
||||
-- error ER_TOO_LONG_KEY
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create index idx1 on worklog5743_1(a2(4000));
|
||||
show warnings;
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
|
@ -154,7 +153,6 @@ create index idx6 on worklog5743_1(a1, a2(428));
|
|||
show warnings;
|
||||
|
||||
# Test edge cases for indexes using key_block_size=2
|
||||
set global innodb_large_prefix=1;
|
||||
SET sql_mode= '';
|
||||
create index idx1 on worklog5743_2(a2(4000));
|
||||
show warnings;
|
||||
|
@ -169,7 +167,6 @@ show warnings;
|
|||
create index idx6 on worklog5743_2(a1, a2(764));
|
||||
show warnings;
|
||||
# Test edge cases for indexes using key_block_size=4
|
||||
set global innodb_large_prefix=0;
|
||||
create index idx1 on worklog5743_4(a2(4000));
|
||||
show warnings;
|
||||
show create table worklog5743_4;
|
||||
|
@ -188,14 +185,6 @@ insert into worklog5743_1 values(9, repeat("a", 10000));
|
|||
insert into worklog5743_2 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_4 values(9, repeat("a", 10000));
|
||||
|
||||
# Now if we change the global innodb_large_prefix back to 767,
|
||||
# updates to these indexes should still be allowed.
|
||||
set global innodb_large_prefix=0;
|
||||
insert into worklog5743_1 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_2 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_4 values(2, repeat("b", 10000));
|
||||
set global innodb_large_prefix=1;
|
||||
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
|
|
|
@ -138,12 +138,7 @@ create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
|
|||
# See page_zip_empty_size() and Bug #47495 for more detail.
|
||||
|
||||
# Test edge cases for indexes using key_block_size=1
|
||||
set global innodb_large_prefix=0;
|
||||
-- error ER_TOO_LONG_KEY
|
||||
create index idx1 on worklog5743_1(a2(4000));
|
||||
show warnings;
|
||||
set global innodb_large_prefix=1;
|
||||
-- error ER_TOO_LONG_KEY
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create index idx2 on worklog5743_1(a2(4000));
|
||||
show warnings;
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
|
@ -160,11 +155,6 @@ create index idx6 on worklog5743_1(a1, a2(428));
|
|||
show warnings;
|
||||
|
||||
# Test edge cases for indexes using key_block_size=2
|
||||
set global innodb_large_prefix=0;
|
||||
SET sql_mode= '';
|
||||
create index idx1 on worklog5743_2(a2(4000));
|
||||
show warnings;
|
||||
set global innodb_large_prefix=1;
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create index idx2 on worklog5743_2(a2(4000));
|
||||
show warnings;
|
||||
|
@ -182,10 +172,6 @@ create index idx6 on worklog5743_2(a1, a2(940));
|
|||
show warnings;
|
||||
|
||||
# Test edge cases for indexes using key_block_size=4
|
||||
set global innodb_large_prefix=0;
|
||||
create index idx1 on worklog5743_4(a2(4000));
|
||||
show warnings;
|
||||
set global innodb_large_prefix=1;
|
||||
create index idx3 on worklog5743_4(a2(1537));
|
||||
show warnings;
|
||||
create index idx4 on worklog5743_4(a2(1536));
|
||||
|
@ -197,10 +183,6 @@ create index idx6 on worklog5743_4(a1, a2(1532));
|
|||
show warnings;
|
||||
|
||||
# Test edge cases for indexes using key_block_size=8
|
||||
set global innodb_large_prefix=0;
|
||||
create index idx1 on worklog5743_8(a2(1000));
|
||||
show warnings;
|
||||
set global innodb_large_prefix=1;
|
||||
create index idx2 on worklog5743_8(a2(3073));
|
||||
show warnings;
|
||||
create index idx3 on worklog5743_8(a2(3072));
|
||||
|
@ -218,15 +200,6 @@ insert into worklog5743_2 values(9, repeat("a", 10000));
|
|||
insert into worklog5743_4 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
|
||||
|
||||
# Now if we change the global innodb_large_prefix back to 767,
|
||||
# updates to these indexes should still be allowed.
|
||||
set global innodb_large_prefix=0;
|
||||
insert into worklog5743_1 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_2 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_4 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
|
||||
set global innodb_large_prefix=1;
|
||||
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
|
|
|
@ -7,17 +7,12 @@ SELECT table_name, row_format, data_length, index_length
|
|||
WHERE table_schema='mysqltest_innodb_zip';
|
||||
|
||||
let $per_table=`select @@innodb_file_per_table`;
|
||||
let $format=`select @@innodb_file_format`;
|
||||
let $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
|
||||
let $innodb_file_format_orig=`select @@innodb_file_format`;
|
||||
let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
|
||||
SET @save_innodb_stats_on_metadata=@@global.innodb_stats_on_metadata;
|
||||
|
||||
--let $query_i_s = SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql'
|
||||
|
||||
set session innodb_strict_mode=0;
|
||||
set global innodb_file_per_table=off;
|
||||
set global innodb_file_format=`0`;
|
||||
SET @@global.innodb_stats_on_metadata=ON;
|
||||
|
||||
create table t0(a int primary key) engine=innodb row_format=compressed;
|
||||
|
@ -33,7 +28,6 @@ key_block_size=1 row_format=redundant;
|
|||
set global innodb_file_per_table=on;
|
||||
create table t6(a int primary key) engine=innodb
|
||||
key_block_size=1 row_format=redundant;
|
||||
set global innodb_file_format=`1`;
|
||||
create table t7(a int primary key) engine=innodb
|
||||
key_block_size=1 row_format=redundant;
|
||||
create table t8(a int primary key) engine=innodb
|
||||
|
@ -129,34 +123,7 @@ select count(*) from t1 where c4 = repeat('C', 20000);
|
|||
update t1 set c3 = repeat('E', 20000) where c1 = 1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
#
|
||||
# Test innodb_file_format
|
||||
#
|
||||
set global innodb_file_format=`0`;
|
||||
select @@innodb_file_format;
|
||||
set global innodb_file_format=`1`;
|
||||
select @@innodb_file_format;
|
||||
-- error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format=`2`;
|
||||
-- error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format=`-1`;
|
||||
set global innodb_file_format=`Antelope`;
|
||||
set global innodb_file_format=`Barracuda`;
|
||||
-- error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format=`Cheetah`;
|
||||
-- error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format=`abc`;
|
||||
-- error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format=`1a`;
|
||||
-- error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format=``;
|
||||
|
||||
#test strict mode.
|
||||
# this does not work anymore, has been removed from mysqltest
|
||||
# -- enable_errors
|
||||
set global innodb_file_per_table = on;
|
||||
set global innodb_file_format = `1`;
|
||||
|
||||
set innodb_strict_mode = off;
|
||||
create table t1 (id int primary key) engine = innodb key_block_size = 0;
|
||||
|
@ -283,80 +250,12 @@ create table t9 (id int primary key) engine = innodb row_format = redundant;
|
|||
--eval $query_i_s
|
||||
drop table t7, t8, t9;
|
||||
|
||||
#test valid values with innodb_file_format unset
|
||||
set global innodb_file_per_table = on;
|
||||
set global innodb_file_format = `0`;
|
||||
|
||||
--replace_regex / - .*[0-9]*[)]/)/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
create table t1 (id int primary key) engine = innodb key_block_size = 1;
|
||||
--replace_regex / - .*[0-9]*[)]/)/
|
||||
show warnings;
|
||||
--replace_regex / - .*[0-9]*[)]/)/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
create table t2 (id int primary key) engine = innodb key_block_size = 2;
|
||||
--replace_regex / - .*[0-9]*[)]/)/
|
||||
show warnings;
|
||||
--replace_regex / - .*[0-9]*[)]/)/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
create table t3 (id int primary key) engine = innodb key_block_size = 4;
|
||||
show warnings;
|
||||
|
||||
# Tests for key_block_size = 8 and 16 were moved to innodb_16k, innodb_8k
|
||||
# and innodb_4k since they get different warnings with smaller page sizes.
|
||||
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
create table t6 (id int primary key) engine = innodb row_format = compressed;
|
||||
--replace_regex / - .*[0-9]*[)]/)/
|
||||
show warnings;
|
||||
--replace_regex / - .*[0-9]*[)]/)/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
create table t7 (id int primary key) engine = innodb row_format = dynamic;
|
||||
--replace_regex / - .*[0-9]*[)]/)/
|
||||
show warnings;
|
||||
create table t8 (id int primary key) engine = innodb row_format = compact;
|
||||
create table t9 (id int primary key) engine = innodb row_format = redundant;
|
||||
|
||||
--replace_result 16384 {valid} 8192 {valid} 4096 {valid}
|
||||
--eval $query_i_s
|
||||
drop table t8, t9;
|
||||
|
||||
eval set global innodb_file_per_table=$per_table;
|
||||
eval set global innodb_file_format=$format;
|
||||
#
|
||||
# Testing of tablespace tagging
|
||||
#
|
||||
-- disable_info
|
||||
set global innodb_file_per_table=on;
|
||||
set global innodb_file_format=`Barracuda`;
|
||||
set global innodb_file_format_max=`Antelope`;
|
||||
create table normal_table (
|
||||
c1 int
|
||||
) engine = innodb;
|
||||
select @@innodb_file_format_max;
|
||||
create table zip_table (
|
||||
c1 int
|
||||
) engine = innodb key_block_size = 4;
|
||||
select @@innodb_file_format_max;
|
||||
set global innodb_file_format_max=`Antelope`;
|
||||
select @@innodb_file_format_max;
|
||||
-- disable_result_log
|
||||
show table status;
|
||||
-- enable_result_log
|
||||
select @@innodb_file_format_max;
|
||||
drop table normal_table, zip_table;
|
||||
-- disable_result_log
|
||||
|
||||
#
|
||||
# restore environment to the state it was before this test execution
|
||||
#
|
||||
|
||||
-- disable_query_log
|
||||
eval set global innodb_file_format=$format;
|
||||
eval set global innodb_file_per_table=$per_table;
|
||||
eval set session innodb_strict_mode=$innodb_strict_mode_orig;
|
||||
eval SET GLOBAL innodb_file_format=$innodb_file_format_orig;
|
||||
eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig;
|
||||
SET @@global.innodb_stats_on_metadata=@save_innodb_stats_on_metadata;
|
||||
--enable_query_log
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
--innodb_large_prefix=ON
|
|
@ -5,13 +5,11 @@
|
|||
-- source include/not_encrypted.inc
|
||||
|
||||
let $per_table=`select @@innodb_file_per_table`;
|
||||
let $format=`select @@innodb_file_format`;
|
||||
|
||||
-- let $query_i_s = SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0
|
||||
|
||||
set global innodb_file_per_table=on;
|
||||
set global innodb_file_format=`1`;
|
||||
|
||||
|
||||
create table t1(a text) engine=innodb key_block_size=8;
|
||||
|
||||
-- disable_query_log
|
||||
|
@ -59,5 +57,4 @@ drop table t2;
|
|||
#
|
||||
|
||||
-- disable_query_log
|
||||
eval set global innodb_file_format=$format;
|
||||
eval set global innodb_file_per_table=$per_table;
|
||||
|
|
|
@ -1,434 +0,0 @@
|
|||
# Testcase for worklog #5743: Lift the limit of index key prefixes
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_innodb_16k.inc
|
||||
SET default_storage_engine=InnoDB;
|
||||
|
||||
call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
|
||||
|
||||
let $innodb_large_prefix_orig=`select @@innodb_large_prefix`;
|
||||
|
||||
set global innodb_large_prefix=1;
|
||||
set global innodb_strict_mode=1;
|
||||
|
||||
-- echo ### Test 1 ###
|
||||
# Create a table of DYNAMIC format, with a primary index of 1000 bytes in
|
||||
# size
|
||||
create table worklog5743(a TEXT not null, primary key (a(1000))) ROW_FORMAT=DYNAMIC;
|
||||
show warnings;
|
||||
|
||||
# Do some insertion and update to excercise the external cache
|
||||
# code path
|
||||
insert into worklog5743 values(repeat("a", 20000));
|
||||
|
||||
# default session, update the table
|
||||
update worklog5743 set a = (repeat("b", 16000));
|
||||
|
||||
# Create a secondary index
|
||||
create index idx on worklog5743(a(2000));
|
||||
show warnings;
|
||||
|
||||
# Start a few sessions to do selections on table being updated in default
|
||||
# session, so it would rebuild the previous version from undo log.
|
||||
# 1) Default session: Initiate an update on the externally stored column
|
||||
# 2) Session con1: Select from table with repeated read
|
||||
# 3) Session con2: Select from table with read uncommitted
|
||||
# 4) Default session: rollback updates
|
||||
|
||||
begin;
|
||||
update worklog5743 set a = (repeat("x", 17000));
|
||||
|
||||
# Start a new session to select the column to force it build
|
||||
# an earlier version of the clustered index through undo log. So it should
|
||||
# just see the result of repeat("b", 16000)
|
||||
select @@session.tx_isolation;
|
||||
--connect (con1,localhost,root,,)
|
||||
select a = repeat("x", 17000) from worklog5743;
|
||||
select a = repeat("b", 16000) from worklog5743;
|
||||
|
||||
# Start another session doing "read uncommitted" query, it
|
||||
# should see the uncommitted update
|
||||
--connect (con2,localhost,root,,)
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
select a = repeat("x", 17000) from worklog5743;
|
||||
|
||||
# Roll back the transaction
|
||||
--connection default
|
||||
rollback;
|
||||
|
||||
drop table worklog5743;
|
||||
|
||||
-- echo ### Test 2 ###
|
||||
# Create a table with only a secondary index has large prefix column
|
||||
create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
|
||||
show warnings;
|
||||
create index idx on worklog5743(a1, a2(2000));
|
||||
show warnings;
|
||||
|
||||
insert into worklog5743 values(9, repeat("a", 10000));
|
||||
|
||||
begin;
|
||||
|
||||
update worklog5743 set a1 = 1000;
|
||||
|
||||
# Do a select from another connection that would use the secondary index
|
||||
--connection con1
|
||||
select @@session.tx_isolation;
|
||||
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
|
||||
# Do read uncommitted in another session, it would show there is no
|
||||
# row with a1 = 9
|
||||
--connection con2
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
|
||||
--connection default
|
||||
rollback;
|
||||
|
||||
drop table worklog5743;
|
||||
|
||||
-- echo ### Test 3 ###
|
||||
# Create a table with a secondary index has small (50 bytes) prefix column
|
||||
create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
|
||||
|
||||
create index idx on worklog5743(a1, a2(50));
|
||||
|
||||
insert into worklog5743 values(9, repeat("a", 10000));
|
||||
|
||||
begin;
|
||||
|
||||
update worklog5743 set a1 = 1000;
|
||||
|
||||
# Do a select from another connection that would use the secondary index
|
||||
--connection con1
|
||||
select @@session.tx_isolation;
|
||||
explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
|
||||
# Do read uncommitted in another session, it would show there is no
|
||||
# row with a1 = 9
|
||||
--connection con2
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
|
||||
|
||||
--connection default
|
||||
rollback;
|
||||
|
||||
drop table worklog5743;
|
||||
|
||||
-- echo ### Test 4 ###
|
||||
# Create compressed tables with each KEY_BLOCK_SIZE.
|
||||
create table worklog5743_1(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=1;
|
||||
create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
|
||||
create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
|
||||
create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
|
||||
create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
|
||||
|
||||
# The maximum overall index record (not prefix) length of a
|
||||
# compressed table is dependent on innodb-page-size (IPS),
|
||||
# key_block_size (KBS) and the number of fields (NF).
|
||||
# "Too big row" error (HA_ERR_TO_BIG_ROW) will be returned if this
|
||||
# limit is exceeded.
|
||||
# See page_zip_empty_size() and Bug #47495 for more detail.
|
||||
|
||||
# Test edge cases for indexes using key_block_size=1
|
||||
set sql_mode='';
|
||||
set global innodb_large_prefix=0;
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create index idx1 on worklog5743_1(a2(4000));
|
||||
show warnings;
|
||||
set global innodb_large_prefix=1;
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create index idx2 on worklog5743_1(a2(4000));
|
||||
show warnings;
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create index idx3 on worklog5743_1(a2(436));
|
||||
show warnings;
|
||||
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
|
||||
create index idx4 on worklog5743_1(a2(434));
|
||||
show warnings;
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create index idx5 on worklog5743_1(a1, a2(430));
|
||||
show warnings;
|
||||
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
|
||||
create index idx6 on worklog5743_1(a1, a2(428));
|
||||
show warnings;
|
||||
|
||||
# Test edge cases for indexes using key_block_size=2
|
||||
set global innodb_large_prefix=0;
|
||||
create index idx1 on worklog5743_2(a2(4000));
|
||||
show warnings;
|
||||
set global innodb_large_prefix=1;
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create index idx2 on worklog5743_2(a2(4000));
|
||||
show warnings;
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create index idx3 on worklog5743_2(a2(948));
|
||||
show warnings;
|
||||
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
|
||||
create index idx4 on worklog5743_2(a2(946));
|
||||
show warnings;
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create index idx5 on worklog5743_2(a1, a2(942));
|
||||
show warnings;
|
||||
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
|
||||
create index idx6 on worklog5743_2(a1, a2(940));
|
||||
show warnings;
|
||||
|
||||
# Test edge cases for indexes using key_block_size=4
|
||||
set global innodb_large_prefix=0;
|
||||
create index idx1 on worklog5743_4(a2(4000));
|
||||
show warnings;
|
||||
set global innodb_large_prefix=1;
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create index idx2 on worklog5743_4(a2(4000));
|
||||
show warnings;
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create index idx3 on worklog5743_4(a2(1972));
|
||||
show warnings;
|
||||
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
|
||||
create index idx4 on worklog5743_4(a2(1970));
|
||||
show warnings;
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create index idx5 on worklog5743_4(a1, a2(1966));
|
||||
show warnings;
|
||||
# Bug#13391353 Limit is one byte less on on 32bit-Linux only
|
||||
create index idx6 on worklog5743_4(a1, a2(1964));
|
||||
show warnings;
|
||||
|
||||
# Test edge cases for indexes using key_block_size=8
|
||||
set global innodb_large_prefix=0;
|
||||
create index idx1 on worklog5743_8(a2(1000));
|
||||
show warnings;
|
||||
set global innodb_large_prefix=1;
|
||||
create index idx2 on worklog5743_8(a2(3073));
|
||||
show warnings;
|
||||
create index idx3 on worklog5743_8(a2(3072));
|
||||
show warnings;
|
||||
-- error ER_TOO_LONG_KEY
|
||||
create index idx4 on worklog5743_8(a1, a2(3069));
|
||||
show warnings;
|
||||
create index idx5 on worklog5743_8(a1, a2(3068));
|
||||
show warnings;
|
||||
-- error ER_TOO_LONG_KEY
|
||||
create index idx6 on worklog5743_8(a1, a2(2000), a3(1069));
|
||||
show warnings;
|
||||
create index idx7 on worklog5743_8(a1, a2(2000), a3(1068));
|
||||
show warnings;
|
||||
|
||||
# Test edge cases for indexes using key_block_size=16
|
||||
set global innodb_large_prefix=0;
|
||||
create index idx1 on worklog5743_16(a2(1000));
|
||||
show warnings;
|
||||
set global innodb_large_prefix=1;
|
||||
create index idx2 on worklog5743_16(a2(3073));
|
||||
show warnings;
|
||||
create index idx3 on worklog5743_16(a2(3072));
|
||||
show warnings;
|
||||
-- error ER_TOO_LONG_KEY
|
||||
create index idx4 on worklog5743_16(a1, a2(3069));
|
||||
show warnings;
|
||||
create index idx5 on worklog5743_16(a1, a2(3068));
|
||||
show warnings;
|
||||
-- error ER_TOO_LONG_KEY
|
||||
create index idx6 on worklog5743_16(a1, a2(2000), a3(1069));
|
||||
show warnings;
|
||||
create index idx7 on worklog5743_16(a1, a2(2000), a3(1068));
|
||||
show warnings;
|
||||
set sql_mode=default;
|
||||
|
||||
# Insert a large record into each of these tables.
|
||||
insert into worklog5743_1 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_2 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_4 values(9, repeat("a", 10000));
|
||||
insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
|
||||
insert into worklog5743_16 values(9, repeat("a", 10000), repeat("a", 10000));
|
||||
|
||||
# Now if we change the global innodb_large_prefix back to 767,
|
||||
# updates to these indexes should still be allowed.
|
||||
set global innodb_large_prefix=0;
|
||||
insert into worklog5743_1 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_2 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_4 values(2, repeat("b", 10000));
|
||||
insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
|
||||
insert into worklog5743_16 values(2, repeat("b", 10000), repeat("b", 10000));
|
||||
set global innodb_large_prefix=1;
|
||||
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
select a1, left(a2, 20) from worklog5743_8;
|
||||
select a1, left(a2, 20) from worklog5743_16;
|
||||
|
||||
begin;
|
||||
|
||||
update worklog5743_1 set a1 = 1000;
|
||||
update worklog5743_2 set a1 = 1000;
|
||||
update worklog5743_4 set a1 = 1000;
|
||||
update worklog5743_8 set a1 = 1000;
|
||||
update worklog5743_16 set a1 = 1000;
|
||||
select a1, left(a2, 20) from worklog5743_1;
|
||||
select a1, left(a2, 20) from worklog5743_2;
|
||||
select a1, left(a2, 20) from worklog5743_4;
|
||||
select a1, left(a2, 20) from worklog5743_8;
|
||||
select a1, left(a2, 20) from worklog5743_16;
|
||||
|
||||
|
||||
# Do a select from another connection that would use the secondary index
|
||||
--connection con1
|
||||
select @@session.tx_isolation;
|
||||
explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
|
||||
explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
explain select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
|
||||
explain select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
|
||||
select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
|
||||
select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
|
||||
select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
|
||||
|
||||
# Do read uncommitted in another session, it would show there is no
|
||||
# row with a1 = 9
|
||||
--connection con2
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
|
||||
select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
|
||||
select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
|
||||
select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
|
||||
select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
|
||||
|
||||
--connection default
|
||||
rollback;
|
||||
|
||||
drop table worklog5743_1;
|
||||
drop table worklog5743_2;
|
||||
drop table worklog5743_4;
|
||||
drop table worklog5743_8;
|
||||
drop table worklog5743_16;
|
||||
|
||||
-- echo ### Test 5 ###
|
||||
# Create a table with large varchar columns and create indexes
|
||||
# directly on these large columns to show that prefix limit is
|
||||
# automatically applied and to show that limit.
|
||||
create table worklog5743(a1 int,
|
||||
a2 varchar(20000),
|
||||
a3 varchar(3073),
|
||||
a4 varchar(3072),
|
||||
a5 varchar(3069),
|
||||
a6 varchar(3068))
|
||||
ROW_FORMAT=DYNAMIC;
|
||||
set sql_mode='';
|
||||
create index idx1 on worklog5743(a2);
|
||||
create index idx2 on worklog5743(a3);
|
||||
create index idx3 on worklog5743(a4);
|
||||
show warnings;
|
||||
-- error ER_TOO_LONG_KEY
|
||||
create index idx4 on worklog5743(a1, a2);
|
||||
show warnings;
|
||||
-- error ER_TOO_LONG_KEY
|
||||
create index idx5 on worklog5743(a1, a5);
|
||||
show warnings;
|
||||
create index idx6 on worklog5743(a1, a6);
|
||||
show warnings;
|
||||
show create table worklog5743;
|
||||
set sql_mode=default;
|
||||
|
||||
insert into worklog5743 values(9,
|
||||
repeat("a", 20000), repeat("a", 3073),
|
||||
repeat("a", 3072), repeat("a", 3069),
|
||||
repeat("a", 3068));
|
||||
|
||||
begin;
|
||||
|
||||
update worklog5743 set a1 = 1000;
|
||||
|
||||
# Do a select from another connection that would use the secondary index
|
||||
--connection con1
|
||||
select @@session.tx_isolation;
|
||||
explain select a1 from worklog5743 where a1 = 9;
|
||||
select a1 from worklog5743 where a1 = 9;
|
||||
|
||||
# Do read uncommitted, it would show there is no row with a1 = 9
|
||||
--connection con2
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
select a1 from worklog5743 where a1 = 9;
|
||||
|
||||
--connection default
|
||||
rollback;
|
||||
|
||||
drop table worklog5743;
|
||||
|
||||
-- echo ### Test 6 ###
|
||||
# Create a table with old format, and the limit is 768 bytes.
|
||||
-- error ER_INDEX_COLUMN_TOO_LONG
|
||||
create table worklog5743(a TEXT not null, primary key (a(1000))) row_format=COMPACT;
|
||||
|
||||
create table worklog5743(a TEXT) row_format=COMPACT;
|
||||
|
||||
# Excercise the column length check in ha_innobase::add_index()
|
||||
-- error ER_INDEX_COLUMN_TOO_LONG
|
||||
create index idx on worklog5743(a(768));
|
||||
|
||||
# This should be successful
|
||||
create index idx on worklog5743(a(767));
|
||||
|
||||
# Perform some DMLs
|
||||
insert into worklog5743 values(repeat("a", 20000));
|
||||
|
||||
begin;
|
||||
insert into worklog5743 values(repeat("b", 20000));
|
||||
update worklog5743 set a = (repeat("x", 25000));
|
||||
|
||||
# Start a new session to select the table to force it build
|
||||
# an earlier version of the cluster index through undo log
|
||||
select @@session.tx_isolation;
|
||||
--connection con1
|
||||
select a = repeat("a", 20000) from worklog5743;
|
||||
--disconnect con1
|
||||
|
||||
--connection con2
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
select @@session.tx_isolation;
|
||||
select a = repeat("x", 25000) from worklog5743;
|
||||
--disconnect con2
|
||||
|
||||
--connection default
|
||||
rollback;
|
||||
|
||||
drop table worklog5743;
|
||||
|
||||
-- echo ### Test 7 ###
|
||||
# Some border line tests on the column length.
|
||||
# We have a limit of 3072 bytes for Barracuda table
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
|
||||
|
||||
# Length exceeds maximum supported key length
|
||||
# It will be auto-truncated to 3072
|
||||
set statement sql_mode = '' for
|
||||
create index idx1 on worklog5743(a(3073));
|
||||
create index idx2 on worklog5743(a(3072));
|
||||
show create table worklog5743;
|
||||
drop table worklog5743;
|
||||
|
||||
# We have a limit of 767 bytes for Antelope tables
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=REDUNDANT;
|
||||
-- error ER_INDEX_COLUMN_TOO_LONG
|
||||
create index idx on worklog5743(a(768));
|
||||
create index idx2 on worklog5743(a(767));
|
||||
drop table worklog5743;
|
||||
|
||||
create table worklog5743(a TEXT not null) ROW_FORMAT=COMPACT;
|
||||
-- error ER_INDEX_COLUMN_TOO_LONG
|
||||
create index idx on worklog5743(a(768));
|
||||
create index idx2 on worklog5743(a(767));
|
||||
drop table worklog5743;
|
||||
|
||||
eval SET GLOBAL innodb_large_prefix=$innodb_large_prefix_orig;
|
||||
SET GLOBAL innodb_strict_mode = DEFAULT;
|
|
@ -1 +1 @@
|
|||
--innodb --changed_page_bitmaps --innodb-file-format=Barracuda
|
||||
--innodb --changed_page_bitmaps
|
||||
|
|
|
@ -6,4 +6,3 @@
|
|||
--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/logkey.txt
|
||||
--innodb_strict_mode
|
||||
--innodb_file_per_table
|
||||
--innodb_file_format=Barracuda
|
||||
|
|
|
@ -1 +1 @@
|
|||
--loose-innodb-file-format-check --loose-innodb-file-per-table=1 --skip-stack-trace --skip-core-file --loose-innodb-buffer-pool-size=32M
|
||||
--loose-innodb-file-per-table=1 --skip-stack-trace --skip-core-file --loose-innodb-buffer-pool-size=32M
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
--sync-relay-log-info=1 --relay-log-recovery=1 --loose-innodb_file_format_check=1 --default-storage-engine=MyISAM --loose-innodb-file-per-table=0
|
||||
--sync-relay-log-info=1 --relay-log-recovery=1 --default-storage-engine=MyISAM --loose-innodb-file-per-table=0
|
||||
--skip-core-file
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
SET @start_global_value = @@global.innodb_file_format;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
Barracuda
|
||||
Valid values are 'Antelope' and 'Barracuda'
|
||||
select @@global.innodb_file_format in ('Antelope', 'Barracuda');
|
||||
@@global.innodb_file_format in ('Antelope', 'Barracuda')
|
||||
1
|
||||
select @@global.innodb_file_format;
|
||||
@@global.innodb_file_format
|
||||
Barracuda
|
||||
select @@session.innodb_file_format;
|
||||
ERROR HY000: Variable 'innodb_file_format' is a GLOBAL variable
|
||||
show global variables like 'innodb_file_format';
|
||||
Variable_name Value
|
||||
innodb_file_format Barracuda
|
||||
show session variables like 'innodb_file_format';
|
||||
Variable_name Value
|
||||
innodb_file_format Barracuda
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT Barracuda
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT Barracuda
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select @@global.innodb_file_format;
|
||||
@@global.innodb_file_format
|
||||
Antelope
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT Antelope
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT Antelope
|
||||
set @@global.innodb_file_format='Barracuda';
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select @@global.innodb_file_format;
|
||||
@@global.innodb_file_format
|
||||
Barracuda
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT Barracuda
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT Barracuda
|
||||
set session innodb_file_format='Salmon';
|
||||
ERROR HY000: Variable 'innodb_file_format' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
set @@session.innodb_file_format='Salmon';
|
||||
ERROR HY000: Variable 'innodb_file_format' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
set global innodb_file_format=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_file_format'
|
||||
set global innodb_file_format=1e1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_file_format'
|
||||
set global innodb_file_format='Salmon';
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'Salmon'
|
||||
SET @@global.innodb_file_format = @start_global_value;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SELECT @@global.innodb_file_format;
|
||||
@@global.innodb_file_format
|
||||
Barracuda
|
|
@ -1,80 +0,0 @@
|
|||
SET @start_global_value = @@global.innodb_file_format_check;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
1
|
||||
Valid values are 'ON' and 'OFF'
|
||||
SELECT @@global.innodb_file_format_check in (0, 1);
|
||||
@@global.innodb_file_format_check in (0, 1)
|
||||
1
|
||||
SELECT @@global.innodb_file_format_check;
|
||||
@@global.innodb_file_format_check
|
||||
1
|
||||
SELECT @@session.innodb_file_format_check;
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable
|
||||
SHOW global variables LIKE 'innodb_file_format_check';
|
||||
Variable_name Value
|
||||
innodb_file_format_check ON
|
||||
SHOW session variables LIKE 'innodb_file_format_check';
|
||||
Variable_name Value
|
||||
innodb_file_format_check ON
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_file_format_check';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_CHECK ON
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_file_format_check';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_CHECK ON
|
||||
SET @@global.innodb_file_format_check='Off';
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
||||
Expected error 'Read only variable'
|
||||
SET @@global.innodb_file_format_check=1;
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
||||
Expected error 'Read only variable'
|
||||
SET @@global.innodb_file_format_check=0;
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
||||
Expected error 'Read only variable'
|
||||
SET @@global.innodb_file_format_check='On';
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
||||
Expected error 'Read only variable'
|
||||
SET session innodb_large_prefix='OFF';
|
||||
ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SET @@session.innodb_stats_on_metadata='ON';
|
||||
ERROR HY000: Variable 'innodb_stats_on_metadata' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SELECT IF(@@GLOBAL.innodb_file_format_check, "ON", "OFF") = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_file_format_check';
|
||||
IF(@@GLOBAL.innodb_file_format_check, "ON", "OFF") = VARIABLE_VALUE
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
|
||||
COUNT(@@GLOBAL.innodb_file_format_check)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_file_format_check';
|
||||
COUNT(VARIABLE_VALUE)
|
||||
1
|
||||
1 Expected
|
||||
SELECT @@innodb_file_format_check = @@GLOBAL.innodb_file_format_check;
|
||||
@@innodb_file_format_check = @@GLOBAL.innodb_file_format_check
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@innodb_file_format_check);
|
||||
COUNT(@@innodb_file_format_check)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@local.innodb_file_format_check);
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@SESSION.innodb_file_format_check);
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
|
||||
COUNT(@@GLOBAL.innodb_file_format_check)
|
||||
1
|
||||
1 Expected
|
||||
SELECT innodb_file_format_check = @@SESSION.innodb_file_format_check;
|
||||
ERROR 42S22: Unknown column 'innodb_file_format_check' in 'field list'
|
||||
Expected error 'Readonly variable'
|
|
@ -1,71 +0,0 @@
|
|||
SET @start_global_value = @@global.innodb_file_format_max;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
Barracuda
|
||||
Valid values are 'Antelope' and 'Barracuda'
|
||||
SELECT @@global.innodb_file_format_max in ('Antelope', 'Barracuda');
|
||||
@@global.innodb_file_format_max in ('Antelope', 'Barracuda')
|
||||
1
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
@@global.innodb_file_format_max
|
||||
Barracuda
|
||||
SELECT @@session.innodb_file_format_max;
|
||||
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable
|
||||
SHOW global variables LIKE 'innodb_file_format_max';
|
||||
Variable_name Value
|
||||
innodb_file_format_max Barracuda
|
||||
SHOW session variables LIKE 'innodb_file_format_max';
|
||||
Variable_name Value
|
||||
innodb_file_format_max Barracuda
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Barracuda
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Barracuda
|
||||
SET global innodb_file_format_max='Antelope';
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
@@global.innodb_file_format_max
|
||||
Antelope
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Antelope
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Antelope
|
||||
SET @@global.innodb_file_format_max='Barracuda';
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
@@global.innodb_file_format_max
|
||||
Barracuda
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Barracuda
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT_MAX Barracuda
|
||||
SET session innodb_file_format_max='Salmon';
|
||||
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SET @@session.innodb_file_format_max='Salmon';
|
||||
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SET global innodb_file_format_max=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_file_format_max'
|
||||
SET global innodb_file_format_max=1e1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_file_format_max'
|
||||
SET global innodb_file_format_max='Salmon';
|
||||
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'Salmon'
|
||||
SET @@global.innodb_file_format_max = @start_global_value;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
@@global.innodb_file_format_max
|
||||
Barracuda
|
|
@ -1,102 +0,0 @@
|
|||
SET @start_global_value = @@global.innodb_large_prefix;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
1
|
||||
Valid values are 'ON' and 'OFF'
|
||||
select @@global.innodb_large_prefix in (0, 1);
|
||||
@@global.innodb_large_prefix in (0, 1)
|
||||
1
|
||||
select @@global.innodb_large_prefix;
|
||||
@@global.innodb_large_prefix
|
||||
1
|
||||
select @@session.innodb_large_prefix;
|
||||
ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable
|
||||
show global variables like 'innodb_large_prefix';
|
||||
Variable_name Value
|
||||
innodb_large_prefix ON
|
||||
show session variables like 'innodb_large_prefix';
|
||||
Variable_name Value
|
||||
innodb_large_prefix ON
|
||||
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_LARGE_PREFIX ON
|
||||
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_LARGE_PREFIX ON
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select @@global.innodb_large_prefix;
|
||||
@@global.innodb_large_prefix
|
||||
0
|
||||
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_LARGE_PREFIX OFF
|
||||
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_LARGE_PREFIX OFF
|
||||
set @@global.innodb_large_prefix=1;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select @@global.innodb_large_prefix;
|
||||
@@global.innodb_large_prefix
|
||||
1
|
||||
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_LARGE_PREFIX ON
|
||||
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_LARGE_PREFIX ON
|
||||
set global innodb_large_prefix=0;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select @@global.innodb_large_prefix;
|
||||
@@global.innodb_large_prefix
|
||||
0
|
||||
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_LARGE_PREFIX OFF
|
||||
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_LARGE_PREFIX OFF
|
||||
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 http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
select @@global.innodb_large_prefix;
|
||||
@@global.innodb_large_prefix
|
||||
1
|
||||
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_LARGE_PREFIX ON
|
||||
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_LARGE_PREFIX ON
|
||||
set session innodb_large_prefix='OFF';
|
||||
ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
set @@session.innodb_large_prefix='ON';
|
||||
ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
set global innodb_large_prefix=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_large_prefix'
|
||||
set global innodb_large_prefix=1e1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_large_prefix'
|
||||
set global innodb_large_prefix=2;
|
||||
ERROR 42000: Variable 'innodb_large_prefix' can't be set to the value of '2'
|
||||
set global innodb_large_prefix=-3;
|
||||
ERROR 42000: Variable 'innodb_large_prefix' can't be set to the value of '-3'
|
||||
select @@global.innodb_large_prefix;
|
||||
@@global.innodb_large_prefix
|
||||
1
|
||||
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_LARGE_PREFIX ON
|
||||
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_LARGE_PREFIX ON
|
||||
set global innodb_large_prefix='AUTO';
|
||||
ERROR 42000: Variable 'innodb_large_prefix' can't be set to the value of 'AUTO'
|
||||
SET @@global.innodb_large_prefix = @start_global_value;
|
||||
Warnings:
|
||||
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
|
||||
SELECT @@global.innodb_large_prefix;
|
||||
@@global.innodb_large_prefix
|
||||
1
|
|
@ -902,48 +902,6 @@ NUMERIC_BLOCK_SIZE 0
|
|||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY YES
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME INNODB_FILE_FORMAT
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE Barracuda
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE Barracuda
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE VARCHAR
|
||||
VARIABLE_COMMENT File format to use for new tables in .ibd files.
|
||||
NUMERIC_MIN_VALUE NULL
|
||||
NUMERIC_MAX_VALUE NULL
|
||||
NUMERIC_BLOCK_SIZE NULL
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME INNODB_FILE_FORMAT_CHECK
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE ON
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE ON
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE BOOLEAN
|
||||
VARIABLE_COMMENT Whether to perform system file format check.
|
||||
NUMERIC_MIN_VALUE NULL
|
||||
NUMERIC_MAX_VALUE NULL
|
||||
NUMERIC_BLOCK_SIZE NULL
|
||||
ENUM_VALUE_LIST OFF,ON
|
||||
READ_ONLY YES
|
||||
COMMAND_LINE_ARGUMENT NONE
|
||||
VARIABLE_NAME INNODB_FILE_FORMAT_MAX
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE Barracuda
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE Antelope
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE VARCHAR
|
||||
VARIABLE_COMMENT The highest file format in the tablespace.
|
||||
NUMERIC_MIN_VALUE NULL
|
||||
NUMERIC_MAX_VALUE NULL
|
||||
NUMERIC_BLOCK_SIZE NULL
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME INNODB_FILE_PER_TABLE
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE ON
|
||||
|
@ -1336,20 +1294,6 @@ NUMERIC_BLOCK_SIZE 0
|
|||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
VARIABLE_NAME INNODB_LARGE_PREFIX
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE ON
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE ON
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE BOOLEAN
|
||||
VARIABLE_COMMENT Support large index prefix length of REC_VERSION_56_MAX_INDEX_COL_LEN (3072) bytes.
|
||||
NUMERIC_MIN_VALUE NULL
|
||||
NUMERIC_MAX_VALUE NULL
|
||||
NUMERIC_BLOCK_SIZE NULL
|
||||
ENUM_VALUE_LIST OFF,ON
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT NONE
|
||||
VARIABLE_NAME INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 0
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
|
||||
|
||||
# 2010-01-25 - Added
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_global_value = @@global.innodb_file_format;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--echo Valid values are 'Antelope' and 'Barracuda'
|
||||
select @@global.innodb_file_format in ('Antelope', 'Barracuda');
|
||||
select @@global.innodb_file_format;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.innodb_file_format;
|
||||
show global variables like 'innodb_file_format';
|
||||
show session variables like 'innodb_file_format';
|
||||
--disable_warnings
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format';
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format';
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
set global innodb_file_format='Antelope';
|
||||
select @@global.innodb_file_format;
|
||||
--disable_warnings
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format';
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format';
|
||||
--enable_warnings
|
||||
set @@global.innodb_file_format='Barracuda';
|
||||
select @@global.innodb_file_format;
|
||||
--disable_warnings
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format';
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format';
|
||||
--enable_warnings
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set session innodb_file_format='Salmon';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set @@session.innodb_file_format='Salmon';
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_file_format=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_file_format=1e1;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_file_format='Salmon';
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
|
||||
SET @@global.innodb_file_format = @start_global_value;
|
||||
SELECT @@global.innodb_file_format;
|
|
@ -1,101 +0,0 @@
|
|||
#
|
||||
# 2011-08-02 - Added
|
||||
#
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_global_value = @@global.innodb_file_format_check;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--echo Valid values are 'ON' and 'OFF'
|
||||
SELECT @@global.innodb_file_format_check in (0, 1);
|
||||
SELECT @@global.innodb_file_format_check;
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@session.innodb_file_format_check;
|
||||
SHOW global variables LIKE 'innodb_file_format_check';
|
||||
SHOW session variables LIKE 'innodb_file_format_check';
|
||||
--disable_warnings
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_file_format_check';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_file_format_check';
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# show that it's read only
|
||||
#
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SET @@global.innodb_file_format_check='Off';
|
||||
--echo Expected error 'Read only variable'
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SET @@global.innodb_file_format_check=1;
|
||||
--echo Expected error 'Read only variable'
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SET @@global.innodb_file_format_check=0;
|
||||
--echo Expected error 'Read only variable'
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SET @@global.innodb_file_format_check='On';
|
||||
--echo Expected error 'Read only variable'
|
||||
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
SET session innodb_large_prefix='OFF';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
SET @@session.innodb_stats_on_metadata='ON';
|
||||
|
||||
#
|
||||
# Check if the value in GLOBAL Table matches value in variable
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
SELECT IF(@@GLOBAL.innodb_file_format_check, "ON", "OFF") = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_file_format_check';
|
||||
--enable_warnings
|
||||
--echo 1 Expected
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
|
||||
--echo 1 Expected
|
||||
|
||||
--disable_warnings
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_file_format_check';
|
||||
--enable_warnings
|
||||
--echo 1 Expected
|
||||
|
||||
#
|
||||
# Check if accessing variable with and without GLOBAL point to same variable
|
||||
#
|
||||
SELECT @@innodb_file_format_check = @@GLOBAL.innodb_file_format_check;
|
||||
--echo 1 Expected
|
||||
|
||||
#
|
||||
# Check if innodb_doublewrite can be accessed with and without @@ sign
|
||||
#
|
||||
|
||||
SELECT COUNT(@@innodb_file_format_check);
|
||||
--echo 1 Expected
|
||||
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT COUNT(@@local.innodb_file_format_check);
|
||||
--echo Expected error 'Variable is a GLOBAL variable'
|
||||
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT COUNT(@@SESSION.innodb_file_format_check);
|
||||
--echo Expected error 'Variable is a GLOBAL variable'
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
|
||||
--echo 1 Expected
|
||||
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT innodb_file_format_check = @@SESSION.innodb_file_format_check;
|
||||
--echo Expected error 'Readonly variable'
|
|
@ -1,66 +0,0 @@
|
|||
#
|
||||
# 2011-08-02 - Added
|
||||
#
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_global_value = @@global.innodb_file_format_max;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--echo Valid values are 'Antelope' and 'Barracuda'
|
||||
SELECT @@global.innodb_file_format_max in ('Antelope', 'Barracuda');
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT @@session.innodb_file_format_max;
|
||||
SHOW global variables LIKE 'innodb_file_format_max';
|
||||
SHOW session variables LIKE 'innodb_file_format_max';
|
||||
--disable_warnings
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
SET global innodb_file_format_max='Antelope';
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
--disable_warnings
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
--enable_warnings
|
||||
SET @@global.innodb_file_format_max='Barracuda';
|
||||
SELECT @@global.innodb_file_format_max;
|
||||
--disable_warnings
|
||||
SELECT * FROM information_schema.global_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
SELECT * FROM information_schema.session_variables
|
||||
WHERE variable_name='innodb_file_format_max';
|
||||
--enable_warnings
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
SET session innodb_file_format_max='Salmon';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
SET @@session.innodb_file_format_max='Salmon';
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_file_format_max=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
SET global innodb_file_format_max=1e1;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
SET global innodb_file_format_max='Salmon';
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
|
||||
SET @@global.innodb_file_format_max = @start_global_value;
|
||||
SELECT @@global.innodb_file_format_max;
|
|
@ -1,82 +0,0 @@
|
|||
|
||||
|
||||
# 2010-01-25 - Added
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_global_value = @@global.innodb_large_prefix;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
--echo Valid values are 'ON' and 'OFF'
|
||||
select @@global.innodb_large_prefix in (0, 1);
|
||||
select @@global.innodb_large_prefix;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.innodb_large_prefix;
|
||||
show global variables like 'innodb_large_prefix';
|
||||
show session variables like 'innodb_large_prefix';
|
||||
--disable_warnings
|
||||
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
|
||||
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
set global innodb_large_prefix='OFF';
|
||||
select @@global.innodb_large_prefix;
|
||||
--disable_warnings
|
||||
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
|
||||
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
|
||||
--enable_warnings
|
||||
set @@global.innodb_large_prefix=1;
|
||||
select @@global.innodb_large_prefix;
|
||||
--disable_warnings
|
||||
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
|
||||
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
|
||||
--enable_warnings
|
||||
set global innodb_large_prefix=0;
|
||||
select @@global.innodb_large_prefix;
|
||||
--disable_warnings
|
||||
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
|
||||
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
|
||||
--enable_warnings
|
||||
set @@global.innodb_large_prefix='ON';
|
||||
select @@global.innodb_large_prefix;
|
||||
--disable_warnings
|
||||
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
|
||||
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
|
||||
--enable_warnings
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set session innodb_large_prefix='OFF';
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set @@session.innodb_large_prefix='ON';
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_large_prefix=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_large_prefix=1e1;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_large_prefix=2;
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_large_prefix=-3;
|
||||
select @@global.innodb_large_prefix;
|
||||
--disable_warnings
|
||||
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
|
||||
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
|
||||
--enable_warnings
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set global innodb_large_prefix='AUTO';
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
|
||||
SET @@global.innodb_large_prefix = @start_global_value;
|
||||
SELECT @@global.innodb_large_prefix;
|
|
@ -1,2 +1 @@
|
|||
--default-storage-engine=MyISAM
|
||||
--loose-innodb-large-prefix=OFF
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
--loose-innodb-large-prefix=OFF
|
|
@ -7083,11 +7083,11 @@ btr_check_blob_fil_page_type(
|
|||
ulint flags = fil_space_get_flags(space_id);
|
||||
|
||||
#ifndef UNIV_DEBUG /* Improve debug test coverage */
|
||||
if (dict_tf_get_format(flags) == UNIV_FORMAT_A) {
|
||||
if (!DICT_TF_HAS_ATOMIC_BLOBS(flags)) {
|
||||
/* Old versions of InnoDB did not initialize
|
||||
FIL_PAGE_TYPE on BLOB pages. Do not print
|
||||
anything about the type mismatch when reading
|
||||
a BLOB page that is in Antelope format.*/
|
||||
a BLOB page that may be from old versions. */
|
||||
return;
|
||||
}
|
||||
#endif /* !UNIV_DEBUG */
|
||||
|
|
|
@ -574,7 +574,7 @@ dtuple_convert_big_rec(
|
|||
return(NULL);
|
||||
}
|
||||
|
||||
if (dict_table_get_format(index->table) < UNIV_FORMAT_B) {
|
||||
if (!dict_table_has_atomic_blobs(index->table)) {
|
||||
/* up to MySQL 5.1: store a 768-byte prefix locally */
|
||||
local_len = BTR_EXTERN_FIELD_REF_SIZE
|
||||
+ DICT_ANTELOPE_MAX_INDEX_COL_LEN;
|
||||
|
|
|
@ -337,8 +337,8 @@ dict_boot(void)
|
|||
dict_mem_table_add_col(table, heap, "ID", DATA_BINARY, 0, 8);
|
||||
/* ROW_FORMAT = (N_COLS >> 31) ? COMPACT : REDUNDANT */
|
||||
dict_mem_table_add_col(table, heap, "N_COLS", DATA_INT, 0, 4);
|
||||
/* The low order bit of TYPE is always set to 1. If the format
|
||||
is UNIV_FORMAT_B or higher, this field matches table->flags. */
|
||||
/* The low order bit of TYPE is always set to 1. If ROW_FORMAT
|
||||
is not REDUNDANT or COMPACT, this field matches table->flags. */
|
||||
dict_mem_table_add_col(table, heap, "TYPE", DATA_INT, 0, 4);
|
||||
dict_mem_table_add_col(table, heap, "MIX_ID", DATA_BINARY, 0, 0);
|
||||
/* MIX_LEN may contain additional table flags when
|
||||
|
|
|
@ -402,9 +402,8 @@ dict_build_tablespace_for_table(
|
|||
ut_ad(!dict_table_is_temporary(table));
|
||||
/* This table will need a new tablespace. */
|
||||
|
||||
ut_ad(dict_table_get_format(table) <= UNIV_FORMAT_MAX);
|
||||
ut_ad(DICT_TF_GET_ZIP_SSIZE(table->flags) == 0
|
||||
|| dict_table_get_format(table) >= UNIV_FORMAT_B);
|
||||
|| dict_table_has_atomic_blobs(table));
|
||||
|
||||
/* Get a new tablespace ID */
|
||||
dict_hdr_get_new_id(NULL, NULL, &space, table, false);
|
||||
|
|
|
@ -1184,7 +1184,7 @@ dict_sys_tables_rec_read(
|
|||
|
||||
/* The low order bit of SYS_TABLES.TYPE is always set to 1. But in
|
||||
dict_table_t::flags the low order bit is used to determine if the
|
||||
row format is Redundant (0) or Compact (1) when the format is Antelope.
|
||||
ROW_FORMAT=REDUNDANT (0) or anything else (1).
|
||||
Read the 4 byte N_COLS field and look at the high order bit. It
|
||||
should be set for COMPACT and later. It should not be set for
|
||||
REDUNDANT. */
|
||||
|
|
|
@ -218,23 +218,12 @@ are determined in innobase_init below: */
|
|||
static char* innobase_data_home_dir;
|
||||
static char* innobase_data_file_path;
|
||||
static char* innobase_temp_data_file_path;
|
||||
static char* innobase_file_format_name;
|
||||
static char* innobase_change_buffering;
|
||||
static char* innobase_enable_monitor_counter;
|
||||
static char* innobase_disable_monitor_counter;
|
||||
static char* innobase_reset_monitor_counter;
|
||||
static char* innobase_reset_all_monitor_counter;
|
||||
|
||||
/* The highest file format being used in the database. The value can be
|
||||
set by user, however, it will be adjusted to the newer file format if
|
||||
a table of such format is created/opened. */
|
||||
char* innobase_file_format_max;
|
||||
|
||||
/** Default value of innodb_file_format */
|
||||
static const char* innodb_file_format_default = "Barracuda";
|
||||
/** Default value of innodb_file_format_max */
|
||||
static const char* innodb_file_format_max_default = "Antelope";
|
||||
|
||||
static char* innobase_file_flush_method;
|
||||
|
||||
/* This variable can be set in the server configure file, specifying
|
||||
|
@ -244,7 +233,6 @@ static char* innobase_server_stopword_table;
|
|||
/* Below we have boolean-valued start-up parameters, and their default
|
||||
values */
|
||||
|
||||
static my_bool innobase_file_format_check;
|
||||
static my_bool innobase_use_atomic_writes;
|
||||
static my_bool innobase_use_doublewrite;
|
||||
static my_bool innobase_use_checksums;
|
||||
|
@ -252,7 +240,6 @@ static my_bool innobase_locks_unsafe_for_binlog;
|
|||
static my_bool innobase_rollback_on_timeout;
|
||||
static my_bool innobase_create_status_file;
|
||||
my_bool innobase_stats_on_metadata;
|
||||
static my_bool innobase_large_prefix;
|
||||
static my_bool innodb_optimize_fulltext_only;
|
||||
|
||||
static char* innodb_version_str = (char*) INNODB_VERSION_STR;
|
||||
|
@ -592,7 +579,6 @@ static PSI_mutex_info all_innodb_mutexes[] = {
|
|||
PSI_KEY(dict_foreign_err_mutex),
|
||||
PSI_KEY(dict_sys_mutex),
|
||||
PSI_KEY(recalc_pool_mutex),
|
||||
PSI_KEY(file_format_max_mutex),
|
||||
PSI_KEY(fil_system_mutex),
|
||||
PSI_KEY(flush_list_mutex),
|
||||
PSI_KEY(fts_bg_threads_mutex),
|
||||
|
@ -1328,25 +1314,6 @@ static
|
|||
void
|
||||
innodb_params_adjust();
|
||||
|
||||
/************************************************************//**
|
||||
Validate the file format name and return its corresponding id.
|
||||
@return valid file format id */
|
||||
static
|
||||
uint
|
||||
innobase_file_format_name_lookup(
|
||||
/*=============================*/
|
||||
const char* format_name); /*!< in: pointer to file format
|
||||
name */
|
||||
/************************************************************//**
|
||||
Validate the file format check config parameters, as a side effect it
|
||||
sets the srv_max_file_format_at_startup variable.
|
||||
@return the format_id if valid config value, otherwise, return -1 */
|
||||
static
|
||||
int
|
||||
innobase_file_format_validate_and_set(
|
||||
/*==================================*/
|
||||
const char* format_max); /*!< in: parameter value */
|
||||
|
||||
/*******************************************************************//**
|
||||
This function is used to prepare an X/Open XA distributed transaction.
|
||||
@return 0 or error number */
|
||||
|
@ -2168,7 +2135,7 @@ convert_error_code_to_mysql(
|
|||
/* If prefix is true then a 768-byte prefix is stored
|
||||
locally for BLOB fields. Refer to dict_table_get_format().
|
||||
We limit max record size to 16k for 64k page size. */
|
||||
bool prefix = (dict_tf_get_format(flags) == UNIV_FORMAT_A);
|
||||
bool prefix = !DICT_TF_HAS_ATOMIC_BLOBS(flags);
|
||||
my_printf_error(ER_TOO_BIG_ROWSIZE,
|
||||
"Row size too large (> %lu). Changing some columns"
|
||||
" to TEXT or BLOB %smay help. In current row"
|
||||
|
@ -3749,28 +3716,6 @@ static uint innobase_partition_flags()
|
|||
return (0);
|
||||
}
|
||||
|
||||
/** Deprecation message about InnoDB file format related parameters */
|
||||
#define DEPRECATED_FORMAT_PARAMETER(x) \
|
||||
"Using " x " is deprecated and the parameter" \
|
||||
" may be removed in future releases." \
|
||||
" See " REFMAN "innodb-file-format.html"
|
||||
|
||||
/** Deprecation message about innodb_file_format */
|
||||
static const char* deprecated_file_format
|
||||
= DEPRECATED_FORMAT_PARAMETER("innodb_file_format");
|
||||
|
||||
/** Deprecation message about innodb_large_prefix */
|
||||
static const char* deprecated_large_prefix
|
||||
= DEPRECATED_FORMAT_PARAMETER("innodb_large_prefix");
|
||||
|
||||
/** Deprecation message about innodb_file_format_check */
|
||||
static const char* deprecated_file_format_check
|
||||
= DEPRECATED_FORMAT_PARAMETER("innodb_file_format_check");
|
||||
|
||||
/** Deprecation message about innodb_file_format_max */
|
||||
static const char* deprecated_file_format_max
|
||||
= DEPRECATED_FORMAT_PARAMETER("innodb_file_format_max");
|
||||
|
||||
/** Update log_checksum_algorithm_ptr with a pointer to the function
|
||||
corresponding to whether checksums are enabled.
|
||||
@param[in,out] thd client session, or NULL if at startup
|
||||
|
@ -3831,7 +3776,6 @@ innobase_init(
|
|||
static char current_dir[3]; /*!< Set if using current lib */
|
||||
int err;
|
||||
char *default_path;
|
||||
uint format_id;
|
||||
ulong num_pll_degree;
|
||||
ulint srv_buf_pool_size_org = 0;
|
||||
|
||||
|
@ -4112,75 +4056,6 @@ innobase_init(
|
|||
DBUG_RETURN(innobase_init_abort());
|
||||
}
|
||||
|
||||
if (!innobase_large_prefix) {
|
||||
ib::warn() << deprecated_large_prefix;
|
||||
}
|
||||
|
||||
if (innobase_file_format_name != innodb_file_format_default) {
|
||||
ib::warn() << deprecated_file_format;
|
||||
}
|
||||
|
||||
/* Validate the file format by animal name */
|
||||
if (innobase_file_format_name != NULL) {
|
||||
|
||||
format_id = innobase_file_format_name_lookup(
|
||||
innobase_file_format_name);
|
||||
|
||||
if (format_id > UNIV_FORMAT_MAX) {
|
||||
|
||||
sql_print_error("InnoDB: wrong innodb_file_format.");
|
||||
|
||||
DBUG_RETURN(innobase_init_abort());
|
||||
}
|
||||
} else {
|
||||
/* Set it to the default file format id. Though this
|
||||
should never happen. */
|
||||
format_id = 0;
|
||||
}
|
||||
|
||||
srv_file_format = format_id;
|
||||
|
||||
/* Given the type of innobase_file_format_name we have little
|
||||
choice but to cast away the constness from the returned name.
|
||||
innobase_file_format_name is used in the MySQL set variable
|
||||
interface and so can't be const. */
|
||||
|
||||
innobase_file_format_name =
|
||||
(char*) trx_sys_file_format_id_to_name(format_id);
|
||||
|
||||
/* Check innobase_file_format_check variable */
|
||||
if (!innobase_file_format_check) {
|
||||
ib::warn() << deprecated_file_format_check;
|
||||
|
||||
/* Set the value to disable checking. */
|
||||
srv_max_file_format_at_startup = UNIV_FORMAT_MAX + 1;
|
||||
|
||||
} else {
|
||||
|
||||
/* Set the value to the lowest supported format. */
|
||||
srv_max_file_format_at_startup = UNIV_FORMAT_MIN;
|
||||
}
|
||||
|
||||
if (innobase_file_format_max != innodb_file_format_max_default) {
|
||||
ib::warn() << deprecated_file_format_max;
|
||||
}
|
||||
|
||||
/* Did the user specify a format name that we support?
|
||||
As a side effect it will update the variable
|
||||
srv_max_file_format_at_startup */
|
||||
if (innobase_file_format_validate_and_set(
|
||||
innobase_file_format_max) < 0) {
|
||||
|
||||
sql_print_error("InnoDB: invalid"
|
||||
" innodb_file_format_max value:"
|
||||
" should be any value up to %s or its"
|
||||
" equivalent numeric id",
|
||||
trx_sys_file_format_id_to_name(
|
||||
UNIV_FORMAT_MAX));
|
||||
|
||||
DBUG_RETURN(innobase_init_abort());
|
||||
}
|
||||
|
||||
if (innobase_change_buffering) {
|
||||
ulint use;
|
||||
|
||||
|
@ -4469,9 +4344,6 @@ innobase_change_buffering_inited_ok:
|
|||
}
|
||||
#endif /* MYSQL_DYNAMIC_PLUGIN */
|
||||
|
||||
/* Get the current high water mark format. */
|
||||
innobase_file_format_max = (char*) trx_sys_file_format_max_get();
|
||||
|
||||
/* Currently, monitor counter information are not persistent. */
|
||||
memset(monitor_set_tbl, 0, sizeof monitor_set_tbl);
|
||||
|
||||
|
@ -6826,15 +6698,6 @@ ha_innobase::open(
|
|||
/* Init table lock structure */
|
||||
thr_lock_data_init(&m_share->lock, &lock, NULL);
|
||||
|
||||
if (m_prebuilt->table != NULL) {
|
||||
/* We update the highest file format in the system table
|
||||
space, if this table has higher file format setting. */
|
||||
|
||||
trx_sys_file_format_max_upgrade(
|
||||
(const char**) &innobase_file_format_max,
|
||||
dict_table_get_format(m_prebuilt->table));
|
||||
}
|
||||
|
||||
if (m_prebuilt->table == NULL
|
||||
|| dict_table_is_temporary(m_prebuilt->table)
|
||||
|| m_prebuilt->table->persistent_autoinc
|
||||
|
@ -7002,9 +6865,7 @@ ha_innobase::max_supported_key_part_length() const
|
|||
{
|
||||
/* A table format specific index column length check will be performed
|
||||
at ha_innobase::add_index() and row_create_index_for_mysql() */
|
||||
return(innobase_large_prefix
|
||||
? REC_VERSION_56_MAX_INDEX_COL_LEN
|
||||
: REC_ANTELOPE_MAX_INDEX_COL_LEN - 1);
|
||||
return(REC_VERSION_56_MAX_INDEX_COL_LEN);
|
||||
}
|
||||
|
||||
/******************************************************************//**
|
||||
|
@ -12255,14 +12116,6 @@ create_table_info_t::create_options_are_invalid()
|
|||
" innodb_file_per_table.");
|
||||
ret = "KEY_BLOCK_SIZE";
|
||||
}
|
||||
if (srv_file_format < UNIV_FORMAT_B) {
|
||||
push_warning(
|
||||
m_thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_ILLEGAL_HA_CREATE_OPTION,
|
||||
"InnoDB: KEY_BLOCK_SIZE requires"
|
||||
" innodb_file_format > Antelope.");
|
||||
ret = "KEY_BLOCK_SIZE";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
push_warning_printf(
|
||||
|
@ -12294,27 +12147,8 @@ create_table_info_t::create_options_are_invalid()
|
|||
get_row_format_name(row_format));
|
||||
ret = "ROW_FORMAT";
|
||||
}
|
||||
if (srv_file_format < UNIV_FORMAT_B) {
|
||||
push_warning_printf(
|
||||
m_thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_ILLEGAL_HA_CREATE_OPTION,
|
||||
"InnoDB: ROW_FORMAT=%s requires"
|
||||
" innodb_file_format > Antelope.",
|
||||
get_row_format_name(row_format));
|
||||
ret = "ROW_FORMAT";
|
||||
}
|
||||
break;
|
||||
case ROW_TYPE_DYNAMIC:
|
||||
if (!is_temp && srv_file_format < UNIV_FORMAT_B) {
|
||||
push_warning_printf(
|
||||
m_thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_ILLEGAL_HA_CREATE_OPTION,
|
||||
"InnoDB: ROW_FORMAT=%s requires"
|
||||
" innodb_file_format > Antelope.",
|
||||
get_row_format_name(row_format));
|
||||
ret = "ROW_FORMAT";
|
||||
}
|
||||
/* FALLTRHOUGH */
|
||||
case ROW_TYPE_COMPACT:
|
||||
case ROW_TYPE_REDUNDANT:
|
||||
if (has_key_block_size) {
|
||||
|
@ -12444,15 +12278,6 @@ create_table_info_t::check_table_options()
|
|||
return "PAGE_COMPRESSED";
|
||||
}
|
||||
|
||||
if (srv_file_format < UNIV_FORMAT_B) {
|
||||
push_warning(
|
||||
m_thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
HA_WRONG_CREATE_OPTION,
|
||||
"InnoDB: PAGE_COMPRESSED requires"
|
||||
" innodb_file_format > Antelope.");
|
||||
return "PAGE_COMPRESSED";
|
||||
}
|
||||
|
||||
if (m_create_info->key_block_size) {
|
||||
push_warning(
|
||||
m_thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
|
@ -12660,10 +12485,6 @@ create_table_info_t::innobase_table_flags()
|
|||
ut_min(static_cast<ulint>(UNIV_PAGE_SSIZE_MAX),
|
||||
static_cast<ulint>(PAGE_ZIP_SSIZE_MAX));
|
||||
|
||||
/* Cache the value of innodb_file_format, in case it is
|
||||
modified by another thread while the table is being created. */
|
||||
const ulint file_format_allowed = srv_file_format;
|
||||
|
||||
/* Cache the value of innobase_compression_level, in case it is
|
||||
modified by another thread while the table is being created. */
|
||||
const ulint default_compression_level = page_zip_level;
|
||||
|
@ -12745,15 +12566,6 @@ index_bad:
|
|||
zip_allowed = false;
|
||||
}
|
||||
|
||||
if (file_format_allowed < UNIV_FORMAT_B) {
|
||||
push_warning(
|
||||
m_thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_ILLEGAL_HA_CREATE_OPTION,
|
||||
"InnoDB: KEY_BLOCK_SIZE requires"
|
||||
" innodb_file_format > Antelope.");
|
||||
zip_allowed = false;
|
||||
}
|
||||
|
||||
if (!zip_allowed
|
||||
|| zssize > zip_ssize_max) {
|
||||
push_warning_printf(
|
||||
|
@ -12819,13 +12631,6 @@ index_bad:
|
|||
ER_ILLEGAL_HA_CREATE_OPTION,
|
||||
"InnoDB: ROW_FORMAT=COMPRESSED requires"
|
||||
" innodb_file_per_table.");
|
||||
|
||||
} else if (file_format_allowed == UNIV_FORMAT_A) {
|
||||
push_warning_printf(
|
||||
m_thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_ILLEGAL_HA_CREATE_OPTION,
|
||||
"InnoDB: ROW_FORMAT=COMPRESSED requires"
|
||||
" innodb_file_format > Antelope.");
|
||||
} else {
|
||||
innodb_row_format = REC_FORMAT_COMPRESSED;
|
||||
break;
|
||||
|
@ -13422,15 +13227,6 @@ create_table_info_t::create_table_update_dict()
|
|||
|
||||
dict_stats_update(innobase_table, DICT_STATS_EMPTY_TABLE);
|
||||
|
||||
if (innobase_table) {
|
||||
/* We update the highest file format in the system table
|
||||
space, if this table has higher file format setting. */
|
||||
|
||||
trx_sys_file_format_max_upgrade(
|
||||
(const char**) &innobase_file_format_max,
|
||||
dict_table_get_format(innobase_table));
|
||||
}
|
||||
|
||||
/* Load server stopword into FTS cache */
|
||||
if (m_flags2 & DICT_TF2_FTS) {
|
||||
if (!innobase_fts_load_stopword(innobase_table, NULL, m_thd)) {
|
||||
|
@ -18307,283 +18103,6 @@ innodb_max_dirty_pages_pct_lwm_update(
|
|||
srv_max_dirty_pages_pct_lwm = in_val;
|
||||
}
|
||||
|
||||
/************************************************************//**
|
||||
Validate the file format name and return its corresponding id.
|
||||
@return valid file format id */
|
||||
static
|
||||
uint
|
||||
innobase_file_format_name_lookup(
|
||||
/*=============================*/
|
||||
const char* format_name) /*!< in: pointer to file format name */
|
||||
{
|
||||
char* endp;
|
||||
uint format_id;
|
||||
|
||||
ut_a(format_name != NULL);
|
||||
|
||||
/* The format name can contain the format id itself instead of
|
||||
the name and we check for that. */
|
||||
format_id = (uint) strtoul(format_name, &endp, 10);
|
||||
|
||||
/* Check for valid parse. */
|
||||
if (*endp == '\0' && *format_name != '\0') {
|
||||
|
||||
if (format_id <= UNIV_FORMAT_MAX) {
|
||||
|
||||
return(format_id);
|
||||
}
|
||||
} else {
|
||||
|
||||
for (format_id = 0; format_id <= UNIV_FORMAT_MAX;
|
||||
format_id++) {
|
||||
const char* name;
|
||||
|
||||
name = trx_sys_file_format_id_to_name(format_id);
|
||||
|
||||
if (!innobase_strcasecmp(format_name, name)) {
|
||||
|
||||
return(format_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return(UNIV_FORMAT_MAX + 1);
|
||||
}
|
||||
|
||||
/************************************************************//**
|
||||
Validate the file format check config parameters, as a side effect it
|
||||
sets the srv_max_file_format_at_startup variable.
|
||||
@return the format_id if valid config value, otherwise, return -1 */
|
||||
static
|
||||
int
|
||||
innobase_file_format_validate_and_set(
|
||||
/*==================================*/
|
||||
const char* format_max) /*!< in: parameter value */
|
||||
{
|
||||
uint format_id;
|
||||
|
||||
format_id = innobase_file_format_name_lookup(format_max);
|
||||
|
||||
if (format_id < UNIV_FORMAT_MAX + 1) {
|
||||
srv_max_file_format_at_startup = format_id;
|
||||
|
||||
return((int) format_id);
|
||||
} else {
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************//**
|
||||
Check if it is a valid file format. This function is registered as
|
||||
a callback with MySQL.
|
||||
@return 0 for valid file format */
|
||||
static
|
||||
int
|
||||
innodb_file_format_name_validate(
|
||||
/*=============================*/
|
||||
THD* thd, /*!< in: thread handle */
|
||||
struct st_mysql_sys_var* var, /*!< in: pointer to system
|
||||
variable */
|
||||
void* save, /*!< out: immediate result
|
||||
for update function */
|
||||
struct st_mysql_value* value) /*!< in: incoming string */
|
||||
{
|
||||
const char* file_format_input;
|
||||
char buff[STRING_BUFFER_USUAL_SIZE];
|
||||
int len = sizeof(buff);
|
||||
|
||||
ut_a(save != NULL);
|
||||
ut_a(value != NULL);
|
||||
|
||||
file_format_input = value->val_str(value, buff, &len);
|
||||
|
||||
if (file_format_input != NULL) {
|
||||
uint format_id;
|
||||
|
||||
format_id = innobase_file_format_name_lookup(
|
||||
file_format_input);
|
||||
|
||||
if (format_id <= UNIV_FORMAT_MAX) {
|
||||
|
||||
/* Save a pointer to the name in the
|
||||
'file_format_name_map' constant array. */
|
||||
*static_cast<const char**>(save) =
|
||||
trx_sys_file_format_id_to_name(format_id);
|
||||
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
|
||||
*static_cast<const char**>(save) = NULL;
|
||||
return(1);
|
||||
}
|
||||
|
||||
/****************************************************************//**
|
||||
Update the system variable innodb_file_format using the "saved"
|
||||
value. This function is registered as a callback with MySQL. */
|
||||
static
|
||||
void
|
||||
innodb_file_format_name_update(
|
||||
/*===========================*/
|
||||
THD* thd, /*!< in: thread handle */
|
||||
struct st_mysql_sys_var* var, /*!< in: pointer to
|
||||
system variable */
|
||||
void* var_ptr, /*!< out: where the
|
||||
formal string goes */
|
||||
const void* save) /*!< in: immediate result
|
||||
from check function */
|
||||
{
|
||||
const char* format_name;
|
||||
|
||||
ut_a(var_ptr != NULL);
|
||||
ut_a(save != NULL);
|
||||
|
||||
|
||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
HA_ERR_WRONG_COMMAND, deprecated_file_format);
|
||||
|
||||
format_name = *static_cast<const char*const*>(save);
|
||||
|
||||
if (format_name) {
|
||||
uint format_id;
|
||||
|
||||
format_id = innobase_file_format_name_lookup(format_name);
|
||||
|
||||
if (format_id <= UNIV_FORMAT_MAX) {
|
||||
srv_file_format = format_id;
|
||||
}
|
||||
}
|
||||
|
||||
*static_cast<const char**>(var_ptr)
|
||||
= trx_sys_file_format_id_to_name(srv_file_format);
|
||||
}
|
||||
|
||||
/*************************************************************//**
|
||||
Check if valid argument to innodb_file_format_max. This function
|
||||
is registered as a callback with MySQL.
|
||||
@return 0 for valid file format */
|
||||
static
|
||||
int
|
||||
innodb_file_format_max_validate(
|
||||
/*============================*/
|
||||
THD* thd, /*!< in: thread handle */
|
||||
struct st_mysql_sys_var* var, /*!< in: pointer to system
|
||||
variable */
|
||||
void* save, /*!< out: immediate result
|
||||
for update function */
|
||||
struct st_mysql_value* value) /*!< in: incoming string */
|
||||
{
|
||||
const char* file_format_input;
|
||||
char buff[STRING_BUFFER_USUAL_SIZE];
|
||||
int len = sizeof(buff);
|
||||
int format_id;
|
||||
|
||||
ut_a(save != NULL);
|
||||
ut_a(value != NULL);
|
||||
|
||||
file_format_input = value->val_str(value, buff, &len);
|
||||
|
||||
if (file_format_input != NULL) {
|
||||
|
||||
format_id = innobase_file_format_validate_and_set(
|
||||
file_format_input);
|
||||
|
||||
if (format_id >= 0) {
|
||||
/* Save a pointer to the name in the
|
||||
'file_format_name_map' constant array. */
|
||||
*static_cast<const char**>(save) =
|
||||
trx_sys_file_format_id_to_name(
|
||||
(uint) format_id);
|
||||
|
||||
return(0);
|
||||
|
||||
} else {
|
||||
push_warning_printf(thd,
|
||||
Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_WRONG_ARGUMENTS,
|
||||
"InnoDB: invalid innodb_file_format_max"
|
||||
" value; can be any format up to %s"
|
||||
" or equivalent id of %d",
|
||||
trx_sys_file_format_id_to_name(UNIV_FORMAT_MAX),
|
||||
UNIV_FORMAT_MAX);
|
||||
}
|
||||
}
|
||||
|
||||
*static_cast<const char**>(save) = NULL;
|
||||
return(1);
|
||||
}
|
||||
|
||||
/****************************************************************//**
|
||||
Update the system variable innodb_file_format_max using the "saved"
|
||||
value. This function is registered as a callback with MySQL. */
|
||||
static
|
||||
void
|
||||
innodb_file_format_max_update(
|
||||
/*==========================*/
|
||||
THD* thd, /*!< in: thread handle */
|
||||
struct st_mysql_sys_var* var, /*!< in: pointer to
|
||||
system variable */
|
||||
void* var_ptr,/*!< out: where the
|
||||
formal string goes */
|
||||
const void* save) /*!< in: immediate result
|
||||
from check function */
|
||||
{
|
||||
const char* format_name_in;
|
||||
const char** format_name_out;
|
||||
uint format_id;
|
||||
|
||||
ut_a(save != NULL);
|
||||
ut_a(var_ptr != NULL);
|
||||
|
||||
|
||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
HA_ERR_WRONG_COMMAND, deprecated_file_format_max);
|
||||
|
||||
format_name_in = *static_cast<const char*const*>(save);
|
||||
|
||||
if (!format_name_in) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
format_id = innobase_file_format_name_lookup(format_name_in);
|
||||
|
||||
if (format_id > UNIV_FORMAT_MAX) {
|
||||
/* DEFAULT is "on", which is invalid at runtime. */
|
||||
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
ER_WRONG_ARGUMENTS,
|
||||
"Ignoring SET innodb_file_format=%s",
|
||||
format_name_in);
|
||||
return;
|
||||
}
|
||||
|
||||
format_name_out = static_cast<const char**>(var_ptr);
|
||||
|
||||
/* Update the max format id in the system tablespace. */
|
||||
if (trx_sys_file_format_max_set(format_id, format_name_out)) {
|
||||
ib::info() << "The file format in the system tablespace is now"
|
||||
" set to " << *format_name_out << ".";
|
||||
}
|
||||
}
|
||||
|
||||
/** Update innodb_large_prefix.
|
||||
@param[in,out] thd MySQL client connection
|
||||
@param[out] var_ptr current value
|
||||
@param[in] save to-be-assigned value */
|
||||
static
|
||||
void
|
||||
innodb_large_prefix_update(
|
||||
THD* thd,
|
||||
st_mysql_sys_var*,
|
||||
void* var_ptr,
|
||||
const void* save)
|
||||
{
|
||||
push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
|
||||
HA_ERR_WRONG_COMMAND, deprecated_large_prefix);
|
||||
|
||||
*static_cast<my_bool*>(var_ptr) = *static_cast<const my_bool*>(save);
|
||||
}
|
||||
|
||||
/*************************************************************//**
|
||||
Check whether valid argument given to innobase_*_stopword_table.
|
||||
This function is registered as a callback with MySQL.
|
||||
|
@ -20724,33 +20243,6 @@ static MYSQL_SYSVAR_BOOL(file_per_table, srv_file_per_table,
|
|||
"Stores each InnoDB table to an .ibd file in the database dir.",
|
||||
NULL, NULL, TRUE);
|
||||
|
||||
static MYSQL_SYSVAR_STR(file_format, innobase_file_format_name,
|
||||
PLUGIN_VAR_RQCMDARG,
|
||||
"File format to use for new tables in .ibd files.",
|
||||
innodb_file_format_name_validate,
|
||||
innodb_file_format_name_update, innodb_file_format_default);
|
||||
|
||||
/* "innobase_file_format_check" decides whether we would continue
|
||||
booting the server if the file format stamped on the system
|
||||
table space exceeds the maximum file format supported
|
||||
by the server. Can be set during server startup at command
|
||||
line or configure file, and a read only variable after
|
||||
server startup */
|
||||
static MYSQL_SYSVAR_BOOL(file_format_check, innobase_file_format_check,
|
||||
PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
|
||||
"Whether to perform system file format check.",
|
||||
NULL, NULL, TRUE);
|
||||
|
||||
/* If a new file format is introduced, the file format
|
||||
name needs to be updated accordingly. Please refer to
|
||||
file_format_name_map[] defined in trx0sys.cc for the next
|
||||
file format name. */
|
||||
static MYSQL_SYSVAR_STR(file_format_max, innobase_file_format_max,
|
||||
PLUGIN_VAR_OPCMDARG,
|
||||
"The highest file format in the tablespace.",
|
||||
innodb_file_format_max_validate,
|
||||
innodb_file_format_max_update, innodb_file_format_max_default);
|
||||
|
||||
static MYSQL_SYSVAR_STR(ft_server_stopword_table, innobase_server_stopword_table,
|
||||
PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_MEMALLOC,
|
||||
"The user supplied stopword table name.",
|
||||
|
@ -20781,11 +20273,6 @@ static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method,
|
|||
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
|
||||
"With which method to flush data.", NULL, NULL, NULL);
|
||||
|
||||
static MYSQL_SYSVAR_BOOL(large_prefix, innobase_large_prefix,
|
||||
PLUGIN_VAR_NOCMDARG,
|
||||
"Support large index prefix length of REC_VERSION_56_MAX_INDEX_COL_LEN (3072) bytes.",
|
||||
NULL, innodb_large_prefix_update, TRUE);
|
||||
|
||||
static MYSQL_SYSVAR_BOOL(force_load_corrupted, srv_load_corrupted,
|
||||
PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
|
||||
"Force InnoDB to load metadata of corrupted table.",
|
||||
|
@ -21824,9 +21311,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
|
|||
MYSQL_SYSVAR(read_io_threads),
|
||||
MYSQL_SYSVAR(write_io_threads),
|
||||
MYSQL_SYSVAR(file_per_table),
|
||||
MYSQL_SYSVAR(file_format),
|
||||
MYSQL_SYSVAR(file_format_check),
|
||||
MYSQL_SYSVAR(file_format_max),
|
||||
MYSQL_SYSVAR(flush_log_at_timeout),
|
||||
MYSQL_SYSVAR(flush_log_at_trx_commit),
|
||||
MYSQL_SYSVAR(flush_method),
|
||||
|
@ -21840,7 +21324,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
|
|||
MYSQL_SYSVAR(ft_min_token_size),
|
||||
MYSQL_SYSVAR(ft_num_word_optimize),
|
||||
MYSQL_SYSVAR(ft_sort_pll_degree),
|
||||
MYSQL_SYSVAR(large_prefix),
|
||||
MYSQL_SYSVAR(force_load_corrupted),
|
||||
MYSQL_SYSVAR(lock_schedule_algorithm),
|
||||
MYSQL_SYSVAR(locks_unsafe_for_binlog),
|
||||
|
@ -22746,9 +22229,8 @@ void
|
|||
ib_warn_row_too_big(const dict_table_t* table)
|
||||
{
|
||||
/* If prefix is true then a 768-byte prefix is stored
|
||||
locally for BLOB fields. Refer to dict_table_get_format() */
|
||||
const bool prefix = (dict_tf_get_format(table->flags)
|
||||
== UNIV_FORMAT_A);
|
||||
locally for BLOB fields. */
|
||||
const bool prefix = !dict_table_has_atomic_blobs(table);
|
||||
|
||||
const ulint free_space = page_get_free_space_of_empty(
|
||||
table->flags & DICT_TF_COMPACT) / 2;
|
||||
|
|
|
@ -69,8 +69,6 @@ static const char* sub_sep = "#SP#";
|
|||
const char* part_sep_nix = "#P#";
|
||||
const char* sub_sep_nix = "#SP#";
|
||||
|
||||
extern char* innobase_file_format_max;
|
||||
|
||||
Ha_innopart_share::Ha_innopart_share(
|
||||
TABLE_SHARE* table_share)
|
||||
:
|
||||
|
@ -1207,15 +1205,6 @@ share_error:
|
|||
/* Index block size in InnoDB: used by MySQL in query optimization. */
|
||||
stats.block_size = UNIV_PAGE_SIZE;
|
||||
|
||||
if (m_prebuilt->table != NULL) {
|
||||
/* We update the highest file format in the system table
|
||||
space, if this table has higher file format setting. */
|
||||
|
||||
trx_sys_file_format_max_upgrade(
|
||||
(const char**) &innobase_file_format_max,
|
||||
dict_table_get_format(m_prebuilt->table));
|
||||
}
|
||||
|
||||
/* Only if the table has an AUTOINC column. */
|
||||
if (m_prebuilt->table != NULL
|
||||
&& !m_prebuilt->table->ibd_file_missing
|
||||
|
|
|
@ -5987,16 +5987,7 @@ static ST_FIELD_INFO innodb_sys_tables_fields_info[] =
|
|||
STRUCT_FLD(old_name, ""),
|
||||
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
|
||||
|
||||
#define SYS_TABLES_FILE_FORMAT 5
|
||||
{STRUCT_FLD(field_name, "FILE_FORMAT"),
|
||||
STRUCT_FLD(field_length, 10),
|
||||
STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
|
||||
STRUCT_FLD(value, 0),
|
||||
STRUCT_FLD(field_flags, MY_I_S_MAYBE_NULL),
|
||||
STRUCT_FLD(old_name, ""),
|
||||
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
|
||||
|
||||
#define SYS_TABLES_ROW_FORMAT 6
|
||||
#define SYS_TABLES_ROW_FORMAT 5
|
||||
{STRUCT_FLD(field_name, "ROW_FORMAT"),
|
||||
STRUCT_FLD(field_length, 12),
|
||||
STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
|
||||
|
@ -6005,7 +5996,7 @@ static ST_FIELD_INFO innodb_sys_tables_fields_info[] =
|
|||
STRUCT_FLD(old_name, ""),
|
||||
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
|
||||
|
||||
#define SYS_TABLES_ZIP_PAGE_SIZE 7
|
||||
#define SYS_TABLES_ZIP_PAGE_SIZE 6
|
||||
{STRUCT_FLD(field_name, "ZIP_PAGE_SIZE"),
|
||||
STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
|
||||
STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
|
||||
|
@ -6014,7 +6005,7 @@ static ST_FIELD_INFO innodb_sys_tables_fields_info[] =
|
|||
STRUCT_FLD(old_name, ""),
|
||||
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
|
||||
|
||||
#define SYS_TABLES_SPACE_TYPE 8
|
||||
#define SYS_TABLES_SPACE_TYPE 7
|
||||
{STRUCT_FLD(field_name, "SPACE_TYPE"),
|
||||
STRUCT_FLD(field_length, 10),
|
||||
STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
|
||||
|
@ -6043,11 +6034,9 @@ i_s_dict_fill_sys_tables(
|
|||
ulint atomic_blobs = DICT_TF_HAS_ATOMIC_BLOBS(
|
||||
table->flags);
|
||||
const page_size_t& page_size = dict_tf_get_page_size(table->flags);
|
||||
const char* file_format;
|
||||
const char* row_format;
|
||||
const char* space_type;
|
||||
|
||||
file_format = trx_sys_file_format_id_to_name(atomic_blobs);
|
||||
if (!compact) {
|
||||
row_format = "Redundant";
|
||||
} else if (!atomic_blobs) {
|
||||
|
@ -6078,8 +6067,6 @@ i_s_dict_fill_sys_tables(
|
|||
|
||||
OK(fields[SYS_TABLES_SPACE]->store(table->space));
|
||||
|
||||
OK(field_store_string(fields[SYS_TABLES_FILE_FORMAT], file_format));
|
||||
|
||||
OK(field_store_string(fields[SYS_TABLES_ROW_FORMAT], row_format));
|
||||
|
||||
OK(fields[SYS_TABLES_ZIP_PAGE_SIZE]->store(static_cast<double>(
|
||||
|
@ -7950,16 +7937,7 @@ static ST_FIELD_INFO innodb_sys_tablespaces_fields_info[] =
|
|||
STRUCT_FLD(old_name, ""),
|
||||
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
|
||||
|
||||
#define SYS_TABLESPACES_FILE_FORMAT 3
|
||||
{STRUCT_FLD(field_name, "FILE_FORMAT"),
|
||||
STRUCT_FLD(field_length, 10),
|
||||
STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
|
||||
STRUCT_FLD(value, 0),
|
||||
STRUCT_FLD(field_flags, MY_I_S_MAYBE_NULL),
|
||||
STRUCT_FLD(old_name, ""),
|
||||
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
|
||||
|
||||
#define SYS_TABLESPACES_ROW_FORMAT 4
|
||||
#define SYS_TABLESPACES_ROW_FORMAT 3
|
||||
{STRUCT_FLD(field_name, "ROW_FORMAT"),
|
||||
STRUCT_FLD(field_length, 22),
|
||||
STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
|
||||
|
@ -7968,7 +7946,7 @@ static ST_FIELD_INFO innodb_sys_tablespaces_fields_info[] =
|
|||
STRUCT_FLD(old_name, ""),
|
||||
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
|
||||
|
||||
#define SYS_TABLESPACES_PAGE_SIZE 5
|
||||
#define SYS_TABLESPACES_PAGE_SIZE 4
|
||||
{STRUCT_FLD(field_name, "PAGE_SIZE"),
|
||||
STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
|
||||
STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
|
||||
|
@ -7977,7 +7955,7 @@ static ST_FIELD_INFO innodb_sys_tablespaces_fields_info[] =
|
|||
STRUCT_FLD(old_name, ""),
|
||||
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
|
||||
|
||||
#define SYS_TABLESPACES_ZIP_PAGE_SIZE 6
|
||||
#define SYS_TABLESPACES_ZIP_PAGE_SIZE 5
|
||||
{STRUCT_FLD(field_name, "ZIP_PAGE_SIZE"),
|
||||
STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
|
||||
STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
|
||||
|
@ -7986,7 +7964,7 @@ static ST_FIELD_INFO innodb_sys_tablespaces_fields_info[] =
|
|||
STRUCT_FLD(old_name, ""),
|
||||
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
|
||||
|
||||
#define SYS_TABLESPACES_SPACE_TYPE 7
|
||||
#define SYS_TABLESPACES_SPACE_TYPE 6
|
||||
{STRUCT_FLD(field_name, "SPACE_TYPE"),
|
||||
STRUCT_FLD(field_length, 10),
|
||||
STRUCT_FLD(field_type, MYSQL_TYPE_STRING),
|
||||
|
@ -7995,7 +7973,7 @@ static ST_FIELD_INFO innodb_sys_tablespaces_fields_info[] =
|
|||
STRUCT_FLD(old_name, ""),
|
||||
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
|
||||
|
||||
#define SYS_TABLESPACES_FS_BLOCK_SIZE 8
|
||||
#define SYS_TABLESPACES_FS_BLOCK_SIZE 7
|
||||
{STRUCT_FLD(field_name, "FS_BLOCK_SIZE"),
|
||||
STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
|
||||
STRUCT_FLD(field_type, MYSQL_TYPE_LONG),
|
||||
|
@ -8004,7 +7982,7 @@ static ST_FIELD_INFO innodb_sys_tablespaces_fields_info[] =
|
|||
STRUCT_FLD(old_name, ""),
|
||||
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
|
||||
|
||||
#define SYS_TABLESPACES_FILE_SIZE 9
|
||||
#define SYS_TABLESPACES_FILE_SIZE 8
|
||||
{STRUCT_FLD(field_name, "FILE_SIZE"),
|
||||
STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
|
||||
STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
|
||||
|
@ -8013,7 +7991,7 @@ static ST_FIELD_INFO innodb_sys_tablespaces_fields_info[] =
|
|||
STRUCT_FLD(old_name, ""),
|
||||
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
|
||||
|
||||
#define SYS_TABLESPACES_ALLOC_SIZE 10
|
||||
#define SYS_TABLESPACES_ALLOC_SIZE 9
|
||||
{STRUCT_FLD(field_name, "ALLOCATED_SIZE"),
|
||||
STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
|
||||
STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
|
||||
|
@ -8043,14 +8021,12 @@ i_s_dict_fill_sys_tablespaces(
|
|||
Field** fields;
|
||||
ulint atomic_blobs = FSP_FLAGS_HAS_ATOMIC_BLOBS(flags);
|
||||
bool is_compressed = FSP_FLAGS_GET_ZIP_SSIZE(flags);
|
||||
const char* file_format;
|
||||
const char* row_format;
|
||||
const page_size_t page_size(flags);
|
||||
const char* space_type;
|
||||
|
||||
DBUG_ENTER("i_s_dict_fill_sys_tablespaces");
|
||||
|
||||
file_format = trx_sys_file_format_id_to_name(atomic_blobs);
|
||||
if (is_system_tablespace(space)) {
|
||||
row_format = "Compact or Redundant";
|
||||
} else if (is_compressed) {
|
||||
|
@ -8075,9 +8051,6 @@ i_s_dict_fill_sys_tablespaces(
|
|||
|
||||
OK(fields[SYS_TABLESPACES_FLAGS]->store(flags, true));
|
||||
|
||||
OK(field_store_string(fields[SYS_TABLESPACES_FILE_FORMAT],
|
||||
file_format));
|
||||
|
||||
OK(field_store_string(fields[SYS_TABLESPACES_ROW_FORMAT], row_format));
|
||||
|
||||
OK(fields[SYS_TABLESPACES_PAGE_SIZE]->store(
|
||||
|
|
|
@ -204,7 +204,7 @@ dict_col_copy_type(
|
|||
|
||||
/**********************************************************************//**
|
||||
Determine bytes of column prefix to be stored in the undo log. Please
|
||||
note if the table format is UNIV_FORMAT_A (< UNIV_FORMAT_B), no prefix
|
||||
note that if !dict_table_has_atomic_blobs(table), no prefix
|
||||
needs to be stored in the undo log.
|
||||
@return bytes of column prefix to be stored in the undo log */
|
||||
UNIV_INLINE
|
||||
|
@ -958,24 +958,15 @@ dict_table_is_comp(
|
|||
const dict_table_t* table) /*!< in: table */
|
||||
MY_ATTRIBUTE((nonnull, warn_unused_result));
|
||||
|
||||
/********************************************************************//**
|
||||
Determine the file format of a table.
|
||||
@return file format version */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
dict_table_get_format(
|
||||
/*==================*/
|
||||
const dict_table_t* table) /*!< in: table */
|
||||
MY_ATTRIBUTE((nonnull, warn_unused_result));
|
||||
/********************************************************************//**
|
||||
Determine the file format from a dict_table_t::flags.
|
||||
@return file format version */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
dict_tf_get_format(
|
||||
/*===============*/
|
||||
ulint flags) /*!< in: dict_table_t::flags */
|
||||
MY_ATTRIBUTE((warn_unused_result));
|
||||
/** Determine if a table uses atomic BLOBs (no locally stored prefix).
|
||||
@param[in] table InnoDB table
|
||||
@return whether BLOBs are atomic */
|
||||
inline
|
||||
bool
|
||||
dict_table_has_atomic_blobs(const dict_table_t* table)
|
||||
{
|
||||
return(DICT_TF_HAS_ATOMIC_BLOBS(table->flags));
|
||||
}
|
||||
|
||||
/** Set the various values in a dict_table_t::flags pointer.
|
||||
@param[in,out] flags, Pointer to a 4 byte Table Flags
|
||||
|
|
|
@ -661,7 +661,7 @@ dict_tf_is_valid(
|
|||
}
|
||||
|
||||
if (atomic_blobs) {
|
||||
/* Barracuda row formats COMPRESSED and DYNAMIC both use
|
||||
/* ROW_FORMAT=COMPRESSED and ROW_FORMAT=DYNAMIC both use
|
||||
atomic_blobs, which build on the page structure introduced
|
||||
for the COMPACT row format by allowing keys in secondary
|
||||
indexes to be made from data stored off-page in the
|
||||
|
@ -672,7 +672,7 @@ dict_tf_is_valid(
|
|||
}
|
||||
|
||||
} else if (zip_ssize) {
|
||||
/* Antelope does not support COMPRESSED row format. */
|
||||
/* ROW_FORMAT=COMPRESSED implies atomic blobs. */
|
||||
flags_corrupt = true;
|
||||
}
|
||||
|
||||
|
@ -759,7 +759,7 @@ dict_sys_tables_type_validate(
|
|||
ulint page_compression_level = DICT_TF_GET_PAGE_COMPRESSION_LEVEL(type);
|
||||
|
||||
/* The low order bit of SYS_TABLES.TYPE is always set to 1.
|
||||
If the format is UNIV_FORMAT_B or higher, this field is the same
|
||||
If !atomic_blobs, this field is the same
|
||||
as dict_table_t::flags. Zero is not allowed here. */
|
||||
if (!low_order_bit) {
|
||||
return(ULINT_UNDEFINED);
|
||||
|
@ -782,7 +782,7 @@ dict_sys_tables_type_validate(
|
|||
}
|
||||
|
||||
if (atomic_blobs) {
|
||||
/* Barracuda row formats COMPRESSED and DYNAMIC build on
|
||||
/* ROW_FORMAT=COMPRESSED and ROW_FORMAT=DYNAMIC build on
|
||||
the page structure introduced for the COMPACT row format
|
||||
by allowing keys in secondary indexes to be made from
|
||||
data stored off-page in the clustered index.
|
||||
|
@ -791,7 +791,7 @@ dict_sys_tables_type_validate(
|
|||
but we already know that. */
|
||||
|
||||
} else if (zip_ssize) {
|
||||
/* Antelope does not support COMPRESSED format. */
|
||||
/* ROW_FORMAT=COMPRESSED implies atomic blobs. */
|
||||
ib::error()
|
||||
<< "SYS_TABLES::TYPE=" << type
|
||||
<< ", zip_ssize:" << zip_ssize;
|
||||
|
@ -846,9 +846,9 @@ dict_sys_tables_type_validate(
|
|||
}
|
||||
|
||||
/********************************************************************//**
|
||||
Determine the file format from dict_table_t::flags
|
||||
Determine the page format from dict_table_t::flags
|
||||
The low order bit will be zero for REDUNDANT and 1 for COMPACT. For any
|
||||
other row_format, file_format is > 0 and DICT_TF_COMPACT will also be set.
|
||||
other row_format, flags is nonzero and DICT_TF_COMPACT will also be set.
|
||||
@return file format version */
|
||||
UNIV_INLINE
|
||||
rec_format_t
|
||||
|
@ -873,36 +873,6 @@ dict_tf_get_rec_format(
|
|||
return(REC_FORMAT_DYNAMIC);
|
||||
}
|
||||
|
||||
/********************************************************************//**
|
||||
Determine the file format from a dict_table_t::flags.
|
||||
@return file format version */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
dict_tf_get_format(
|
||||
/*===============*/
|
||||
ulint flags) /*!< in: dict_table_t::flags */
|
||||
{
|
||||
if (DICT_TF_HAS_ATOMIC_BLOBS(flags)) {
|
||||
return(UNIV_FORMAT_B);
|
||||
}
|
||||
|
||||
return(UNIV_FORMAT_A);
|
||||
}
|
||||
|
||||
/********************************************************************//**
|
||||
Determine the file format of a table.
|
||||
@return file format version */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
dict_table_get_format(
|
||||
/*==================*/
|
||||
const dict_table_t* table) /*!< in: table */
|
||||
{
|
||||
ut_ad(table);
|
||||
|
||||
return(dict_tf_get_format(table->flags));
|
||||
}
|
||||
|
||||
/** Set the various values in a dict_table_t::flags pointer.
|
||||
@param[in,out] flags, Pointer to a 4 byte Table Flags
|
||||
@param[in] format File Format
|
||||
|
@ -1582,7 +1552,7 @@ dict_table_is_fts_column(
|
|||
|
||||
/**********************************************************************//**
|
||||
Determine bytes of column prefix to be stored in the undo log. Please
|
||||
note if the table format is UNIV_FORMAT_A (< UNIV_FORMAT_B), no prefix
|
||||
note that if !dict_table_has_atomic_blobs(table), no prefix
|
||||
needs to be stored in the undo log.
|
||||
@return bytes of column prefix to be stored in the undo log */
|
||||
UNIV_INLINE
|
||||
|
@ -1593,16 +1563,15 @@ dict_max_field_len_store_undo(
|
|||
const dict_col_t* col) /*!< in: column which index prefix
|
||||
is based on */
|
||||
{
|
||||
ulint prefix_len = 0;
|
||||
|
||||
if (dict_table_get_format(table) >= UNIV_FORMAT_B)
|
||||
{
|
||||
prefix_len = col->max_prefix
|
||||
? col->max_prefix
|
||||
: DICT_MAX_FIELD_LEN_BY_FORMAT(table);
|
||||
if (!dict_table_has_atomic_blobs(table)) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
return(prefix_len);
|
||||
if (col->max_prefix != 0) {
|
||||
return(col->max_prefix);
|
||||
}
|
||||
|
||||
return(REC_VERSION_56_MAX_INDEX_COL_LEN);
|
||||
}
|
||||
|
||||
/** Determine maximum bytes of a virtual column need to be stored
|
||||
|
@ -1622,10 +1591,10 @@ dict_max_v_field_len_store_undo(
|
|||
|
||||
/* This calculation conforms to the non-virtual column
|
||||
maximum log length calculation:
|
||||
1) for UNIV_FORMAT_A, upto REC_ANTELOPE_MAX_INDEX_COL_LEN
|
||||
for UNIV_FORMAT_B, upto col->max_prefix or
|
||||
2) REC_VERSION_56_MAX_INDEX_COL_LEN, whichever is less */
|
||||
if (dict_table_get_format(table) >= UNIV_FORMAT_B) {
|
||||
1) if No atomic BLOB, upto REC_ANTELOPE_MAX_INDEX_COL_LEN
|
||||
2) if atomic BLOB, upto col->max_prefix or
|
||||
REC_VERSION_56_MAX_INDEX_COL_LEN, whichever is less */
|
||||
if (dict_table_has_atomic_blobs(table)) {
|
||||
if (DATA_BIG_COL(col) && col->max_prefix > 0) {
|
||||
max_log_len = col->max_prefix;
|
||||
} else {
|
||||
|
|
|
@ -124,9 +124,10 @@ the Compact page format is used, i.e ROW_FORMAT != REDUNDANT */
|
|||
/** Width of the ZIP_SSIZE flag */
|
||||
#define DICT_TF_WIDTH_ZIP_SSIZE 4
|
||||
|
||||
/** Width of the ATOMIC_BLOBS flag. The Antelope file formats broke up
|
||||
BLOB and TEXT fields, storing the first 768 bytes in the clustered index.
|
||||
Barracuda row formats store the whole blob or text field off-page atomically.
|
||||
/** Width of the ATOMIC_BLOBS flag. The ROW_FORMAT=REDUNDANT and
|
||||
ROW_FORMAT=COMPACT broke up BLOB and TEXT fields, storing the first 768 bytes
|
||||
in the clustered index. ROW_FORMAT=DYNAMIC and ROW_FORMAT=COMPRESSED
|
||||
store the whole blob or text field off-page atomically.
|
||||
Secondary indexes are created from this external data using row_ext_t
|
||||
to cache the BLOB prefixes. */
|
||||
#define DICT_TF_WIDTH_ATOMIC_BLOBS 1
|
||||
|
@ -666,7 +667,8 @@ struct dict_col_t{
|
|||
of an index */
|
||||
unsigned max_prefix:12; /*!< maximum index prefix length on
|
||||
this column. Our current max limit is
|
||||
3072 for Barracuda table */
|
||||
3072 (REC_VERSION_56_MAX_INDEX_COL_LEN)
|
||||
bytes. */
|
||||
};
|
||||
|
||||
/** Index information put in a list of virtual column structure. Index
|
||||
|
@ -747,17 +749,17 @@ files would be at risk! */
|
|||
/** Find out maximum indexed column length by its table format.
|
||||
For ROW_FORMAT=REDUNDANT and ROW_FORMAT=COMPACT, the maximum
|
||||
field length is REC_ANTELOPE_MAX_INDEX_COL_LEN - 1 (767). For
|
||||
Barracuda row formats COMPRESSED and DYNAMIC, the length could
|
||||
ROW_FORMAT=COMPRESSED and ROW_FORMAT=DYNAMIC, the length could
|
||||
be REC_VERSION_56_MAX_INDEX_COL_LEN (3072) bytes */
|
||||
#define DICT_MAX_FIELD_LEN_BY_FORMAT(table) \
|
||||
((dict_table_get_format(table) < UNIV_FORMAT_B) \
|
||||
? (REC_ANTELOPE_MAX_INDEX_COL_LEN - 1) \
|
||||
: REC_VERSION_56_MAX_INDEX_COL_LEN)
|
||||
#define DICT_MAX_FIELD_LEN_BY_FORMAT(table) \
|
||||
(dict_table_has_atomic_blobs(table) \
|
||||
? REC_VERSION_56_MAX_INDEX_COL_LEN \
|
||||
: REC_ANTELOPE_MAX_INDEX_COL_LEN - 1)
|
||||
|
||||
#define DICT_MAX_FIELD_LEN_BY_FORMAT_FLAG(flags) \
|
||||
((DICT_TF_HAS_ATOMIC_BLOBS(flags) < UNIV_FORMAT_B) \
|
||||
? (REC_ANTELOPE_MAX_INDEX_COL_LEN - 1) \
|
||||
: REC_VERSION_56_MAX_INDEX_COL_LEN)
|
||||
#define DICT_MAX_FIELD_LEN_BY_FORMAT_FLAG(flags) \
|
||||
(DICT_TF_HAS_ATOMIC_BLOBS(flags) \
|
||||
? REC_VERSION_56_MAX_INDEX_COL_LEN \
|
||||
: REC_ANTELOPE_MAX_INDEX_COL_LEN - 1)
|
||||
|
||||
/** Defines the maximum fixed length column size */
|
||||
#define DICT_MAX_FIXED_COL_LEN DICT_ANTELOPE_MAX_INDEX_COL_LEN
|
||||
|
|
|
@ -217,7 +217,7 @@ fsp_skip_sanity_check(
|
|||
#define FSP_FLAGS_WIDTH_ZIP_SSIZE 4
|
||||
/** Width of the ATOMIC_BLOBS flag. The ability to break up a long
|
||||
column into an in-record prefix and an externally stored part is available
|
||||
to the two Barracuda row formats COMPRESSED and DYNAMIC. */
|
||||
to ROW_FORMAT=REDUNDANT and ROW_FORMAT=COMPACT. */
|
||||
#define FSP_FLAGS_WIDTH_ATOMIC_BLOBS 1
|
||||
/** Number of flag bits used to indicate the tablespace page size */
|
||||
#define FSP_FLAGS_WIDTH_PAGE_SSIZE 4
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
|
@ -54,8 +54,7 @@ This constant MUST NOT BE CHANGED, or the compatibility of InnoDB data
|
|||
files would be at risk! */
|
||||
#define REC_ANTELOPE_MAX_INDEX_COL_LEN 768
|
||||
|
||||
/** Maximum indexed field length for table format UNIV_FORMAT_B and
|
||||
beyond.
|
||||
/** Maximum indexed field length for tables that have atomic BLOBs.
|
||||
This (3072) is the maximum index row length allowed, so we cannot create index
|
||||
prefix column longer than that. */
|
||||
#define REC_VERSION_56_MAX_INDEX_COL_LEN 3072
|
||||
|
|
|
@ -259,12 +259,6 @@ extern ulong srv_thread_sleep_delay;
|
|||
/** Maximum sleep delay (in micro-seconds), value of 0 disables it.*/
|
||||
extern ulong srv_adaptive_max_sleep_delay;
|
||||
|
||||
/** The file format to use on new *.ibd files. */
|
||||
extern ulint srv_file_format;
|
||||
/** Whether to check file format during startup. A value of
|
||||
UNIV_FORMAT_MAX + 1 means no checking ie. FALSE. The default is to
|
||||
set it to the highest format we support. */
|
||||
extern ulint srv_max_file_format_at_startup;
|
||||
/** Place locks to records only i.e. do not use next-key locking except
|
||||
on duplicate key checking and foreign key checking */
|
||||
extern ibool srv_locks_unsafe_for_binlog;
|
||||
|
|
|
@ -57,7 +57,6 @@ extern mysql_pfs_key_t buf_pool_zip_mutex_key;
|
|||
extern mysql_pfs_key_t cache_last_read_mutex_key;
|
||||
extern mysql_pfs_key_t dict_foreign_err_mutex_key;
|
||||
extern mysql_pfs_key_t dict_sys_mutex_key;
|
||||
extern mysql_pfs_key_t file_format_max_mutex_key;
|
||||
extern mysql_pfs_key_t fil_system_mutex_key;
|
||||
extern mysql_pfs_key_t flush_list_mutex_key;
|
||||
extern mysql_pfs_key_t fts_bg_threads_mutex_key;
|
||||
|
|
|
@ -272,8 +272,6 @@ enum latch_level_t {
|
|||
|
||||
SYNC_DICT_OPERATION,
|
||||
|
||||
SYNC_FILE_FORMAT_TAG,
|
||||
|
||||
SYNC_TRX_I_S_LAST_READ,
|
||||
|
||||
SYNC_TRX_I_S_RWLOCK,
|
||||
|
|
|
@ -262,48 +262,11 @@ trx_sys_read_wsrep_checkpoint(
|
|||
XID* xid); /*!< out: WSREP XID */
|
||||
#endif /* WITH_WSREP */
|
||||
|
||||
/** Initializes the tablespace tag system. */
|
||||
void
|
||||
trx_sys_file_format_init(void);
|
||||
/*==========================*/
|
||||
|
||||
/*****************************************************************//**
|
||||
Closes the tablespace tag system. */
|
||||
void
|
||||
trx_sys_file_format_close(void);
|
||||
/*===========================*/
|
||||
|
||||
/********************************************************************//**
|
||||
Tags the system table space with minimum format id if it has not been
|
||||
tagged yet.
|
||||
WARNING: This function is only called during the startup and AFTER the
|
||||
redo log application during recovery has finished. */
|
||||
void
|
||||
trx_sys_file_format_tag_init(void);
|
||||
/*==============================*/
|
||||
|
||||
/*****************************************************************//**
|
||||
Shutdown/Close the transaction system. */
|
||||
void
|
||||
trx_sys_close(void);
|
||||
/*===============*/
|
||||
/*****************************************************************//**
|
||||
Get the name representation of the file format from its id.
|
||||
@return pointer to the name */
|
||||
const char*
|
||||
trx_sys_file_format_id_to_name(
|
||||
/*===========================*/
|
||||
const ulint id); /*!< in: id of the file format */
|
||||
/*****************************************************************//**
|
||||
Set the file format id unconditionally except if it's already the
|
||||
same value.
|
||||
@return TRUE if value updated */
|
||||
ibool
|
||||
trx_sys_file_format_max_set(
|
||||
/*========================*/
|
||||
ulint format_id, /*!< in: file format id */
|
||||
const char** name); /*!< out: max file format name or
|
||||
NULL if not needed. */
|
||||
/** Create the rollback segments.
|
||||
@return whether the creation succeeded */
|
||||
bool
|
||||
|
@ -322,35 +285,6 @@ Check if there are any active (non-prepared) transactions.
|
|||
ulint
|
||||
trx_sys_any_active_transactions(void);
|
||||
/*=================================*/
|
||||
/*****************************************************************//**
|
||||
Get the name representation of the file format from its id.
|
||||
@return pointer to the max format name */
|
||||
const char*
|
||||
trx_sys_file_format_max_get(void);
|
||||
/*=============================*/
|
||||
/*****************************************************************//**
|
||||
Check for the max file format tag stored on disk.
|
||||
@return DB_SUCCESS or error code */
|
||||
dberr_t
|
||||
trx_sys_file_format_max_check(
|
||||
/*==========================*/
|
||||
ulint max_format_id); /*!< in: the max format id to check */
|
||||
/********************************************************************//**
|
||||
Update the file format tag in the system tablespace only if the given
|
||||
format id is greater than the known max id.
|
||||
@return TRUE if format_id was bigger than the known max id */
|
||||
ibool
|
||||
trx_sys_file_format_max_upgrade(
|
||||
/*============================*/
|
||||
const char** name, /*!< out: max file format name */
|
||||
ulint format_id); /*!< in: file format identifier */
|
||||
/*****************************************************************//**
|
||||
Get the name representation of the file format from its id.
|
||||
@return pointer to the name */
|
||||
const char*
|
||||
trx_sys_file_format_id_to_name(
|
||||
/*===========================*/
|
||||
const ulint id); /*!< in: id of the file format */
|
||||
|
||||
/**
|
||||
Add the transaction to the RW transaction set
|
||||
|
@ -491,24 +425,6 @@ FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID. */
|
|||
#define TRX_SYS_DOUBLEWRITE_BLOCK_SIZE FSP_EXTENT_SIZE
|
||||
/* @} */
|
||||
|
||||
/** File format tag */
|
||||
/* @{ */
|
||||
/** The offset of the file format tag on the trx system header page
|
||||
(TRX_SYS_PAGE_NO of TRX_SYS_SPACE) */
|
||||
#define TRX_SYS_FILE_FORMAT_TAG (UNIV_PAGE_SIZE - 16)
|
||||
|
||||
/** Contents of TRX_SYS_FILE_FORMAT_TAG when valid. The file format
|
||||
identifier is added to this constant. */
|
||||
#define TRX_SYS_FILE_FORMAT_TAG_MAGIC_N_LOW 3645922177UL
|
||||
/** Contents of TRX_SYS_FILE_FORMAT_TAG+4 when valid */
|
||||
#define TRX_SYS_FILE_FORMAT_TAG_MAGIC_N_HIGH 2745987765UL
|
||||
/** Contents of TRX_SYS_FILE_FORMAT_TAG when valid. The file format
|
||||
identifier is added to this 64-bit constant. */
|
||||
#define TRX_SYS_FILE_FORMAT_TAG_MAGIC_N \
|
||||
((ib_uint64_t) TRX_SYS_FILE_FORMAT_TAG_MAGIC_N_HIGH << 32 \
|
||||
| TRX_SYS_FILE_FORMAT_TAG_MAGIC_N_LOW)
|
||||
/* @} */
|
||||
|
||||
/** The transaction system central memory data structure. */
|
||||
struct trx_sys_t {
|
||||
|
||||
|
|
|
@ -300,30 +300,6 @@ management to ensure correct alignment for doubles etc. */
|
|||
========================
|
||||
*/
|
||||
|
||||
/** There are currently two InnoDB file formats which are used to group
|
||||
features with similar restrictions and dependencies. Using an enum allows
|
||||
switch statements to give a compiler warning when a new one is introduced. */
|
||||
enum innodb_file_formats_enum {
|
||||
/** Antelope File Format: InnoDB/MySQL up to 5.1.
|
||||
This format includes REDUNDANT and COMPACT row formats */
|
||||
UNIV_FORMAT_A = 0,
|
||||
|
||||
/** Barracuda File Format: Introduced in InnoDB plugin for 5.1:
|
||||
This format includes COMPRESSED and DYNAMIC row formats. It
|
||||
includes the ability to create secondary indexes from data that
|
||||
is not on the clustered index page and the ability to store more
|
||||
data off the clustered index page. */
|
||||
UNIV_FORMAT_B = 1
|
||||
};
|
||||
|
||||
typedef enum innodb_file_formats_enum innodb_file_formats_t;
|
||||
|
||||
/** Minimum supported file format */
|
||||
#define UNIV_FORMAT_MIN UNIV_FORMAT_A
|
||||
|
||||
/** Maximum supported file format */
|
||||
#define UNIV_FORMAT_MAX UNIV_FORMAT_B
|
||||
|
||||
/** The 2-logarithm of UNIV_PAGE_SIZE: */
|
||||
#define UNIV_PAGE_SIZE_SHIFT srv_page_size_shift
|
||||
|
||||
|
|
|
@ -655,8 +655,8 @@ row_log_table_delete(
|
|||
old and new table are in COMPACT or REDUNDANT format,
|
||||
which store the prefix in the clustered index record. */
|
||||
if (rec_offs_any_extern(offsets)
|
||||
&& (dict_table_get_format(index->table) >= UNIV_FORMAT_B
|
||||
|| dict_table_get_format(new_table) >= UNIV_FORMAT_B)) {
|
||||
&& (dict_table_has_atomic_blobs(index->table)
|
||||
|| dict_table_has_atomic_blobs(new_table))) {
|
||||
|
||||
/* Build a cache of those off-page column prefixes
|
||||
that are referenced by secondary indexes. It can be
|
||||
|
|
|
@ -209,8 +209,8 @@ row_build_index_entry_low(
|
|||
}
|
||||
|
||||
if (flag == ROW_BUILD_FOR_UNDO
|
||||
&& dict_table_get_format(index->table)
|
||||
>= UNIV_FORMAT_B) {
|
||||
&& dict_table_has_atomic_blobs(
|
||||
index->table)) {
|
||||
/* For build entry for undo, and
|
||||
the table is Barrcuda, we need
|
||||
to skip the prefix data. */
|
||||
|
@ -287,11 +287,11 @@ row_build_index_entry_low(
|
|||
|
||||
/* If the column is stored externally (off-page) in
|
||||
the clustered index, it must be an ordering field in
|
||||
the secondary index. In the Antelope format, only
|
||||
prefix-indexed columns may be stored off-page in the
|
||||
clustered index record. In the Barracuda format, also
|
||||
fully indexed long CHAR or VARCHAR columns may be
|
||||
stored off-page. */
|
||||
the secondary index. If !atomic_blobs, the only way
|
||||
we may have a secondary index pointing to a clustered
|
||||
index record with an off-page column is when it is a
|
||||
column prefix index. If atomic_blobs, also fully
|
||||
indexed long columns may be stored off-page. */
|
||||
ut_ad(col->ord_part);
|
||||
|
||||
if (ext) {
|
||||
|
@ -306,9 +306,8 @@ row_build_index_entry_low(
|
|||
}
|
||||
|
||||
if (ind_field->prefix_len == 0) {
|
||||
/* In the Barracuda format
|
||||
(ROW_FORMAT=DYNAMIC or
|
||||
ROW_FORMAT=COMPRESSED), we can have a
|
||||
/* If ROW_FORMAT=DYNAMIC or
|
||||
ROW_FORMAT=COMPRESSED, we can have a
|
||||
secondary index on an entire column
|
||||
that is stored off-page in the
|
||||
clustered index. As this is not a
|
||||
|
@ -318,11 +317,12 @@ row_build_index_entry_low(
|
|||
continue;
|
||||
}
|
||||
} else if (dfield_is_ext(dfield)) {
|
||||
/* This table is either in Antelope format
|
||||
/* This table is either in
|
||||
(ROW_FORMAT=REDUNDANT or ROW_FORMAT=COMPACT)
|
||||
or a purge record where the ordered part of
|
||||
the field is not external.
|
||||
In Antelope, the maximum column prefix
|
||||
In ROW_FORMAT=REDUNDANT and ROW_FORMAT=COMPACT,
|
||||
the maximum column prefix
|
||||
index length is 767 bytes, and the clustered
|
||||
index record contains a 768-byte prefix of
|
||||
each off-page column. */
|
||||
|
|
|
@ -106,10 +106,10 @@ row_sel_sec_rec_is_for_blob(
|
|||
ulint len;
|
||||
byte buf[REC_VERSION_56_MAX_INDEX_COL_LEN];
|
||||
|
||||
/* This function should never be invoked on an Antelope format
|
||||
table, because they should always contain enough prefix in the
|
||||
clustered index record. */
|
||||
ut_ad(dict_table_get_format(table) >= UNIV_FORMAT_B);
|
||||
/* This function should never be invoked on tables in
|
||||
ROW_FORMAT=REDUNDANT or ROW_FORMAT=COMPACT, because they
|
||||
should always contain enough prefix in the clustered index record. */
|
||||
ut_ad(dict_table_has_atomic_blobs(table));
|
||||
ut_a(clust_len >= BTR_EXTERN_FIELD_REF_SIZE);
|
||||
ut_ad(prefix_len >= sec_len);
|
||||
ut_ad(prefix_len > 0);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue