mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user