diff options
author | ramil/ram@mysql.com/ramil.myoffice.izhnet.ru <> | 2007-08-01 15:27:03 +0500 |
---|---|---|
committer | ramil/ram@mysql.com/ramil.myoffice.izhnet.ru <> | 2007-08-01 15:27:03 +0500 |
commit | 7fb417d0ba1c416db1d5a12774cb3f4a6624ba9c (patch) | |
tree | 264548069695844abbd4f11eac596dbb84c9c0ce /sql/item_create.cc | |
parent | 667f2a35de446a92db3baa73e302b71c5db6759c (diff) | |
download | mariadb-git-7fb417d0ba1c416db1d5a12774cb3f4a6624ba9c.tar.gz |
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.
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r-- | sql/item_create.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc index 50db1c37371..3713fc9e380 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -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(); } |