diff options
author | Monty <monty@mariadb.org> | 2017-01-10 18:28:24 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2017-01-11 09:19:45 +0200 |
commit | 5f0c31f928338e8a6ffde098b7ffd3d1a8b02903 (patch) | |
tree | ac246928fcfa0b9fe0c63a5511a3c74fef167f3c /sql/sp.cc | |
parent | 177c191ff4b9c0033665a292fdb5907095ddb823 (diff) | |
download | mariadb-git-5f0c31f928338e8a6ffde098b7ffd3d1a8b02903.tar.gz |
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.
Diffstat (limited to 'sql/sp.cc')
-rw-r--r-- | sql/sp.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/sp.cc b/sql/sp.cc index 05f075390c1..a1662cefb9e 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -691,7 +691,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); }; @@ -701,13 +701,13 @@ Silence_deprecated_warning::handle_condition( THD *, uint sql_errno, const char*, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level *level, const char*, Sql_condition ** cond_hdl) { *cond_hdl= NULL; if (sql_errno == ER_WARN_DEPRECATED_SYNTAX && - level == Sql_condition::WARN_LEVEL_WARN) + *level == Sql_condition::WARN_LEVEL_WARN) return TRUE; return FALSE; @@ -780,7 +780,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* message, Sql_condition ** cond_hdl); @@ -794,7 +794,8 @@ bool Bad_db_error_handler::handle_condition(THD *thd, uint sql_errno, const char* sqlstate, - Sql_condition::enum_warning_level level, + Sql_condition::enum_warning_level + *level, const char* message, Sql_condition ** cond_hdl) { @@ -1477,7 +1478,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) { |