diff options
author | Igor Babaev <igor@askmonty.org> | 2012-08-17 13:23:49 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2012-08-17 13:23:49 -0700 |
commit | 85db02984f2306691df6acce1caf7f146beb471f (patch) | |
tree | 1e54baf0333d5e9764eda7afa61d3743f701caba | |
parent | 822e5da0d069e6567713464e7492097fab33e55d (diff) | |
download | mariadb-git-85db02984f2306691df6acce1caf7f146beb471f.tar.gz |
Fixed bug mdev-464.
The value of system variable use_stat_tables was always reset to 0 ('never')
by mistake at the launch of the server.
-rw-r--r-- | mysql-test/r/stat_tables.result | 6 | ||||
-rw-r--r-- | mysql-test/r/stat_tables_innodb.result | 6 | ||||
-rw-r--r-- | mysql-test/t/stat_tables.test | 3 | ||||
-rw-r--r-- | sql/mysqld.cc | 2 |
4 files changed, 15 insertions, 2 deletions
diff --git a/mysql-test/r/stat_tables.result b/mysql-test/r/stat_tables.result index 26f2b602c6b..5d098bc9ef9 100644 --- a/mysql-test/r/stat_tables.result +++ b/mysql-test/r/stat_tables.result @@ -1,3 +1,9 @@ +select @@global.use_stat_tables; +@@global.use_stat_tables +COMPLEMENTARY +select @@session.use_stat_tables; +@@session.use_stat_tables +COMPLEMENTARY set @save_use_stat_tables=@@use_stat_tables; set use_stat_tables='preferably'; DROP DATABASE IF EXISTS dbt3_s001; diff --git a/mysql-test/r/stat_tables_innodb.result b/mysql-test/r/stat_tables_innodb.result index 3d534dcab29..2bdc618b566 100644 --- a/mysql-test/r/stat_tables_innodb.result +++ b/mysql-test/r/stat_tables_innodb.result @@ -1,6 +1,12 @@ SET SESSION STORAGE_ENGINE='InnoDB'; set @save_optimizer_switch_for_stat_tables_test=@@optimizer_switch; set optimizer_switch='extended_keys=on'; +select @@global.use_stat_tables; +@@global.use_stat_tables +COMPLEMENTARY +select @@session.use_stat_tables; +@@session.use_stat_tables +COMPLEMENTARY set @save_use_stat_tables=@@use_stat_tables; set use_stat_tables='preferably'; DROP DATABASE IF EXISTS dbt3_s001; diff --git a/mysql-test/t/stat_tables.test b/mysql-test/t/stat_tables.test index 640f9febc75..2ef915cf12c 100644 --- a/mysql-test/t/stat_tables.test +++ b/mysql-test/t/stat_tables.test @@ -1,5 +1,8 @@ --source include/have_stat_tables.inc +select @@global.use_stat_tables; +select @@session.use_stat_tables; + set @save_use_stat_tables=@@use_stat_tables; set use_stat_tables='preferably'; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index c58fcba4955..1947d42fca5 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3752,8 +3752,6 @@ static int init_common_variables() global_system_variables.character_set_results= default_charset_info; global_system_variables.character_set_client= default_charset_info; - global_system_variables.use_stat_tables= 0; - if (!(character_set_filesystem= get_charset_by_csname(character_set_filesystem_name, MY_CS_PRIMARY, MYF(MY_WME)))) |