In statistics.test:

Saved at the very beginning and restored at the very end
the value of optimizer_use_stat_tables.
This commit is contained in:
Igor Babaev 2012-01-04 18:32:21 -08:00
parent e8497370b9
commit 7895f510a4
2 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,5 @@
drop table if exists t1,t2;
set @save_optimizer_use_stat_tables=@@optimizer_use_stat_tables;
CREATE VIEW table_stat AS
SELECT * FROM mysql.table_stat;
CREATE VIEW column_stat AS
@ -453,3 +454,4 @@ DELETE FROM mysql.index_stat;
DROP VIEW test.table_stat;
DROP VIEW test.column_stat;
DROP VIEW test.index_stat;
set optimizer_use_stat_tables=@save_optimizer_use_stat_tables;

View File

@ -3,6 +3,8 @@
drop table if exists t1,t2;
--enable_warnings
set @save_optimizer_use_stat_tables=@@optimizer_use_stat_tables;
CREATE VIEW table_stat AS
SELECT * FROM mysql.table_stat;
@ -286,5 +288,6 @@ DROP VIEW test.table_stat;
DROP VIEW test.column_stat;
DROP VIEW test.index_stat;
set optimizer_use_stat_tables=@save_optimizer_use_stat_tables;