mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-4856 SQL_ERROR_LOG shows 1146 errors which didnt appear in mysql client.
The fill_schema_table() function used to call get_table_share() for a table name in WHERE then clear the error list. That way plugins receive the superfluous error notification if it happens in it. Also the problem was that error handler didn't prevent the suppressed error message from logging anyway as the logging happens in THD::raise_condition before the handler call. Trigger_error_handler is remade into Warnings_only_error_handler, so it stores the error message in all cases in the thd->stmt_da. Then later the stored error is raised.
This commit is contained in:
@@ -2608,8 +2608,11 @@ public:
|
||||
Clear the current error, if any.
|
||||
We do not clear is_fatal_error or is_fatal_sub_stmt_error since we
|
||||
assume this is never called if the fatal error is set.
|
||||
|
||||
@todo: To silence an error, one should use Internal_error_handler
|
||||
mechanism. In future this function will be removed.
|
||||
mechanism. Issuing an error that can be possibly later "cleared" is not
|
||||
compatible with other installed error handlers and audit plugins.
|
||||
In future this function will be removed.
|
||||
*/
|
||||
inline void clear_error()
|
||||
{
|
||||
|
Reference in New Issue
Block a user