diff options
author | Rucha Deodhar <rucha.deodhar@mariadb.com> | 2020-07-27 02:51:33 +0530 |
---|---|---|
committer | Rucha Deodhar <rucha.deodhar@mariadb.com> | 2020-10-20 12:08:19 +0530 |
commit | d36cd5f01ec322c4cdf2feda288c3932260c5c57 (patch) | |
tree | 45828dc1a529a72e5597854cb453298bdcd451bc /sql/sql_select.cc | |
parent | 3e807d255e0e667eec9791dd505a5be4bbfc6a25 (diff) | |
download | mariadb-git-d36cd5f01ec322c4cdf2feda288c3932260c5c57.tar.gz |
MDEV-17729: Assertion `! is_set() || m_can_overwrite_status' failed in
Diagnostics_area::set_error_status
Analysis: When strict mode is enabled, all warnings are converted to errors
including those which do not occur because of bad data.
Fix: Query should not be aborted when we have warning because limit to
examine rows was reached because it doesn't happen due to bad data.
So thd->abort_on_warning should be false.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index e2e87bb1a86..138f98212aa 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -399,11 +399,14 @@ bool handle_select(THD *thd, LEX *lex, select_result *result, If LIMIT ROWS EXAMINED interrupted query execution, issue a warning, continue with normal processing and produce an incomplete query result. */ + bool saved_abort_on_warning= thd->abort_on_warning; + thd->abort_on_warning= false; push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT, ER_THD(thd, ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT), thd->accessed_rows_and_keys, thd->lex->limit_rows_examined->val_uint()); + thd->abort_on_warning= saved_abort_on_warning; thd->reset_killed(); } /* Disable LIMIT ROWS EXAMINED after query execution. */ |