Commit 0783e5bc authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-3.23

into narttu.mysql.fi:/my/mysql-3.23

parents e38d200c 3b0438c8
......@@ -30,6 +30,7 @@ int generate_table(THD *thd, TABLE_LIST *table_list, TABLE *locked_table)
char path[FN_REFLEN];
int error;
TABLE **table_ptr;
my_bool lock_open_locked= 0;
DBUG_ENTER("generate_table");
thd->proc_info="generate_table";
......@@ -102,7 +103,7 @@ int generate_table(THD *thd, TABLE_LIST *table_list, TABLE *locked_table)
error= ha_create_table(path,&create_info,1) ? -1 : 0;
if (thd->locked_tables && reopen_tables(thd,1,0))
error= -1;
VOID(pthread_mutex_unlock(&LOCK_open));
lock_open_locked= 1; // Unlock mutex before return
}
if (!error)
{
......@@ -114,6 +115,8 @@ int generate_table(THD *thd, TABLE_LIST *table_list, TABLE *locked_table)
}
send_ok(&thd->net); // This should return record count
}
if (lock_open_locked)
VOID(pthread_mutex_unlock(&LOCK_open));
DBUG_RETURN(error ? -1 : 0);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment