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/handler.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/handler.cc')
-rw-r--r-- | sql/handler.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index a91a97598d6..f06c5d71a5e 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -4974,7 +4974,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) { @@ -4987,7 +4987,7 @@ public: return TRUE; } - if (level == Sql_condition::WARN_LEVEL_ERROR) + if (*level == Sql_condition::WARN_LEVEL_ERROR) m_unhandled_errors++; return FALSE; } |