From fe22ff56f465545fcf5cfe16a36c93f640490436 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 14:27:22 +0100 Subject: [PATCH] Bug#21413 - Engine table handler used by multiple threads in REPLACE DELAYED post push patch, removing the optimization for copying delayed_insert variables. sql/sql_insert.cc: Bug#21413 - Engine table handler used by multiple threads in REPLACE DELAYED post push patch, removing the optimization for copying delayed_insert variables. (restored some parts which caused errors) --- sql/sql_insert.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 2e371971838..54f2d5695d4 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -941,11 +941,10 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list) my_error(ER_OUT_OF_RESOURCES,MYF(0)); goto err1; } - /* We only need the db and table name to open tables with open_ltable() */ + tmp->table_list= *table_list; // Needed to open table + /* Replace volatile strings with local copies */ tmp->table_list.db= tmp->thd.db; - tmp->table_list.db_length= table_list->db_length; tmp->table_list.alias= tmp->table_list.real_name=tmp->thd.query; - tmp->table_list.real_name_length= table_list->real_name_length; tmp->lock(); pthread_mutex_lock(&tmp->mutex); if ((error=pthread_create(&tmp->thd.real_id,&connection_attrib,