Skip to content

Commit 6438c3b

Browse files
author
Bharathy Satish
committed
Bug #28799559: TESTS DON'T WORK WITH DEFAULT SETTING OF MAX OPEN FILE
DESCRIPTORS Problem: Default value for variable innodb_open_files is different on different platforms which causes result file mismatch. max_open_files vlaue is calculated on runtime based on parameters like max_connections, table_open_cache. So if max_open_files limit is set to a value more than the calculated value, mysqld reports a warning. Fix: Fix is to add a suppresion for the warning, and removed the innodb_open_files variable as this is not needed in the test file.
1 parent 85651d7 commit 6438c3b

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

mysql-test/r/persisted_variables_bugs.result

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,6 @@ SELECT @@global.disabled_storage_engines;
165165
SELECT @@global.collation_database;
166166
@@global.collation_database
167167
utf8mb4_0900_ai_ci
168-
SELECT @@global.innodb_open_files;
169-
@@global.innodb_open_files
170-
4000
171168
SELECT @@global.optimizer_trace_offset;
172169
@@global.optimizer_trace_offset
173170
-1
@@ -184,7 +181,6 @@ SET @@global.binlog_cache_size= 4096;
184181
SET @@persist_only.binlog_cache_size= default,
185182
@@persist_only.collation_database= default,
186183
@@persist_only.disabled_storage_engines= default,
187-
@@persist_only.innodb_open_files= default,
188184
@@persist_only.optimizer_trace_offset= default,
189185
@@persist_only.optimizer_switch= default,
190186
@@persist_only.enforce_gtid_consistency= default,
@@ -195,7 +191,6 @@ binlog_cache_size 32768
195191
collation_database utf8mb4_0900_ai_ci
196192
disabled_storage_engines
197193
enforce_gtid_consistency 0
198-
innodb_open_files 0
199194
optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,duplicateweedout=on,subquery_materialization_cost_based=on,use_index_extensions=on,condition_fanout_filter=on,derived_merge=on,use_invisible_indexes=off,skip_scan=on
200195
optimizer_trace_offset -1
201196
sql_mode ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
@@ -210,9 +205,6 @@ SELECT @@global.disabled_storage_engines;
210205
SELECT @@global.collation_database;
211206
@@global.collation_database
212207
utf8mb4_0900_ai_ci
213-
SELECT @@global.innodb_open_files;
214-
@@global.innodb_open_files
215-
4000
216208
SELECT @@global.optimizer_trace_offset;
217209
@@global.optimizer_trace_offset
218210
-1
@@ -231,7 +223,6 @@ binlog_cache_size 32768
231223
collation_database utf8mb4_0900_ai_ci
232224
disabled_storage_engines
233225
enforce_gtid_consistency 0
234-
innodb_open_files 0
235226
optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,duplicateweedout=on,subquery_materialization_cost_based=on,use_index_extensions=on,condition_fanout_filter=on,derived_merge=on,use_invisible_indexes=off,skip_scan=on
236227
optimizer_trace_offset -1
237228
sql_mode ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

mysql-test/r/read_only_persisted_plugin_variables.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ VARIABLE_NAME VARIABLE_VALUE
1010
SELECT VARIABLE_NAME FROM performance_schema.variables_info WHERE VARIABLE_SOURCE = 'PERSISTED';
1111
VARIABLE_NAME
1212
call mtr.add_suppression("option 'thread_stack':");
13+
# Filtering out the warning as open_files_limit value is calculated at runtime
14+
CALL mtr.add_suppression("Could not increase number of max_open_files to more than *");
1315
# Allow SET PERSIST to set all the read only variables excluding plugin
1416
# variables.
1517
#

mysql-test/t/persisted_variables_bugs.test

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ RESET PERSIST;
162162
SELECT @@global.binlog_cache_size;
163163
SELECT @@global.disabled_storage_engines;
164164
SELECT @@global.collation_database;
165-
SELECT @@global.innodb_open_files;
166165
# test SIGNED long value
167166
SELECT @@global.optimizer_trace_offset;
168167
# test Sys_var_flagset type
@@ -178,7 +177,6 @@ SET @@global.binlog_cache_size= 4096;
178177
SET @@persist_only.binlog_cache_size= default,
179178
@@persist_only.collation_database= default,
180179
@@persist_only.disabled_storage_engines= default,
181-
@@persist_only.innodb_open_files= default,
182180
@@persist_only.optimizer_trace_offset= default,
183181
@@persist_only.optimizer_switch= default,
184182
@@persist_only.enforce_gtid_consistency= default,
@@ -193,7 +191,6 @@ SELECT * FROM performance_schema.persisted_variables ORDER BY 1;
193191
SELECT @@global.binlog_cache_size;
194192
SELECT @@global.disabled_storage_engines;
195193
SELECT @@global.collation_database;
196-
SELECT @@global.innodb_open_files;
197194
SELECT @@global.optimizer_trace_offset;
198195
SELECT @@global.optimizer_switch;
199196
SELECT @@global.enforce_gtid_consistency;

mysql-test/t/read_only_persisted_plugin_variables.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ SELECT VARIABLE_NAME FROM performance_schema.variables_info WHERE VARIABLE_SOURC
2222
# clang/UBSAN needs to override the small thread stack in the .sql file
2323
call mtr.add_suppression("option 'thread_stack':");
2424

25+
--echo # Filtering out the warning as open_files_limit value is calculated at runtime
26+
CALL mtr.add_suppression("Could not increase number of max_open_files to more than *");
27+
2528
--echo # Allow SET PERSIST to set all the read only variables excluding plugin
2629
--echo # variables.
2730
--echo #

0 commit comments

Comments
 (0)