mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
errors after altering a table has finished aren't fatal
We cannot revert the ALTER, so anything happening after the point of no return should not be treated as an error. A very unfortunate condition that a user needs to be warned about - yes, but we cannot say "ALTER TABLE has failed" if the table was successfully altered.
This commit is contained in:
@@ -2015,6 +2015,25 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class Turn_errors_to_warnings_handler : public Internal_error_handler
|
||||
{
|
||||
public:
|
||||
Turn_errors_to_warnings_handler() {}
|
||||
bool handle_condition(THD *thd,
|
||||
uint sql_errno,
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl)
|
||||
{
|
||||
*cond_hdl= NULL;
|
||||
if (*level == Sql_condition::WARN_LEVEL_ERROR)
|
||||
*level= Sql_condition::WARN_LEVEL_WARN;
|
||||
return(0);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Tables that were locked with LOCK TABLES statement.
|
||||
|
||||
|
Reference in New Issue
Block a user