mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
LAST_INSERT_ID() should not be set if we couldn't generate an auto_increment id.
This commit is contained in:
@ -709,6 +709,8 @@ void handler::update_auto_increment()
|
||||
nr=get_auto_increment();
|
||||
if (!table->next_number_field->store(nr))
|
||||
thd->insert_id((ulonglong) nr);
|
||||
else
|
||||
thd->insert_id(table->next_number_field->val_int());
|
||||
auto_increment_column_changed=1;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
Reference in New Issue
Block a user