diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-04-09 16:49:41 +0300 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2018-04-09 16:49:41 +0300 |
commit | 8ff897265a32898dd533c8da504937872ffa3935 (patch) | |
tree | 09461866ac69d85bd9289e04183a00c7aca4ec8d /mysql-test/t | |
parent | 803ded51484255aa0c3201aebecfe45e11482653 (diff) | |
download | mariadb-git-8ff897265a32898dd533c8da504937872ffa3935.tar.gz |
Update test cases post MDEV-10286
Table_open_cache gets adjusted on server startup to prevent an out of
file descriptor error. However this means that when we reset its value
to default, it does not get re-adjusted. This leads to the mtr
consistency check to fail with different server status at the end of the
test case as opposed to when it started.
To fix the problem, do not make use of the DEFAULT keyword to set the
variable back, instead save the value before any modifications and
restore it from there.
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/myisam.test | 3 | ||||
-rw-r--r-- | mysql-test/t/myisam_recover.test | 3 | ||||
-rw-r--r-- | mysql-test/t/variables.test | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 8c7ad012a65..cbf12d81cad 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -1216,13 +1216,14 @@ DROP TABLE t1; --echo # --echo # BUG#48438 - crash with error in unioned query against merge table and view... --echo # +SET @save_table_open_cache=@@table_open_cache; SET GLOBAL table_open_cache=10; CREATE TABLE t1(a INT); SELECT 1 FROM t1 AS a1, t1 AS a2, t1 AS a3, t1 AS a4, t1 AS a5, t1 AS a6, t1 AS a7, t1 AS a8, t1 AS a9, t1 AS a10, t1 AS a11 FOR UPDATE; SELECT TABLE_ROWS, DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'; DROP TABLE t1; -SET GLOBAL table_open_cache=DEFAULT; +SET GLOBAL table_open_cache=@save_table_open_cache; --echo End of 5.0 tests diff --git a/mysql-test/t/myisam_recover.test b/mysql-test/t/myisam_recover.test index 49fe9c33460..670dfd1aa49 100644 --- a/mysql-test/t/myisam_recover.test +++ b/mysql-test/t/myisam_recover.test @@ -24,6 +24,7 @@ call mtr.add_suppression("Got an error from thread_id=.*ha_myisam.cc:"); call mtr.add_suppression("MySQL thread id .*, query id .* localhost.*root Checking table"); call mtr.add_suppression(" '\..test.t1'"); +set @save_table_open_cache=@@table_open_cache; set global table_open_cache=256; set global table_definition_cache=400; --disable_warnings @@ -111,7 +112,7 @@ prepare stmt from @drop_table_stmt; execute stmt; deallocate prepare stmt; set @@global.table_definition_cache=default; -set @@global.table_open_cache=default; +set @@global.table_open_cache=@save_table_open_cache; disconnect con1; connection default; --enable_ps_protocol diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 8f29528ac25..458327328e4 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -343,6 +343,7 @@ set sql_select_limit=1; # reset it, so later tests don't get confused set sql_select_limit=default; set sql_warnings=1; +set @save_table_open_cache=@@table_open_cache; set global table_open_cache=100; set default_storage_engine=myisam; set global thread_cache_size=100; @@ -502,7 +503,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'MYI SET GLOBAL table_open_cache=-1; SHOW VARIABLES LIKE 'table_open_cache'; SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'table_open_cache'; -SET GLOBAL table_open_cache=DEFAULT; +SET GLOBAL table_open_cache=@save_table_open_cache; # # Bugs12363: character_set_results is nullable, |