1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-11597 Assertion when doing select from virtual column with impossible value

- Changed error handlers interface so that they can change error level in
  the handler
- Give warnings and errors when calculating virtual columns
- On insert/update error is fatal in strict mode.
- SELECT and DELETE will only give a warning if a virtual field generates an error
- Added VCOL_UPDATE_FOR_DELETE and VCOL_UPDATE_INDEX_FOR_REPLACE to be able to
  easily detect in update_virtual_fields() if we should use an error
  handler to mask errors or not.
This commit is contained in:
Monty
2017-01-10 18:28:24 +02:00
parent 177c191ff4
commit 5f0c31f928
21 changed files with 628 additions and 58 deletions

View File

@ -1558,6 +1558,7 @@ show_system_thread(enum_thread_type thread)
Internal error handlers are exception handlers used by the server
implementation.
*/
class Internal_error_handler
{
protected:
@ -1595,7 +1596,7 @@ public:
virtual bool handle_condition(THD *thd,
uint sql_errno,
const char* sqlstate,
Sql_condition::enum_warning_level level,
Sql_condition::enum_warning_level *level,
const char* msg,
Sql_condition ** cond_hdl) = 0;
@ -1616,7 +1617,7 @@ public:
bool handle_condition(THD *thd,
uint sql_errno,
const char* sqlstate,
Sql_condition::enum_warning_level level,
Sql_condition::enum_warning_level *level,
const char* msg,
Sql_condition ** cond_hdl)
{
@ -1643,7 +1644,7 @@ public:
bool handle_condition(THD *thd,
uint sql_errno,
const char* sqlstate,
Sql_condition::enum_warning_level level,
Sql_condition::enum_warning_level *level,
const char* msg,
Sql_condition ** cond_hdl);
@ -1664,7 +1665,7 @@ public:
bool handle_condition(THD *thd,
uint sql_errno,
const char *sqlstate,
Sql_condition::enum_warning_level level,
Sql_condition::enum_warning_level *level,
const char* msg,
Sql_condition **cond_hdl);
@ -3818,7 +3819,7 @@ private:
*/
bool handle_condition(uint sql_errno,
const char* sqlstate,
Sql_condition::enum_warning_level level,
Sql_condition::enum_warning_level *level,
const char* msg,
Sql_condition ** cond_hdl);