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
commit 5f0c31f928
21 changed files with 628 additions and 58 deletions

View file

@ -10155,7 +10155,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);
@ -10170,12 +10170,12 @@ Silence_routine_definer_errors::handle_condition(
THD *thd,
uint sql_errno,
const char*,
Sql_condition::enum_warning_level level,
Sql_condition::enum_warning_level *level,
const char* msg,
Sql_condition ** cond_hdl)
{
*cond_hdl= NULL;
if (level == Sql_condition::WARN_LEVEL_ERROR)
if (*level == Sql_condition::WARN_LEVEL_ERROR)
{
switch (sql_errno)
{