mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
A patch for Bug#34820: log_output can be set to illegal value.
We have "set" variables, which can accept empty values (like sql_mode), and which can not (like log_output). The problem was that the code does not distinguish them and allow empty values for every set variable. The fix is to introduce an attribute of a set variable telling whether it can accept empty values. mysql-test/r/variables.result: Update result file. mysql-test/t/variables.test: A test case for Bug#34820: log_output can be set to illegal value. sql/set_var.cc: Don't allow empty values if it is prohibitted. sql/set_var.h: Add a flag (m_allow_empty_value) telling if an empty value is acceptable for this variable.
This commit is contained in:
@ -1014,3 +1014,13 @@ Variable_name='table_lock_wait_timeout';
|
||||
Variable_name Value
|
||||
table_definition_cache #
|
||||
table_lock_wait_timeout #
|
||||
|
||||
# --
|
||||
# -- Bug#34820: log_output can be set to illegal value.
|
||||
# --
|
||||
SET GLOBAL log_output = '';
|
||||
ERROR 42000: Variable 'log_output' can't be set to the value of ''
|
||||
SET GLOBAL log_output = 0;
|
||||
ERROR 42000: Variable 'log_output' can't be set to the value of '0'
|
||||
|
||||
# -- End of Bug#34820.
|
||||
|
Reference in New Issue
Block a user