1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug#42364 SHOW ERRORS returns empty resultset after dropping non existent table

partial backport of bug43138 fix


mysql-test/r/warnings.result:
  test result
mysql-test/t/warnings.test:
  test case
sql/sql_class.cc:
  partial backport of bug43138 fix
sql/sql_class.h:
  partial backport of bug43138 fix
sql/sql_table.cc:
  partial backport of bug43138 fix
This commit is contained in:
Sergey Glukhov
2009-09-10 13:49:49 +05:00
parent 6d3e743d5b
commit 104d9ce76a
5 changed files with 66 additions and 4 deletions

View File

@@ -1091,6 +1091,31 @@ public:
};
/**
This class is an internal error handler implementation for
DROP TABLE statements. The thing is that there may be warnings during
execution of these statements, which should not be exposed to the user.
This class is intended to silence such warnings.
*/
class Drop_table_error_handler : public Internal_error_handler
{
public:
Drop_table_error_handler(Internal_error_handler *err_handler)
:m_err_handler(err_handler)
{ }
public:
bool handle_error(uint sql_errno,
const char *message,
MYSQL_ERROR::enum_warning_level level,
THD *thd);
private:
Internal_error_handler *m_err_handler;
};
/**
Stores status of the currently executed statement.
Cleared at the beginning of the statement, and then