1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

A fix (Bug #5232: CREATE TABLE ... SELECT can deadlock itself).

This commit is contained in:
ram@gw.mysql.r18.ru
2004-08-27 16:43:01 +05:00
parent 2ed54c12e5
commit 3acccb988a
3 changed files with 36 additions and 0 deletions

View File

@ -1655,6 +1655,19 @@ mysql_execute_command(void)
net_printf(&thd->net,ER_INSERT_TABLE_USED,tables->real_name);
DBUG_VOID_RETURN;
}
if (lex->create_info.used_fields & HA_CREATE_USED_UNION)
{
TABLE_LIST *tab;
for (tab= tables; tab; tab= tab->next)
{
if (check_dup(tables->db, tab->real_name,
(TABLE_LIST*)lex->create_info.merge_list.first))
{
net_printf(&thd->net, ER_INSERT_TABLE_USED, tab->real_name);
DBUG_VOID_RETURN;
}
}
}
if (tables->next)
{
TABLE_LIST *table;