| Bug #94366 | show errors from previous MySQL operation | ||
|---|---|---|---|
| Submitted: | 16 Feb 2019 20:22 | Modified: | 17 Feb 2019 17:00 |
| Reporter: | PRABHU R | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
| Version: | 8.0 | OS: | Windows |
| Assigned to: | CPU Architecture: | Other | |
| Tags: | Errors Messages | ||
[17 Feb 2019 17:00]
MySQL Verification Team
Thank you for the bug report. Behavior according documented on Manual: https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html error_count The number of errors that resulted from the last statement that generated messages. This variable is read only. See Section 13.7.6.17, “SHOW ERRORS Syntax”. Your example the last statement with generated messages continues to be: SELECT * FROM unknown_table; and SELECT 1; doesn't generates error message,
[18 Feb 2019 9:35]
MySQL Verification Team
Bug #94368 marked as duplicate of this one

Description: I did, SELECT * FROM unknown_table; SELECT @@error_count; --Returns Error --Returns Errorcount as 1 SELECT 1; SELECT @@error_count; --Returns 1 --Returns Errorcount as 1 I expected, SELECT * FROM unknown_table; SELECT @@error_count; --Returns Error --Returns Errorcount as 1 SELECT 1; SELECT @@error_count; --Returns 1 --Returns Errorcount as 0 It happens, show errors from previous MySQL operation How to repeat: I did, SELECT * FROM unknown_table; SELECT @@error_count; --Returns Error --Returns Errorcount as 1 SELECT 1; SELECT @@error_count; --Returns 1 --Returns Errorcount as 1 I expected, SELECT * FROM unknown_table; SELECT @@error_count; --Returns Error --Returns Errorcount as 1 SELECT 1; SELECT @@error_count; --Returns 1 --Returns Errorcount as 0 It happens, show errors from previous MySQL operation