1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Bug #46425 crash in Diagnostics_area::set_ok_status , empty statement,

DELETE IGNORE

The ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG error was set in the
diagnostics area when it happened, but the DELETE cleanup code
never checked for a non-fatal error condition, thus trying to
set diag.area to "ok".  This triggered an assert checking that
the diag.area was empty.

The fix was to test if there existed a non-fatal error condition
(thd->is_error() before ok'ing the operation.
This commit is contained in:
Magne Mahre
2009-11-18 10:32:03 +01:00
parent eb7bfcac40
commit 3987c7ac4b
3 changed files with 37 additions and 1 deletions

View File

@@ -426,7 +426,8 @@ cleanup:
}
DBUG_ASSERT(transactional_table || !deleted || thd->transaction.stmt.modified_non_trans_table);
free_underlaid_joins(thd, select_lex);
if (error < 0 || (thd->lex->ignore && !thd->is_fatal_error))
if (error < 0 ||
(thd->lex->ignore && !thd->is_error() && !thd->is_fatal_error))
{
/*
If a TRUNCATE TABLE was issued, the number of rows should be reported as