mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed bug mdev-518.
If some statistical tables are corrupted the server should use the conventional statistical data.
This commit is contained in:
@ -391,6 +391,22 @@ 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;
|
||||
set optimizer_switch=@save_optimizer_switch_for_stat_tables_test;
|
||||
SET SESSION STORAGE_ENGINE=DEFAULT;
|
||||
|
Reference in New Issue
Block a user