1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +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:
Staale Smedseng
2008-11-20 08:51:48 +01:00
parent b8cd1725b1
commit e60c8c8b68
18 changed files with 176 additions and 239 deletions

View File

@@ -228,7 +228,6 @@ VARIABLE_NAME VARIABLE_VALUE
MYISAM_MAX_SORT_FILE_SIZE FILE_SIZE
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_%';
Variable_name Value
net_buffer_length 1024
@@ -243,57 +242,45 @@ NET_RETRY_COUNT 10
NET_WRITE_TIMEOUT 200
show session variables like 'net_%';
Variable_name Value
net_buffer_length 2048
net_read_timeout 600
net_buffer_length 16384
net_read_timeout 30
net_retry_count 10
net_write_timeout 500
net_write_timeout 60
select * from information_schema.session_variables where variable_name like 'net_%' order by 1;
VARIABLE_NAME VARIABLE_VALUE
NET_BUFFER_LENGTH 2048
NET_READ_TIMEOUT 600
NET_BUFFER_LENGTH 16384
NET_READ_TIMEOUT 30
NET_RETRY_COUNT 10
NET_WRITE_TIMEOUT 500
set session net_buffer_length=8000, global net_read_timeout=900, net_write_timeout=1000;
NET_WRITE_TIMEOUT 60
set global net_buffer_length=8000, global net_read_timeout=900, net_write_timeout=1000;
show global variables like 'net_%';
Variable_name Value
net_buffer_length 1024
net_buffer_length 7168
net_read_timeout 900
net_retry_count 10
net_write_timeout 1000
select * from information_schema.global_variables where variable_name like 'net_%' order by 1;
VARIABLE_NAME VARIABLE_VALUE
NET_BUFFER_LENGTH 1024
NET_BUFFER_LENGTH 7168
NET_READ_TIMEOUT 900
NET_RETRY_COUNT 10
NET_WRITE_TIMEOUT 1000
show session variables like 'net_%';
Variable_name Value
net_buffer_length 7168
net_read_timeout 600
net_retry_count 10
net_write_timeout 500
select * from information_schema.session_variables where variable_name like 'net_%' order by 1;
VARIABLE_NAME VARIABLE_VALUE
NET_BUFFER_LENGTH 7168
NET_READ_TIMEOUT 600
NET_RETRY_COUNT 10
NET_WRITE_TIMEOUT 500
set net_buffer_length=1;
set global net_buffer_length=1;
Warnings:
Warning 1292 Truncated incorrect net_buffer_length value: '1'
show variables like 'net_buffer_length';
show global variables like 'net_buffer_length';
Variable_name Value
net_buffer_length 1024
select * from information_schema.session_variables where variable_name like 'net_buffer_length';
select * from information_schema.global_variables where variable_name like 'net_buffer_length';
VARIABLE_NAME VARIABLE_VALUE
NET_BUFFER_LENGTH 1024
set net_buffer_length=2000000000;
set global net_buffer_length=2000000000;
Warnings:
Warning 1292 Truncated incorrect net_buffer_length value: '2000000000'
show variables like 'net_buffer_length';
show global variables like 'net_buffer_length';
Variable_name Value
net_buffer_length 1048576
select * from information_schema.session_variables where variable_name like 'net_buffer_length';
select * from information_schema.global_variables where variable_name like 'net_buffer_length';
VARIABLE_NAME VARIABLE_VALUE
NET_BUFFER_LENGTH 1048576
set character set cp1251_koi8;
@@ -461,7 +448,7 @@ select @@long_query_time;
@@long_query_time
100.000001
set low_priority_updates=1;
set max_allowed_packet=100;
set global max_allowed_packet=100;
Warnings:
Warning 1292 Truncated incorrect max_allowed_packet value: '100'
set global max_binlog_cache_size=100;
@@ -485,7 +472,7 @@ select @@max_user_connections;
100
set global max_write_lock_count=100;
set myisam_sort_buffer_size=100;
set net_buffer_length=100;
set global net_buffer_length=100;
Warnings:
Warning 1292 Truncated incorrect net_buffer_length value: '100'
set net_read_timeout=100;