Commit b0bccac1 authored by Alice Sherepa's avatar Alice Sherepa

stats_

parent 7f125257
......@@ -10,11 +10,9 @@ test.test_ps_sample_pages_used analyze status OK
SELECT stat_name, stat_value FROM mysql.innodb_index_stats
WHERE table_name='test_ps_sample_pages_used' AND stat_name='n_leaf_pages';
stat_name stat_value
n_leaf_pages 37
SELECT sample_size FROM mysql.innodb_index_stats
WHERE table_name='test_ps_sample_pages_used' AND stat_name='n_diff_pfx01';
sample_size
17
ALTER TABLE test_ps_sample_pages_used STATS_SAMPLE_PAGES=14;
ANALYZE TABLE test_ps_sample_pages_used;
Table Op Msg_type Msg_text
......@@ -22,6 +20,5 @@ test.test_ps_sample_pages_used analyze status OK
SELECT sample_size FROM mysql.innodb_index_stats
WHERE table_name='test_ps_sample_pages_used' AND stat_name='n_diff_pfx01';
sample_size
14
DROP TABLE test_ps_sample_pages_used;
SET GLOBAL innodb_stats_persistent_sample_pages=default;
CREATE TABLE test_ps_sample_pages (a INT, PRIMARY KEY (a)) ENGINE=INNODB;
SHOW CREATE TABLE test_ps_sample_pages;
Table test_ps_sample_pages
Create Table CREATE TABLE `test_ps_sample_pages` (
Table test_ps_sample_pages
Create Table CREATE TABLE `test_ps_sample_pages` (
`a` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT create_options FROM information_schema.tables
WHERE table_name='test_ps_sample_pages';
create_options
create_options
ALTER TABLE test_ps_sample_pages STATS_SAMPLE_PAGES=12345;
SHOW CREATE TABLE test_ps_sample_pages;
Table test_ps_sample_pages
Create Table CREATE TABLE `test_ps_sample_pages` (
Table test_ps_sample_pages
Create Table CREATE TABLE `test_ps_sample_pages` (
`a` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_SAMPLE_PAGES=12345
SELECT create_options FROM information_schema.tables
WHERE table_name='test_ps_sample_pages';
create_options stats_sample_pages=12345
create_options stats_sample_pages=12345
DROP TABLE test_ps_sample_pages;
CREATE TABLE test_ps_sample_pages (a INT, PRIMARY KEY (a)) ENGINE=INNODB
STATS_SAMPLE_PAGES=default;
SHOW CREATE TABLE test_ps_sample_pages;
Table test_ps_sample_pages
Create Table CREATE TABLE `test_ps_sample_pages` (
Table test_ps_sample_pages
Create Table CREATE TABLE `test_ps_sample_pages` (
`a` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT create_options FROM information_schema.tables
WHERE table_name='test_ps_sample_pages';
create_options
create_options
DROP TABLE test_ps_sample_pages;
CREATE TABLE test_ps_sample_pages (a INT, PRIMARY KEY (a)) ENGINE=INNODB
STATS_SAMPLE_PAGES=-5;
......@@ -49,8 +49,8 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
CREATE TABLE test_ps_sample_pages (a INT, PRIMARY KEY (a)) ENGINE=INNODB
STATS_SAMPLE_PAGES=65535;
SHOW CREATE TABLE test_ps_sample_pages;
Table test_ps_sample_pages
Create Table CREATE TABLE `test_ps_sample_pages` (
Table test_ps_sample_pages
Create Table CREATE TABLE `test_ps_sample_pages` (
`a` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_SAMPLE_PAGES=65535
......@@ -58,34 +58,34 @@ DROP TABLE test_ps_sample_pages;
CREATE TABLE test_ps_sample_pages (a INT, PRIMARY KEY (a)) ENGINE=INNODB
STATS_SAMPLE_PAGES=1;
SHOW CREATE TABLE test_ps_sample_pages;
Table test_ps_sample_pages
Create Table CREATE TABLE `test_ps_sample_pages` (
Table test_ps_sample_pages
Create Table CREATE TABLE `test_ps_sample_pages` (
`a` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_SAMPLE_PAGES=1
SELECT create_options FROM information_schema.tables
WHERE table_name='test_ps_sample_pages';
create_options stats_sample_pages=1
create_options stats_sample_pages=1
DROP TABLE test_ps_sample_pages;
CREATE TABLE test_ps_sample_pages (a INT, PRIMARY KEY (a)) ENGINE=INNODB
STATS_SAMPLE_PAGES=5678;
SHOW CREATE TABLE test_ps_sample_pages;
Table test_ps_sample_pages
Create Table CREATE TABLE `test_ps_sample_pages` (
Table test_ps_sample_pages
Create Table CREATE TABLE `test_ps_sample_pages` (
`a` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 STATS_SAMPLE_PAGES=5678
SELECT create_options FROM information_schema.tables
WHERE table_name='test_ps_sample_pages';
create_options stats_sample_pages=5678
create_options stats_sample_pages=5678
ALTER TABLE test_ps_sample_pages STATS_SAMPLE_PAGES=default;
SHOW CREATE TABLE test_ps_sample_pages;
Table test_ps_sample_pages
Create Table CREATE TABLE `test_ps_sample_pages` (
Table test_ps_sample_pages
Create Table CREATE TABLE `test_ps_sample_pages` (
`a` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT create_options FROM information_schema.tables
WHERE table_name='test_ps_sample_pages';
create_options
create_options
DROP TABLE test_ps_sample_pages;
......@@ -16,6 +16,6 @@ a b
3 ghi
"Unexpected count: 0"
DROP TABLE t1;
SET GLOBAL innodb_stats_persistent = default;
SET GLOBAL innodb_stats_persistent = off;
SET GLOBAL innodb_stats_auto_recalc = default;
SET GLOBAL innodb_purge_run_now = ON;
--innodb-stats-persistent=1
\ No newline at end of file
--innodb-stats-persistent=1
\ No newline at end of file
......@@ -35,6 +35,6 @@ if ($diff != 3) {
DROP TABLE t1;
SET GLOBAL innodb_stats_persistent = default;
SET GLOBAL innodb_stats_persistent = off;
SET GLOBAL innodb_stats_auto_recalc = default;
SET GLOBAL innodb_purge_run_now = ON;
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