1
0
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:
monty@mashka.mysql.fi
2003-06-30 13:28:36 +03:00
parent dbebed97e4
commit 6bc7b3a6be
4 changed files with 29 additions and 3 deletions

View File

@ -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;
}