Commit e6256fca authored by Alice Sherepa's avatar Alice Sherepa

innodb_stats

parent 5f398e9b
......@@ -4,7 +4,7 @@ SELECT index_name, stat_name, stat_value FROM mysql.innodb_index_stats WHERE tab
INSERT INTO autorecalc VALUES (1);
INSERT INTO autorecalc VALUES (2);
Timeout in wait_condition.inc for SELECT stat_value = 2 FROM mysql.innodb_index_stats WHERE table_name = 'autorecalc' AND index_name = 'PRIMARY' AND stat_name = 'n_diff_pfx01'
Id 7
Id 3
User root
Host localhost
db test
......@@ -17,7 +17,7 @@ SELECT n_rows, clustered_index_size FROM mysql.innodb_table_stats WHERE table_na
SELECT index_name, stat_name, stat_value FROM mysql.innodb_index_stats WHERE table_name = 'autorecalc';
DELETE FROM autorecalc;
Timeout in wait_condition.inc for SELECT stat_value = 0 FROM mysql.innodb_index_stats WHERE table_name = 'autorecalc' AND index_name = 'PRIMARY' AND stat_name = 'n_diff_pfx01'
Id 7
Id 3
User root
Host localhost
db test
......
......@@ -4,7 +4,6 @@
-- source include/have_innodb.inc
# Page numbers printed by this test depend on the page size
-- source include/have_innodb_16k.inc
-- vertical_results
......
......@@ -7,7 +7,6 @@
# Various sizes printed in this test depend on the page size and the
# functionality tested here is not related to the page size, so we only
# test with 16k page size.
-- source include/have_innodb_16k.inc
call mtr.add_suppression("InnoDB: Error: Table \"mysql\".\"innodb_index_stats\" not found");
call mtr.add_suppression("InnoDB: Error: Fetch of persistent statistics requested for table");
......
......@@ -6,6 +6,16 @@
#--source include/big_test.inc
--source include/not_valgrind.inc
let $seconddigit=`select SUBSTRING(version(),4,1)`;
let $minordigits=`select SUBSTRING(version(),6,2)`;
echo $seconddigit, $minordigits;
if ($seconddigit < 2 || ($seconddigit == 2 && $minordigits<6))
{
--skip Test requires version >10.2.6
}
--echo "Test 1:- Uncommited delete test"
CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
val INT UNSIGNED NOT NULL,
......@@ -47,7 +57,8 @@ connection default;
# To make test determinstic in case stats calculation is not
# triggered we will call analyze table
analyze table t1;
let $row_count= query_get_value(EXPLAIN SELECT * FROM t1 WHERE val=4, rows,1);
let $row_count= query_get_value(EXPLAIN SELECT * FROM t1 WHERE val=4, rows, 1);
echo $row_count;
if ($row_count > 20000)
{
--echo Test correctly estimates the number of rows as > 20000
......
--innodb_page_size=16384
\ No newline at end of file
......@@ -5,7 +5,6 @@
-- source include/have_innodb.inc
# Page numbers printed by this test depend on the page size
-- source include/have_innodb_16k.inc
SET GLOBAL innodb_stats_persistent_sample_pages=17;
......
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