mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge bodhi.netgear:/opt/local/work/tmp_merge
into bodhi.netgear:/opt/local/work/mysql-5.1-runtime-merge-with-5.0 mysql-test/r/create.result: Auto merged mysql-test/r/ps.result: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/t/create.test: Auto merged mysql-test/t/ps.test: Auto merged mysql-test/t/sp.test: Auto merged sql/item_strfunc.cc: Auto merged sql/sp.cc: Auto merged sql/sp.h: Auto merged sql/sp_head.cc: Auto merged sql/sp_head.h: Auto merged sql/sql_db.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_trigger.cc: Auto merged sql/sql_view.cc: Auto merged sql/table.h: Auto merged sql/tztime.cc: Auto merged include/my_sys.h: Manual merge (second attempt). mysql-test/r/bdb.result: Manual merge (second attempt). mysql-test/t/bdb.test: Manual merge (second attempt). mysys/my_malloc.c: Manual merge (second attempt). mysys/safemalloc.c: Manual merge (second attempt). sql/ha_federated.cc: Manual merge (second attempt). sql/log_event.cc: Manual merge (second attempt). sql/set_var.cc: Manual merge (second attempt). sql/set_var.h: Manual merge (second attempt). sql/slave.cc: Manual merge (second attempt). sql/slave.h: Manual merge (second attempt). sql/sql_class.h: Manual merge (second attempt). sql/sql_table.cc: Manual merge (second attempt). sql/sql_udf.cc: Manual merge (second attempt). sql/sql_yacc.yy: Manual merge (second attempt).
This commit is contained in:
@ -312,9 +312,8 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
||||
{
|
||||
if (thd->locked_tables)
|
||||
{
|
||||
if (find_locked_table(thd,
|
||||
table_list->db ? table_list->db : thd->db,
|
||||
table_list->table_name))
|
||||
DBUG_ASSERT(table_list->db); /* Must be set in the parser */
|
||||
if (find_locked_table(thd, table_list->db, table_list->table_name))
|
||||
{
|
||||
my_error(ER_DELAYED_INSERT_TABLE_LOCKED, MYF(0),
|
||||
table_list->table_name);
|
||||
@ -1401,8 +1400,8 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list)
|
||||
TABLE *table;
|
||||
DBUG_ENTER("delayed_get_table");
|
||||
|
||||
if (!table_list->db)
|
||||
table_list->db=thd->db;
|
||||
/* Must be set in the parser */
|
||||
DBUG_ASSERT(table_list->db);
|
||||
|
||||
/* Find the thread which handles this table. */
|
||||
if (!(tmp=find_handler(thd,table_list)))
|
||||
@ -1429,15 +1428,15 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list)
|
||||
pthread_mutex_lock(&LOCK_thread_count);
|
||||
thread_count++;
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
if (!(tmp->thd.db=my_strdup(table_list->db,MYF(MY_WME))) ||
|
||||
!(tmp->thd.query=my_strdup(table_list->table_name,MYF(MY_WME))))
|
||||
tmp->thd.set_db(table_list->db, strlen(table_list->db));
|
||||
tmp->thd.query= my_strdup(table_list->table_name,MYF(MY_WME));
|
||||
if (tmp->thd.db == NULL || tmp->thd.query == NULL)
|
||||
{
|
||||
delete tmp;
|
||||
my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
|
||||
goto err1;
|
||||
}
|
||||
tmp->table_list= *table_list; // Needed to open table
|
||||
tmp->table_list.db= tmp->thd.db;
|
||||
tmp->table_list.alias= tmp->table_list.table_name= tmp->thd.query;
|
||||
tmp->lock();
|
||||
pthread_mutex_lock(&tmp->mutex);
|
||||
|
Reference in New Issue
Block a user