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
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
--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
--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
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