summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-05-08 16:42:55 -0700
committerIgor Babaev <igor@askmonty.org>2012-05-08 16:42:55 -0700
commit2a1afc29f252fb189f6e93a2e0d3a1939f8220d5 (patch)
tree66df935533dfe35df5603e3ccd04e29919cc66ce /mysql-test
parent906c9a93a0da7df1e27d776d561c84c48ce7ee6d (diff)
downloadmariadb-git-2a1afc29f252fb189f6e93a2e0d3a1939f8220d5.tar.gz
Inverted the option --skip-stat-tables for --stat-tables.
Set it to 0 by default. Now only the tests that use persistent statistics tables require starting the server with --stat-tables set on.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/have_stat_tables.inc5
-rw-r--r--mysql-test/include/have_stat_tables.opt1
-rw-r--r--mysql-test/r/mysqld--help.result8
-rw-r--r--mysql-test/t/stat_tables.test1
-rw-r--r--mysql-test/t/statistics.test1
5 files changed, 12 insertions, 4 deletions
diff --git a/mysql-test/include/have_stat_tables.inc b/mysql-test/include/have_stat_tables.inc
new file mode 100644
index 00000000000..97d0e44e39e
--- /dev/null
+++ b/mysql-test/include/have_stat_tables.inc
@@ -0,0 +1,5 @@
+if (`select count(*) < 3 from information_schema.tables
+ where table_schema = 'mysql' and table_name in ('table_stat','column_stat','index_stat')`)
+{
+ --skip Needs stat tables
+}
diff --git a/mysql-test/include/have_stat_tables.opt b/mysql-test/include/have_stat_tables.opt
new file mode 100644
index 00000000000..eb8f2d54ff6
--- /dev/null
+++ b/mysql-test/include/have_stat_tables.opt
@@ -0,0 +1 @@
+--stat-tables
diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result
index 6b8ff4e5471..83fb6b566e2 100644
--- a/mysql-test/r/mysqld--help.result
+++ b/mysql-test/r/mysqld--help.result
@@ -720,9 +720,6 @@ The following options may be given as the first argument:
--skip-show-database
Don't allow 'SHOW DATABASE' commands
--skip-slave-start If set, slave is not autostarted.
- --skip-stat-tables Start without statistical tables. Statistical data on
- table cardinalities, columns and indexes from these
- tables become unavailable
--skip-thread-priority
Don't give threads different priorities. This option is
deprecated because it has no effect; the implied behavior
@@ -781,6 +778,9 @@ The following options may be given as the first argument:
for the complete list of valid sql modes
--stack-trace Print a symbolic stack trace on failure
(Defaults to on; use --skip-stack-trace to disable.)
+ --stat-tables Start with statistical tables. Statistical data on table
+ cardinalities, columns and indexes from these tables
+ become available
--stored-program-cache=#
The soft upper limit for number of cached stored routines
for one connection.
@@ -1057,7 +1057,6 @@ skip-name-resolve FALSE
skip-networking FALSE
skip-show-database FALSE
skip-slave-start FALSE
-skip-stat-tables TRUE
slave-compressed-protocol FALSE
slave-exec-mode STRICT
slave-net-timeout 3600
@@ -1070,6 +1069,7 @@ slow-query-log FALSE
sort-buffer-size 2097152
sql-mode
stack-trace TRUE
+stat-tables FALSE
stored-program-cache 256
symbolic-links FALSE
sync-binlog 0
diff --git a/mysql-test/t/stat_tables.test b/mysql-test/t/stat_tables.test
index aecb43fe763..47ec0696552 100644
--- a/mysql-test/t/stat_tables.test
+++ b/mysql-test/t/stat_tables.test
@@ -1,3 +1,4 @@
+--source include/have_stat_tables.inc
set @save_optimizer_use_stat_tables=@@optimizer_use_stat_tables;
diff --git a/mysql-test/t/statistics.test b/mysql-test/t/statistics.test
index 81108c9846d..7d1b207689c 100644
--- a/mysql-test/t/statistics.test
+++ b/mysql-test/t/statistics.test
@@ -1,3 +1,4 @@
+--source include/have_stat_tables.inc
--source include/have_innodb.inc
--disable_warnings
drop table if exists t1,t2;