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

MDEV-23209: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())'

failed in Diagnostics_area::set_ok_status on INSERT

Analysis: Error is not returned when strict mode is enabled and value is
truncated because double is outside range.
Fix: Return HA_ERR_AUTOINC_ERANGE if the error was reported when double is
outside range.
This commit is contained in:
Rucha Deodhar
2020-08-04 13:21:54 +05:30
parent 5f4d351d7f
commit 74223c33d1

View File

@@ -3118,6 +3118,13 @@ int handler::update_auto_increment()
(table->auto_increment_field_not_null &&
thd->variables.sql_mode & MODE_NO_AUTO_VALUE_ON_ZERO))
{
/*
There could be an error reported because value was truncated
when strict mode is enabled.
*/
if (thd->is_error())
DBUG_RETURN(HA_ERR_AUTOINC_ERANGE);
/*
Update next_insert_id if we had already generated a value in this
statement (case of INSERT VALUES(null),(3763),(null):