mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 15:45:33 +02:00
Fix when using auto_increment and last_insert_id() in the same insert statement.
sql/sql_base.cc: S
This commit is contained in:
parent
c46c125827
commit
7245530084
4 changed files with 61 additions and 14 deletions
|
|
@ -697,7 +697,7 @@ bool MYSQL_LOG::write(Query_log_event* event_info)
|
|||
|
||||
if (thd->last_insert_id_used)
|
||||
{
|
||||
Intvar_log_event e((uchar)LAST_INSERT_ID_EVENT, thd->last_insert_id);
|
||||
Intvar_log_event e((uchar)LAST_INSERT_ID_EVENT, thd->current_insert_id);
|
||||
if(thd->server_id)
|
||||
e.server_id = thd->server_id;
|
||||
if (e.write(file))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue