mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Manual merge from mysql-5.1 for Bug#11764168 (56976: Severe denial
of service in prepared statements).
This commit is contained in:
@@ -309,6 +309,10 @@ The following options may be given as the first argument:
|
||||
max_join_size records return an error
|
||||
--max-length-for-sort-data=#
|
||||
Max number of bytes in sorted records
|
||||
--max-long-data-size=#
|
||||
The maximum BLOB length to send to server from
|
||||
mysql_send_long_data API. Deprecated option; use
|
||||
max_allowed_packet instead.
|
||||
--max-prepared-stmt-count=#
|
||||
Maximum number of prepared statements in the server
|
||||
--max-relay-log-size=#
|
||||
@@ -830,6 +834,7 @@ max-error-count 64
|
||||
max-heap-table-size 16777216
|
||||
max-join-size 18446744073709551615
|
||||
max-length-for-sort-data 1024
|
||||
max-long-data-size 1048576
|
||||
max-prepared-stmt-count 16382
|
||||
max-relay-log-size 0
|
||||
max-seeks-for-key 18446744073709551615
|
||||
|
@@ -308,6 +308,10 @@ The following options may be given as the first argument:
|
||||
max_join_size records return an error
|
||||
--max-length-for-sort-data=#
|
||||
Max number of bytes in sorted records
|
||||
--max-long-data-size=#
|
||||
The maximum BLOB length to send to server from
|
||||
mysql_send_long_data API. Deprecated option; use
|
||||
max_allowed_packet instead.
|
||||
--max-prepared-stmt-count=#
|
||||
Maximum number of prepared statements in the server
|
||||
--max-relay-log-size=#
|
||||
@@ -833,6 +837,7 @@ max-error-count 64
|
||||
max-heap-table-size 16777216
|
||||
max-join-size 18446744073709551615
|
||||
max-length-for-sort-data 1024
|
||||
max-long-data-size 1048576
|
||||
max-prepared-stmt-count 16382
|
||||
max-relay-log-size 0
|
||||
max-seeks-for-key 18446744073709551615
|
||||
|
@@ -1540,6 +1540,9 @@ ERROR HY000: Cannot drop default keycache
|
||||
SET @@global.key_cache_block_size=0;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect key_cache_block_size value: '0'
|
||||
select @@max_long_data_size;
|
||||
@@max_long_data_size
|
||||
1048576
|
||||
SET @@global.max_binlog_cache_size=DEFAULT;
|
||||
SET @@global.max_join_size=DEFAULT;
|
||||
SET @@global.key_buffer_size=@kbs;
|
||||
|
14
mysql-test/suite/sys_vars/r/max_long_data_size_basic.result
Normal file
14
mysql-test/suite/sys_vars/r/max_long_data_size_basic.result
Normal file
@@ -0,0 +1,14 @@
|
||||
select @@global.max_long_data_size=20;
|
||||
@@global.max_long_data_size=20
|
||||
0
|
||||
select @@session.max_long_data_size;
|
||||
ERROR HY000: Variable 'max_long_data_size' is a GLOBAL variable
|
||||
SELECT @@global.max_long_data_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='max_long_data_size';
|
||||
@@global.max_long_data_size = VARIABLE_VALUE
|
||||
1
|
||||
set global max_long_data_size=1;
|
||||
ERROR HY000: Variable 'max_long_data_size' is a read only variable
|
||||
set session max_long_data_size=1;
|
||||
ERROR HY000: Variable 'max_long_data_size' is a read only variable
|
17
mysql-test/suite/sys_vars/t/max_long_data_size_basic.test
Normal file
17
mysql-test/suite/sys_vars/t/max_long_data_size_basic.test
Normal file
@@ -0,0 +1,17 @@
|
||||
select @@global.max_long_data_size=20;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.max_long_data_size;
|
||||
|
||||
# Show that value of the variable matches the value in the GLOBAL I_S table
|
||||
SELECT @@global.max_long_data_size = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='max_long_data_size';
|
||||
|
||||
#
|
||||
# show that it's read-only
|
||||
#
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global max_long_data_size=1;
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session max_long_data_size=1;
|
||||
|
@@ -1281,6 +1281,11 @@ SET @@global.max_join_size=0;
|
||||
SET @@global.key_buffer_size=0;
|
||||
SET @@global.key_cache_block_size=0;
|
||||
|
||||
#
|
||||
# Bug#56976: added new start-up parameter
|
||||
#
|
||||
select @@max_long_data_size;
|
||||
|
||||
# cleanup
|
||||
SET @@global.max_binlog_cache_size=DEFAULT;
|
||||
SET @@global.max_join_size=DEFAULT;
|
||||
|
Reference in New Issue
Block a user