mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug#42364 SHOW ERRORS returns empty resultset after dropping non existent table
partial backport of bug43138 fix
This commit is contained in:
@ -399,6 +399,31 @@ char *thd_security_context(THD *thd, char *buffer, unsigned int length,
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Implementation of Drop_table_error_handler::handle_error().
|
||||
The reason in having this implementation is to silence technical low-level
|
||||
warnings during DROP TABLE operation. Currently we don't want to expose
|
||||
the following warnings during DROP TABLE:
|
||||
- Some of table files are missed or invalid (the table is going to be
|
||||
deleted anyway, so why bother that something was missed);
|
||||
- A trigger associated with the table does not have DEFINER (One of the
|
||||
MySQL specifics now is that triggers are loaded for the table being
|
||||
dropped. So, we may have a warning that trigger does not have DEFINER
|
||||
attribute during DROP TABLE operation).
|
||||
|
||||
@return TRUE if the condition is handled.
|
||||
*/
|
||||
bool Drop_table_error_handler::handle_error(uint sql_errno,
|
||||
const char *message,
|
||||
MYSQL_ERROR::enum_warning_level level,
|
||||
THD *thd)
|
||||
{
|
||||
return ((sql_errno == EE_DELETE && my_errno == ENOENT) ||
|
||||
sql_errno == ER_TRG_NO_DEFINER);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Clear this diagnostics area.
|
||||
|
||||
|
Reference in New Issue
Block a user