Commit 86beb087 authored by Marko Mäkelä's avatar Marko Mäkelä

Remove an unnecessary dependency on persistent statistics

parent 0af52734
...@@ -2,18 +2,7 @@ call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the ...@@ -2,18 +2,7 @@ call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the
SELECT @@innodb_page_size; SELECT @@innodb_page_size;
@@innodb_page_size @@innodb_page_size
32768 32768
SET GLOBAL innodb_file_format='Barracuda'; SET innodb_strict_mode=ON;
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
CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255), 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), 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), 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; ...@@ -337,11 +326,9 @@ FLUSH TABLE t;
ANALYZE TABLE t; ANALYZE TABLE t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t analyze status OK 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'; SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
stat_value WHERE name = 'test/t';
6 clust_index_size
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
clustered_index_size
7 7
DROP TABLE t; DROP TABLE t;
CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
...@@ -359,11 +346,9 @@ FLUSH TABLE t; ...@@ -359,11 +346,9 @@ FLUSH TABLE t;
ANALYZE TABLE t; ANALYZE TABLE t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t analyze status OK 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'; SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
stat_value WHERE name = 'test/t';
4 clust_index_size
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
clustered_index_size
5 5
DROP TABLE t; DROP TABLE t;
CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT; CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT;
...@@ -381,11 +366,8 @@ FLUSH TABLE t; ...@@ -381,11 +366,8 @@ FLUSH TABLE t;
ANALYZE TABLE t; ANALYZE TABLE t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t analyze status OK 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'; SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
stat_value WHERE name = 'test/t';
4 clust_index_size
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
clustered_index_size
5 5
DROP TABLE t; DROP TABLE t;
# Success
...@@ -2,18 +2,7 @@ call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the ...@@ -2,18 +2,7 @@ call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the
SELECT @@innodb_page_size; SELECT @@innodb_page_size;
@@innodb_page_size @@innodb_page_size
65536 65536
SET GLOBAL innodb_file_format='Barracuda'; SET innodb_strict_mode=ON;
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
CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255), 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), 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), 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; ...@@ -540,11 +529,9 @@ FLUSH TABLE t;
ANALYZE TABLE t; ANALYZE TABLE t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t analyze status OK 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'; SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
stat_value WHERE name = 'test/t';
4 clust_index_size
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
clustered_index_size
5 5
DROP TABLE t; DROP TABLE t;
CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
...@@ -562,11 +549,9 @@ FLUSH TABLE t; ...@@ -562,11 +549,9 @@ FLUSH TABLE t;
ANALYZE TABLE t; ANALYZE TABLE t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t analyze status OK 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'; SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
stat_value WHERE name = 'test/t';
3 clust_index_size
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
clustered_index_size
4 4
DROP TABLE t; DROP TABLE t;
CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT; CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT;
...@@ -584,11 +569,8 @@ FLUSH TABLE t; ...@@ -584,11 +569,8 @@ FLUSH TABLE t;
ANALYZE TABLE t; ANALYZE TABLE t;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t analyze status OK 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'; SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
stat_value WHERE name = 'test/t';
3 clust_index_size
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
clustered_index_size
4 4
DROP TABLE t; DROP TABLE t;
# Success
--innodb-page-size=32K --innodb-page-size=32K
--innodb_buffer_pool_size=32M --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 ...@@ -6,19 +6,7 @@ call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the
# Check page size 32k # Check page size 32k
SELECT @@innodb_page_size; SELECT @@innodb_page_size;
let $innodb_file_per_table = `SELECT @@innodb_file_per_table`; SET innodb_strict_mode=ON;
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;
# Check the error when the max record length > 16K for innodb_page_size=32k # Check the error when the max record length > 16K for innodb_page_size=32k
--error ER_TOO_BIG_ROWSIZE --error ER_TOO_BIG_ROWSIZE
...@@ -359,9 +347,8 @@ INSERT INTO t VALUES (REPEAT('a',65535)); ...@@ -359,9 +347,8 @@ INSERT INTO t VALUES (REPEAT('a',65535));
SELECT LENGTH(col) FROM t; SELECT LENGTH(col) FROM t;
FLUSH TABLE t; FLUSH TABLE t;
ANALYZE TABLE t; ANALYZE TABLE t;
# retrieve the number of leaf pages SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages'; WHERE name = 'test/t';
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
DROP TABLE t; DROP TABLE t;
CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
...@@ -372,9 +359,8 @@ INSERT INTO t VALUES (REPEAT('a',65535)); ...@@ -372,9 +359,8 @@ INSERT INTO t VALUES (REPEAT('a',65535));
SELECT LENGTH(col) FROM t; SELECT LENGTH(col) FROM t;
FLUSH TABLE t; FLUSH TABLE t;
ANALYZE TABLE t; ANALYZE TABLE t;
# retrieve the number of leaf pages SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages'; WHERE name = 'test/t';
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
DROP TABLE t; DROP TABLE t;
CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT; CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT;
...@@ -385,19 +371,6 @@ INSERT INTO t VALUES (REPEAT('a',65535)); ...@@ -385,19 +371,6 @@ INSERT INTO t VALUES (REPEAT('a',65535));
SELECT LENGTH(col) FROM t; SELECT LENGTH(col) FROM t;
FLUSH TABLE t; FLUSH TABLE t;
ANALYZE TABLE t; ANALYZE TABLE t;
# retrieve the number of leaf pages SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages'; WHERE name = 'test/t';
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
DROP TABLE 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
--innodb-page-size=64K --innodb-page-size=64K
--innodb_buffer_pool_size=32M --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 ...@@ -6,19 +6,7 @@ call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the
# Check page size 64k # Check page size 64k
SELECT @@innodb_page_size; SELECT @@innodb_page_size;
let $innodb_file_per_table = `SELECT @@innodb_file_per_table`; SET innodb_strict_mode=ON;
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;
# Check the error when the max record length > 32K for innodb_page_size=64k # Check the error when the max record length > 32K for innodb_page_size=64k
--error ER_TOO_BIG_ROWSIZE --error ER_TOO_BIG_ROWSIZE
...@@ -563,9 +551,8 @@ INSERT INTO t VALUES (REPEAT('a',65535)); ...@@ -563,9 +551,8 @@ INSERT INTO t VALUES (REPEAT('a',65535));
SELECT LENGTH(col) FROM t; SELECT LENGTH(col) FROM t;
FLUSH TABLE t; FLUSH TABLE t;
ANALYZE TABLE t; ANALYZE TABLE t;
# retrieve the number of leaf pages SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages'; WHERE name = 'test/t';
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
DROP TABLE t; DROP TABLE t;
CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
...@@ -576,9 +563,8 @@ INSERT INTO t VALUES (REPEAT('a',65535)); ...@@ -576,9 +563,8 @@ INSERT INTO t VALUES (REPEAT('a',65535));
SELECT LENGTH(col) FROM t; SELECT LENGTH(col) FROM t;
FLUSH TABLE t; FLUSH TABLE t;
ANALYZE TABLE t; ANALYZE TABLE t;
# retrieve the number of leaf pages SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages'; WHERE name = 'test/t';
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
DROP TABLE t; DROP TABLE t;
CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT; CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT;
...@@ -589,19 +575,6 @@ INSERT INTO t VALUES (REPEAT('a',65535)); ...@@ -589,19 +575,6 @@ INSERT INTO t VALUES (REPEAT('a',65535));
SELECT LENGTH(col) FROM t; SELECT LENGTH(col) FROM t;
FLUSH TABLE t; FLUSH TABLE t;
ANALYZE TABLE t; ANALYZE TABLE t;
# retrieve the number of leaf pages SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
SELECT stat_value FROM mysql.innodb_index_stats where database_name = 'test' and table_name= 't' and stat_name='n_leaf_pages'; WHERE name = 'test/t';
SELECT clustered_index_size from mysql.innodb_table_stats where database_name = 'test' and table_name= 't';
DROP TABLE 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment