mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch '10.2' into bb-10.2-ext
This commit is contained in:
@ -1635,6 +1635,29 @@ public:
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Implements the trivial error handler which counts errors as they happen.
|
||||
*/
|
||||
|
||||
class Counting_error_handler : public Internal_error_handler
|
||||
{
|
||||
public:
|
||||
int errors;
|
||||
bool handle_condition(THD *thd,
|
||||
uint sql_errno,
|
||||
const char* sqlstate,
|
||||
Sql_condition::enum_warning_level *level,
|
||||
const char* msg,
|
||||
Sql_condition ** cond_hdl)
|
||||
{
|
||||
if (*level == Sql_condition::WARN_LEVEL_ERROR)
|
||||
errors++;
|
||||
return false;
|
||||
}
|
||||
Counting_error_handler() : errors(0) {}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
This class is an internal error handler implementation for
|
||||
DROP TABLE statements. The thing is that there may be warnings during
|
||||
|
Reference in New Issue
Block a user