Commit 11e01bfa authored by unknown's avatar unknown

BUG#9072 'Max_error_count' system variable cannot be set to zero

 - Chaned min value in mysqld.cc
 - Added testcase to warnings.test


mysql-test/r/warnings.result:
  Added testcase for testing max and min value of max_error_count
mysql-test/t/warnings.test:
  Added testcase for testing max and min value of max_error_count
sql/mysqld.cc:
  Change min value of max_error_count from 1 to 0
parent 4b454c6e
......@@ -142,6 +142,25 @@ Warning 1265 Data truncated for column 'b' at row 10
select @@warning_count;
@@warning_count
50
set max_error_count=0;
show variables like 'max_error_count';
Variable_name Value
max_error_count 0
update t1 set b='hi';
Warnings:
select @@warning_count;
@@warning_count
50
show warnings;
Level Code Message
set max_error_count=65535;
show variables like 'max_error_count';
Variable_name Value
max_error_count 65535
set max_error_count=10;
show variables like 'max_error_count';
Variable_name Value
max_error_count 10
drop table t1;
create table t1 (id int) engine=isam;
Warnings:
......
......@@ -97,6 +97,19 @@ update t1 set b=a;
select @@warning_count;
--enable_ps_protocol
# Bug#9072
set max_error_count=0;
show variables like 'max_error_count';
update t1 set b='hi';
--disable_ps_protocol
select @@warning_count;
--enable_ps_protocol
show warnings;
set max_error_count=65535;
show variables like 'max_error_count';
set max_error_count=10;
show variables like 'max_error_count';
#
# Test for handler type
#
......
......@@ -5053,7 +5053,7 @@ The minimum value for this variable is 4096.",
"Max number of errors/warnings to store for a statement.",
(gptr*) &global_system_variables.max_error_count,
(gptr*) &max_system_variables.max_error_count,
0, GET_ULONG, REQUIRED_ARG, DEFAULT_ERROR_COUNT, 1, 65535, 0, 1, 0},
0, GET_ULONG, REQUIRED_ARG, DEFAULT_ERROR_COUNT, 0, 65535, 0, 1, 0},
{"max_heap_table_size", OPT_MAX_HEP_TABLE_SIZE,
"Don't allow creation of heap tables bigger than this.",
(gptr*) &global_system_variables.max_heap_table_size,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment