diff options
author | Staale Smedseng <staale.smedseng@sun.com> | 2008-11-20 08:51:48 +0100 |
---|---|---|
committer | Staale Smedseng <staale.smedseng@sun.com> | 2008-11-20 08:51:48 +0100 |
commit | e5ae4e2392077508248637981d3276bae8a26e72 (patch) | |
tree | 59c64214e33797199c32b6cd187781eef4dcd755 /mysql-test/t/variables.test | |
parent | 36c4b37b16f5f44c97aae330856b742fa708b85f (diff) | |
download | mariadb-git-e5ae4e2392077508248637981d3276bae8a26e72.tar.gz |
A fix for Bug#22891 "session level max_allowed_packet can be
set but is ignored".
This patch makes @@session.max_allowed_packed and
@@session.net_buffer_length read-only as suggested in the bug
report. The user will have to use SET GLOBAL (and reconnect)
to alter the session values of these variables.
The error string ER_VARIABLE_IS_READONLY is introduced.
Tests are modified accordingly.
sql/set_var.cc:
The class sys_var_thd_ulong_session_readonly is introduced as
a specialization of sys_var_thd_ulong implementing a read-only
session variable. The class overrides check() and
check_default() to achieve the read-only property for the
session part of the variable.
sql/set_var.h:
The class sys_var_thd_ulong_session_readonly is introduced as
a specialization of sys_var_thd_ulong implementing a read-only
session variable. The class overrides check() and
check_default() to achieve the read-only property for the
session part of the variable.
sql/share/errmsg.txt:
New error ER_VARIABLE_IS_READONLY.
Diffstat (limited to 'mysql-test/t/variables.test')
-rw-r--r-- | mysql-test/t/variables.test | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 221f46605cd..e98436fa62c 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -146,25 +146,23 @@ show global variables like 'myisam_max_sort_file_size'; --replace_result 9223372036853727232 FILE_SIZE 2146435072 FILE_SIZE select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size'; +# bug#22891: modified to take read-only SESSION net_buffer_length into account set global net_retry_count=10, session net_retry_count=10; set global net_buffer_length=1024, net_write_timeout=200, net_read_timeout=300; -set session net_buffer_length=2048, net_write_timeout=500, net_read_timeout=600; show global variables like 'net_%'; select * from information_schema.global_variables where variable_name like 'net_%' order by 1; show session variables like 'net_%'; select * from information_schema.session_variables where variable_name like 'net_%' order by 1; -set session net_buffer_length=8000, global net_read_timeout=900, net_write_timeout=1000; +set global net_buffer_length=8000, global net_read_timeout=900, net_write_timeout=1000; show global variables like 'net_%'; select * from information_schema.global_variables where variable_name like 'net_%' order by 1; -show session variables like 'net_%'; -select * from information_schema.session_variables where variable_name like 'net_%' order by 1; -set net_buffer_length=1; -show variables like 'net_buffer_length'; -select * from information_schema.session_variables where variable_name like 'net_buffer_length'; +set global net_buffer_length=1; +show global variables like 'net_buffer_length'; +select * from information_schema.global_variables where variable_name like 'net_buffer_length'; #warning 1292 -set net_buffer_length=2000000000; -show variables like 'net_buffer_length'; -select * from information_schema.session_variables where variable_name like 'net_buffer_length'; +set global net_buffer_length=2000000000; +show global variables like 'net_buffer_length'; +select * from information_schema.global_variables where variable_name like 'net_buffer_length'; set character set cp1251_koi8; show variables like "character_set_client"; @@ -274,7 +272,7 @@ select @@long_query_time; set long_query_time=100.000001; select @@long_query_time; set low_priority_updates=1; -set max_allowed_packet=100; +set global max_allowed_packet=100; set global max_binlog_cache_size=100; set global max_binlog_size=100; set global max_connect_errors=100; @@ -288,7 +286,7 @@ set global max_user_connections=100; select @@max_user_connections; set global max_write_lock_count=100; set myisam_sort_buffer_size=100; -set net_buffer_length=100; +set global net_buffer_length=100; set net_read_timeout=100; set net_write_timeout=100; set global query_cache_limit=100; |