Skip to content
Permalink
Browse files
Merge 10.2 into bb-10.2-ext
  • Loading branch information
dr-m committed Dec 11, 2017
2 parents 927dd9f + 13b9ec6 commit e312a40
Show file tree
Hide file tree
Showing 39 changed files with 364 additions and 307 deletions.
@@ -2,18 +2,7 @@ call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the
SELECT @@innodb_page_size;
@@innodb_page_size
32768
SET GLOBAL innodb_file_format='Barracuda';
SET GLOBAL innodb_file_per_table=ON;
SET @@innodb_strict_mode=ON;
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SELECT @@innodb_strict_mode;
@@innodb_strict_mode
1
SET innodb_strict_mode=ON;
CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
@@ -337,11 +326,9 @@ FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
test.t analyze status OK
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages';
stat_value
6
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
clustered_index_size
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
clust_index_size
7
DROP TABLE t;
CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
@@ -359,11 +346,9 @@ FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
test.t analyze status OK
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages';
stat_value
4
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
clustered_index_size
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
clust_index_size
5
DROP TABLE t;
CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT;
@@ -381,11 +366,8 @@ FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
test.t analyze status OK
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages';
stat_value
4
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
clustered_index_size
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
clust_index_size
5
DROP TABLE t;
# Success
@@ -2,18 +2,7 @@ call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the
SELECT @@innodb_page_size;
@@innodb_page_size
65536
SET GLOBAL innodb_file_format='Barracuda';
SET GLOBAL innodb_file_per_table=ON;
SET @@innodb_strict_mode=ON;
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SELECT @@innodb_strict_mode;
@@innodb_strict_mode
1
SET innodb_strict_mode=ON;
CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
@@ -540,11 +529,9 @@ FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
test.t analyze status OK
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages';
stat_value
4
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
clustered_index_size
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
clust_index_size
5
DROP TABLE t;
CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
@@ -562,11 +549,9 @@ FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
test.t analyze status OK
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages';
stat_value
3
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
clustered_index_size
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
clust_index_size
4
DROP TABLE t;
CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT;
@@ -584,11 +569,8 @@ FLUSH TABLE t;
ANALYZE TABLE t;
Table Op Msg_type Msg_text
test.t analyze status OK
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages';
stat_value
3
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
clustered_index_size
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
clust_index_size
4
DROP TABLE t;
# Success
@@ -0,0 +1,57 @@
connect stop_purge, localhost, root,,;
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connect delete, localhost, root,,;
connection default;
CREATE TABLE t1(a INT PRIMARY KEY, b INT UNIQUE) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1,1);
DELETE FROM t1;
SET DEBUG_SYNC='row_ins_sec_index_unique SIGNAL inserted WAIT_FOR locked';
BEGIN;
INSERT INTO t1 VALUES(1,1);
connection delete;
SET DEBUG_SYNC='now WAIT_FOR inserted';
SET DEBUG_SYNC='innodb_row_search_for_mysql_exit SIGNAL locked';
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
BEGIN;
DELETE FROM t1 WHERE b=1;
connection default;
connection delete;
COMMIT;
connection default;
SET DEBUG_SYNC='RESET';
ROLLBACK;
SET DEBUG_SYNC='row_ins_sec_index_unique SIGNAL inserted WAIT_FOR locked';
BEGIN;
INSERT INTO t1 VALUES(1,1);
connection delete;
SET DEBUG_SYNC='now WAIT_FOR inserted';
SET DEBUG_SYNC='innodb_row_search_for_mysql_exit SIGNAL locked';
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
BEGIN;
DELETE FROM t1 WHERE b=1;
connection default;
connection delete;
COMMIT;
connection default;
SET DEBUG_SYNC='RESET';
ROLLBACK;
SET DEBUG_SYNC='row_ins_sec_index_unique SIGNAL inserted WAIT_FOR locked';
BEGIN;
SET innodb_lock_wait_timeout=1;
INSERT INTO t1 VALUES(1,1);
connection delete;
SET DEBUG_SYNC='now WAIT_FOR inserted';
SET DEBUG_SYNC='innodb_row_search_for_mysql_exit SIGNAL locked';
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
BEGIN;
DELETE FROM t1 WHERE b=1;
connection default;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
COMMIT;
SET DEBUG_SYNC='RESET';
connection delete;
COMMIT;
disconnect delete;
disconnect stop_purge;
connection default;
DROP TABLE t1;
@@ -1,3 +1,4 @@
--innodb-page-size=32K
--innodb_buffer_pool_size=32M
--innodb-stats-persistent=ON
--skip-innodb-stats-persistent
--innodb-sys-tablestats
@@ -6,19 +6,7 @@ call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the
# Check page size 32k
SELECT @@innodb_page_size;

let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
let $innodb_file_format = `SELECT @@innodb_file_format`;
let $innodb_strict_mode = `SELECT @@innodb_strict_mode`;

--disable_warnings
SET GLOBAL innodb_file_format='Barracuda';
SET GLOBAL innodb_file_per_table=ON;
SET @@innodb_strict_mode=ON;
--enable_warnings

SELECT @@innodb_file_format;
SELECT @@innodb_file_per_table;
SELECT @@innodb_strict_mode;
SET innodb_strict_mode=ON;

# Check the error when the max record length > 16K for innodb_page_size=32k
--error ER_TOO_BIG_ROWSIZE
@@ -359,9 +347,8 @@ INSERT INTO t VALUES (REPEAT('a',65535));
SELECT LENGTH(col) FROM t;
FLUSH TABLE t;
ANALYZE TABLE t;
# retrieve the number of leaf pages
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages';
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
DROP TABLE t;

CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
@@ -372,9 +359,8 @@ INSERT INTO t VALUES (REPEAT('a',65535));
SELECT LENGTH(col) FROM t;
FLUSH TABLE t;
ANALYZE TABLE t;
# retrieve the number of leaf pages
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages';
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
DROP TABLE t;

CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT;
@@ -385,19 +371,6 @@ INSERT INTO t VALUES (REPEAT('a',65535));
SELECT LENGTH(col) FROM t;
FLUSH TABLE t;
ANALYZE TABLE t;
# retrieve the number of leaf pages
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages';
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
DROP TABLE t;

# cleanup
--disable_query_log
--disable_warnings
eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format;
eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table;
eval SET GLOBAL INNODB_STRICT_MODE=$innodb_strict_mode;
--enable_warnings
--enable_query_log

--echo # Success

@@ -1,3 +1,4 @@
--innodb-page-size=64K
--innodb_buffer_pool_size=32M
--innodb-stats-persistent=ON
--skip-innodb-stats-persistent
--innodb-sys-tablestats
@@ -6,19 +6,7 @@ call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the
# Check page size 64k
SELECT @@innodb_page_size;

let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
let $innodb_file_format = `SELECT @@innodb_file_format`;
let $innodb_strict_mode = `SELECT @@innodb_strict_mode`;

--disable_warnings
SET GLOBAL innodb_file_format='Barracuda';
SET GLOBAL innodb_file_per_table=ON;
SET @@innodb_strict_mode=ON;
--enable_warnings

SELECT @@innodb_file_format;
SELECT @@innodb_file_per_table;
SELECT @@innodb_strict_mode;
SET innodb_strict_mode=ON;

# Check the error when the max record length > 32K for innodb_page_size=64k
--error ER_TOO_BIG_ROWSIZE
@@ -563,9 +551,8 @@ INSERT INTO t VALUES (REPEAT('a',65535));
SELECT LENGTH(col) FROM t;
FLUSH TABLE t;
ANALYZE TABLE t;
# retrieve the number of leaf pages
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages';
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
DROP TABLE t;

CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
@@ -576,9 +563,8 @@ INSERT INTO t VALUES (REPEAT('a',65535));
SELECT LENGTH(col) FROM t;
FLUSH TABLE t;
ANALYZE TABLE t;
# retrieve the number of leaf pages
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages';
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
DROP TABLE t;

CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT;
@@ -589,19 +575,6 @@ INSERT INTO t VALUES (REPEAT('a',65535));
SELECT LENGTH(col) FROM t;
FLUSH TABLE t;
ANALYZE TABLE t;
# retrieve the number of leaf pages
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages';
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t';
DROP TABLE t;

# cleanup
--disable_query_log
--disable_warnings
eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format;
eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table;
eval SET GLOBAL INNODB_STRICT_MODE=$innodb_strict_mode;
--enable_warnings
--enable_query_log

--echo # Success

0 comments on commit e312a40

Please sign in to comment.