Skip to content

Commit

Permalink
Bug#11758439 BOOLEAN SYSTEM VARIABLES CAN BE SET WITH NEGATIVE VALUES
Browse files Browse the repository at this point in the history
Boolean system variables can be set with a negative value which is interpreted as ON,
often requiring a workaround or per-variable checks.

With this fix, negative values are rejected as invalid.

- sql_plugin_var.cc/check_func_bool() now checks for negative values
- Updated MTR test cases

Reviewed-by: Georgi Kodinov <georgi.kodinov@oracle.com>
RB: 26175
  • Loading branch information
Christopher Powers committed Apr 6, 2021
1 parent dc00af3 commit 9bc3ab2
Show file tree
Hide file tree
Showing 39 changed files with 51 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ set global innodb_adaptive_flushing=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_adaptive_flushing'
set global innodb_adaptive_flushing=2;
ERROR 42000: Variable 'innodb_adaptive_flushing' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_adaptive_flushing=-3;
ERROR 42000: Variable 'innodb_adaptive_flushing' can't be set to the value of '-3'
select @@global.innodb_adaptive_flushing;
@@global.innodb_adaptive_flushing
1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ set global innodb_adaptive_hash_index=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_adaptive_hash_index'
set global innodb_adaptive_hash_index=2;
ERROR 42000: Variable 'innodb_adaptive_hash_index' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_adaptive_hash_index=-3;
ERROR 42000: Variable 'innodb_adaptive_hash_index' can't be set to the value of '-3'
select @@global.innodb_adaptive_hash_index;
@@global.innodb_adaptive_hash_index
1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ ERROR 42000: Variable 'innodb_deadlock_detect' can't be set to the value of '2'
set global innodb_deadlock_detect='AUTO';
ERROR 42000: Variable 'innodb_deadlock_detect' can't be set to the value of 'AUTO'
set global innodb_deadlock_detect=-3;
ERROR 42000: Variable 'innodb_deadlock_detect' can't be set to the value of '-3'
select @@global.innodb_deadlock_detect;
@@global.innodb_deadlock_detect
1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ set global innodb_disable_sort_file_cache=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_disable_sort_file_cache'
set global innodb_disable_sort_file_cache=2;
ERROR 42000: Variable 'innodb_disable_sort_file_cache' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_disable_sort_file_cache=-3;
ERROR 42000: Variable 'innodb_disable_sort_file_cache' can't be set to the value of '-3'
select @@global.innodb_disable_sort_file_cache;
@@global.innodb_disable_sort_file_cache
1
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/sys_vars/r/innodb_flush_sync_basic.result
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ set global innodb_flush_sync=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_flush_sync'
set global innodb_flush_sync=2;
ERROR 42000: Variable 'innodb_flush_sync' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_flush_sync=-3;
ERROR 42000: Variable 'innodb_flush_sync' can't be set to the value of '-3'
select @@global.innodb_flush_sync;
@@global.innodb_flush_sync
1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ set global innodb_ft_enable_diag_print=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_ft_enable_diag_print'
set global innodb_ft_enable_diag_print=2;
ERROR 42000: Variable 'innodb_ft_enable_diag_print' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_ft_enable_diag_print=-3;
ERROR 42000: Variable 'innodb_ft_enable_diag_print' can't be set to the value of '-3'
select @@global.innodb_ft_enable_diag_print;
@@global.innodb_ft_enable_diag_print
1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ set global innodb_ft_enable_stopword='AUTO';
ERROR 42000: Variable 'innodb_ft_enable_stopword' can't be set to the value of 'AUTO'
set session innodb_ft_enable_stopword='AUTO';
ERROR 42000: Variable 'innodb_ft_enable_stopword' can't be set to the value of 'AUTO'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_ft_enable_stopword=-3;
ERROR 42000: Variable 'innodb_ft_enable_stopword' can't be set to the value of '-3'
set session innodb_ft_enable_stopword=-7;
ERROR 42000: Variable 'innodb_ft_enable_stopword' can't be set to the value of '-7'
select @@global.innodb_ft_enable_stopword;
@@global.innodb_ft_enable_stopword
1
Expand Down
4 changes: 1 addition & 3 deletions mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ set global innodb_large_prefix=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_large_prefix'
set global innodb_large_prefix=2;
ERROR 42000: Variable 'innodb_large_prefix' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_large_prefix=-3;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
ERROR 42000: Variable 'innodb_large_prefix' can't be set to the value of '-3'
select @@global.innodb_large_prefix;
@@global.innodb_large_prefix
1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ ERROR 42000: Incorrect argument type to variable 'innodb_log_checkpoint_now'
set global innodb_log_checkpoint_now='foo';
ERROR 42000: Variable 'innodb_log_checkpoint_now' can't be set to the value of 'foo'
set global innodb_log_checkpoint_now=-2;
ERROR 42000: Variable 'innodb_log_checkpoint_now' can't be set to the value of '-2'
set global innodb_log_checkpoint_now=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_log_checkpoint_now'
SET @@global.innodb_log_checkpoint_now = @start_global_value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ set global innodb_optimize_fulltext_only=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_optimize_fulltext_only'
set global innodb_optimize_fulltext_only=2;
ERROR 42000: Variable 'innodb_optimize_fulltext_only' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_optimize_fulltext_only=-3;
ERROR 42000: Variable 'innodb_optimize_fulltext_only' can't be set to the value of '-3'
select @@global.innodb_optimize_fulltext_only;
@@global.innodb_optimize_fulltext_only
1
0
select * from information_schema.global_variables where variable_name='innodb_optimize_fulltext_only';
VARIABLE_NAME VARIABLE_VALUE
INNODB_OPTIMIZE_FULLTEXT_ONLY ON
INNODB_OPTIMIZE_FULLTEXT_ONLY OFF
select * from information_schema.session_variables where variable_name='innodb_optimize_fulltext_only';
VARIABLE_NAME VARIABLE_VALUE
INNODB_OPTIMIZE_FULLTEXT_ONLY ON
INNODB_OPTIMIZE_FULLTEXT_ONLY OFF
set global innodb_optimize_fulltext_only='AUTO';
ERROR 42000: Variable 'innodb_optimize_fulltext_only' can't be set to the value of 'AUTO'
SET @@global.innodb_optimize_fulltext_only = @start_global_value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ SET global innodb_print_all_deadlocks=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_print_all_deadlocks'
SET global innodb_print_all_deadlocks=2;
ERROR 42000: Variable 'innodb_print_all_deadlocks' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
SET global innodb_print_all_deadlocks=-3;
ERROR 42000: Variable 'innodb_print_all_deadlocks' can't be set to the value of '-3'
SELECT @@global.innodb_print_all_deadlocks;
@@global.innodb_print_all_deadlocks
1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ set global innodb_random_read_ahead=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_random_read_ahead'
set global innodb_random_read_ahead=2;
ERROR 42000: Variable 'innodb_random_read_ahead' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_random_read_ahead=-3;
ERROR 42000: Variable 'innodb_random_read_ahead' can't be set to the value of '-3'
select @@global.innodb_random_read_ahead;
@@global.innodb_random_read_ahead
1
0
select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
VARIABLE_NAME VARIABLE_VALUE
INNODB_RANDOM_READ_AHEAD ON
INNODB_RANDOM_READ_AHEAD OFF
select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
VARIABLE_NAME VARIABLE_VALUE
INNODB_RANDOM_READ_AHEAD ON
INNODB_RANDOM_READ_AHEAD OFF
set global innodb_random_read_ahead='AUTO';
ERROR 42000: Variable 'innodb_random_read_ahead' can't be set to the value of 'AUTO'
SET @@global.innodb_random_read_ahead = @start_global_value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ set global innodb_stats_on_metadata=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_stats_on_metadata'
set global innodb_stats_on_metadata=2;
ERROR 42000: Variable 'innodb_stats_on_metadata' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_stats_on_metadata=-3;
ERROR 42000: Variable 'innodb_stats_on_metadata' can't be set to the value of '-3'
select @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata
1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ set global innodb_status_output=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_status_output'
set global innodb_status_output=2;
ERROR 42000: Variable 'innodb_status_output' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_status_output=-3;
ERROR 42000: Variable 'innodb_status_output' can't be set to the value of '-3'
select @@global.innodb_status_output;
@@global.innodb_status_output
1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ set global innodb_status_output_locks=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_status_output_locks'
set global innodb_status_output_locks=2;
ERROR 42000: Variable 'innodb_status_output_locks' can't be set to the value of '2'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_status_output_locks=-3;
ERROR 42000: Variable 'innodb_status_output_locks' can't be set to the value of '-3'
select @@global.innodb_status_output_locks;
@@global.innodb_status_output_locks
1
Expand Down
3 changes: 2 additions & 1 deletion mysql-test/suite/sys_vars/r/innodb_strict_mode_basic.result
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ set global innodb_strict_mode='AUTO';
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of 'AUTO'
set session innodb_strict_mode='AUTO';
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of 'AUTO'
NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
set global innodb_strict_mode=-3;
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of '-3'
set session innodb_strict_mode=-7;
ERROR 42000: Variable 'innodb_strict_mode' can't be set to the value of '-7'
select @@global.innodb_strict_mode;
@@global.innodb_strict_mode
1
Expand Down
3 changes: 1 addition & 2 deletions mysql-test/suite/sys_vars/r/innodb_support_xa_basic.result
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ SELECT @@session.innodb_support_xa;
SET @@session.innodb_support_xa = �FF;
ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of '�FF'
SET @@global.innodb_support_xa = -1;
Warnings:
Warning 131 Using innodb_support_xa is deprecated and the parameter may be removed in future releases.
ERROR 42000: Variable 'innodb_support_xa' can't be set to the value of '-1'
SELECT @@global.innodb_support_xa;
@@global.innodb_support_xa
1
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/sys_vars/r/innodb_table_locks_basic.result
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ SELECT @@global.innodb_table_locks;
1
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@session.innodb_table_locks = -6;
ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of '-6'
SET @@session.innodb_table_locks = 1.6;
ERROR 42000: Incorrect argument type to variable 'innodb_table_locks'
SET @@session.innodb_table_locks = "T";
Expand All @@ -72,6 +73,7 @@ SELECT @@session.innodb_table_locks;
SET @@session.innodb_table_locks = �FF;
ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of '�FF'
SET @@global.innodb_table_locks = -1;
ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of '-1'
SET @@global.innodb_table_locks = 2;
ERROR 42000: Variable 'innodb_table_locks' can't be set to the value of '2'
SET @@global.innodb_table_locks = "T";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ ERROR 42000: Incorrect argument type to variable 'innodb_trx_purge_view_update_o
set global innodb_trx_purge_view_update_only_debug='foo';
ERROR 42000: Variable 'innodb_trx_purge_view_update_only_debug' can't be set to the value of 'foo'
set global innodb_trx_purge_view_update_only_debug=-2;
ERROR 42000: Variable 'innodb_trx_purge_view_update_only_debug' can't be set to the value of '-2'
set global innodb_trx_purge_view_update_only_debug=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_trx_purge_view_update_only_debug'
set global innodb_trx_purge_view_update_only_debug=2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ set global innodb_adaptive_flushing=1.1;
set global innodb_adaptive_flushing=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_adaptive_flushing=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_adaptive_flushing=-3;
select @@global.innodb_adaptive_flushing;
--disable_warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ set global innodb_adaptive_hash_index=1.1;
set global innodb_adaptive_hash_index=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_adaptive_hash_index=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_adaptive_hash_index=-3;
select @@global.innodb_adaptive_hash_index;
--disable_warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ set global innodb_deadlock_detect=1e1;
set global innodb_deadlock_detect=2;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_deadlock_detect='AUTO';
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_deadlock_detect=-3;
select @@global.innodb_deadlock_detect;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ set global innodb_disable_sort_file_cache=1.1;
set global innodb_disable_sort_file_cache=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_disable_sort_file_cache=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_disable_sort_file_cache=-3;
select @@global.innodb_disable_sort_file_cache;
--disable_warnings
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/sys_vars/t/innodb_flush_sync_basic.test
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ set global innodb_flush_sync=1.1;
set global innodb_flush_sync=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_flush_sync=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_flush_sync=-3;
select @@global.innodb_flush_sync;
--disable_warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ set global innodb_ft_enable_diag_print=1.1;
set global innodb_ft_enable_diag_print=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_ft_enable_diag_print=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_ft_enable_diag_print=-3;
select @@global.innodb_ft_enable_diag_print;
--disable_warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ set session innodb_ft_enable_stopword=2;
set global innodb_ft_enable_stopword='AUTO';
--error ER_WRONG_VALUE_FOR_VAR
set session innodb_ft_enable_stopword='AUTO';
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_ft_enable_stopword=-3;
--error ER_WRONG_VALUE_FOR_VAR
set session innodb_ft_enable_stopword=-7;
select @@global.innodb_ft_enable_stopword;
select @@session.innodb_ft_enable_stopword;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ set global innodb_large_prefix=1.1;
set global innodb_large_prefix=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_large_prefix=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_large_prefix=-3;
select @@global.innodb_large_prefix;
--disable_warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ set @@session.innodb_log_checkpoint_now='some';
set global innodb_log_checkpoint_now=1.1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_log_checkpoint_now='foo';
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_log_checkpoint_now=-2;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_log_checkpoint_now=1e1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ set global innodb_optimize_fulltext_only=1.1;
set global innodb_optimize_fulltext_only=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_optimize_fulltext_only=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_optimize_fulltext_only=-3;
select @@global.innodb_optimize_fulltext_only;
--disable_warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ SET global innodb_print_all_deadlocks=1.1;
SET global innodb_print_all_deadlocks=1e1;
--error ER_WRONG_VALUE_FOR_VAR
SET global innodb_print_all_deadlocks=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
SET global innodb_print_all_deadlocks=-3;
SELECT @@global.innodb_print_all_deadlocks;
--disable_warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ set global innodb_random_read_ahead=1.1;
set global innodb_random_read_ahead=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_random_read_ahead=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_random_read_ahead=-3;
select @@global.innodb_random_read_ahead;
--disable_warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ set global innodb_stats_on_metadata=1.1;
set global innodb_stats_on_metadata=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_stats_on_metadata=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_stats_on_metadata=-3;
select @@global.innodb_stats_on_metadata;
--disable_warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ set global innodb_status_output=1.1;
set global innodb_status_output=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_status_output=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_status_output=-3;
select @@global.innodb_status_output;
--disable_warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ set global innodb_status_output_locks=1.1;
set global innodb_status_output_locks=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_status_output_locks=2;
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_status_output_locks=-3;
select @@global.innodb_status_output_locks;
--disable_warnings
Expand Down
3 changes: 2 additions & 1 deletion mysql-test/suite/sys_vars/t/innodb_strict_mode_basic.test
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ set session innodb_strict_mode=2;
set global innodb_strict_mode='AUTO';
--error ER_WRONG_VALUE_FOR_VAR
set session innodb_strict_mode='AUTO';
--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643)
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_strict_mode=-3;
--error ER_WRONG_VALUE_FOR_VAR
set session innodb_strict_mode=-7;
select @@global.innodb_strict_mode;
select @@session.innodb_strict_mode;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ SET @@session.innodb_support_xa =

# for global


--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_support_xa = -1;
SELECT @@global.innodb_support_xa;

Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/sys_vars/t/innodb_table_locks_basic.test
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ SELECT @@global.innodb_table_locks;

# for session

--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.innodb_table_locks = -6;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.innodb_table_locks = 1.6;
Expand All @@ -127,6 +128,7 @@ SET @@session.innodb_table_locks =
# for global


--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_table_locks = -1;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_table_locks = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ set @@session.innodb_trx_purge_view_update_only_debug='some';
set global innodb_trx_purge_view_update_only_debug=1.1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_trx_purge_view_update_only_debug='foo';
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_trx_purge_view_update_only_debug=-2;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_trx_purge_view_update_only_debug=1e1;
Expand Down
Loading

0 comments on commit 9bc3ab2

Please sign in to comment.