1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug#49534: multitable IGNORE update with sql_safe_updates

error causes debug assertion

The IGNORE option of the multiple-table UPDATE command was
not intended to suppress errors caused by the
sql_safe_updates mode. This flag will raise an error if the
execution of UPDATE does not use a key for row retrieval,
and should continue do so regardless of the IGNORE option.

However the implementation of IGNORE does not support
exceptions to the rule; it always converts errors to
warnings and cannot be extended. The Internal_error_handler
interface offers the infrastructure to handle individual
errors, making sure that the error raised by
sql_safe_updates is not silenced.

Fixed by implementing an Internal_error_handler and using it
for UPDATE IGNORE commands.
This commit is contained in:
Martin Hansson
2010-02-10 15:37:34 +01:00
parent f227197ce0
commit 2a22dc2e01
5 changed files with 104 additions and 12 deletions

View File

@@ -740,10 +740,12 @@ bool THD::handle_error(uint sql_errno, const char *message,
}
void THD::pop_internal_handler()
Internal_error_handler *THD::pop_internal_handler()
{
DBUG_ASSERT(m_internal_handler != NULL);
Internal_error_handler *popped_handler= m_internal_handler;
m_internal_handler= m_internal_handler->m_prev_internal_handler;
return popped_handler;
}
extern "C"