1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge bb-10.2-ext into 10.3

This commit is contained in:
Marko Mäkelä
2017-09-25 22:05:56 +03:00
140 changed files with 858 additions and 323 deletions

View File

@ -1653,6 +1653,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