summaryrefslogtreecommitdiff
path: root/mysql-test/r/stat_tables.result
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-09-11 22:36:04 -0700
committerIgor Babaev <igor@askmonty.org>2012-09-11 22:36:04 -0700
commit2bbcec41488ff4506cb848357086e8fb07a9648c (patch)
tree32adff3114bf43b9c1cb029bfdf9d35e309cd0e0 /mysql-test/r/stat_tables.result
parentff36e9fc518a4f8b463a09aeb9499c4552a27534 (diff)
downloadmariadb-git-2bbcec41488ff4506cb848357086e8fb07a9648c.tar.gz
Fixed bug mdev-518.
If some statistical tables are corrupted the server should use the conventional statistical data.
Diffstat (limited to 'mysql-test/r/stat_tables.result')
-rw-r--r--mysql-test/r/stat_tables.result16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/r/stat_tables.result b/mysql-test/r/stat_tables.result
index 3cc650e7050..169266fea25 100644
--- a/mysql-test/r/stat_tables.result
+++ b/mysql-test/r/stat_tables.result
@@ -364,4 +364,20 @@ ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
DROP TABLE t1;
+#
+# Bug mdev-518: corrupted/missing statistical tables
+#
+CREATE TABLE t1 (i int) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1),(2);
+FLUSH TABLE t1;
+SET use_stat_tables='never';
+EXPLAIN SELECT * FROM t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2
+FLUSH TABLES;
+SET use_stat_tables='preferably';
+EXPLAIN SELECT * FROM t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2
+DROP TABLE t1;
set use_stat_tables=@save_use_stat_tables;