Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.10.3
-
None
-
None
Description
If the number of warnings is greater than max_error_count, session variable @@warning_count has incorrect value.
How to repeat:
delimiter $$
|
CREATE PROCEDURE p1() BEGIN DROP TABLE whichdoesnotexist; END $$
|
CREATE PROCEDURE p2() BEGIN CALL p1(); END $$
|
CREATE PROCEDURE p3() BEGIN CALL p2(); END $$
|
delimiter ;
|
|
SET @@max_error_count=2; |
CALL p3();
|
SELECT @@warning_count; |
+-----------------+
|
| @@warning_count | |
+-----------------+
|
| 3 | |
+-----------------+
|
SHOW WARNINGS;
|
+-------+------+----------------------------------------+
|
| Level | Code | Message |
|
+-------+------+----------------------------------------+
|
| Error | 1051 | Unknown table 'test.whichdoesnotexist' | |
| Note | 4094 | At line 2 in test.p1 | |
+-------+------+----------------------------------------+
|
|
set @@max_error_count=4; |
call p3();
|
select @@warning_count; |
+-----------------+
|
| @@warning_count | |
+-----------------+
|
| 4 | |
+-----------------+
|
show warnings;
|
+-------+------+----------------------------------------+
|
| Level | Code | Message |
|
+-------+------+----------------------------------------+
|
| Error | 1051 | Unknown table 'test.whichdoesnotexist' | |
| Note | 4094 | At line 2 in test.p1 | |
| Note | 4094 | At line 2 in test.p2 | |
| Note | 4094 | At line 2 in test.p3 | |
+-------+------+----------------------------------------+
|