mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect
restores from mysqlbinlog out Problem: using "mysqlbinlog | mysql" for recoveries the connection_id() result may differ from what was used when issuing the statement. Fix: if there is a connection_id() in a statement, write to binlog SET pseudo_thread_id= XXX; before it and use the value later on.
This commit is contained in:

parent
667f2a35de
commit
7fb417d0ba
@ -70,7 +70,9 @@ Item *create_func_ceiling(Item* a)
|
||||
|
||||
Item *create_func_connection_id(void)
|
||||
{
|
||||
current_thd->lex->safe_to_cache_query= 0;
|
||||
THD *thd= current_thd;
|
||||
thd->lex->safe_to_cache_query= 0;
|
||||
thd->thread_specific_used= TRUE;
|
||||
return new Item_func_connection_id();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user