1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Backport of:

------------------------------------------------------------
revno: 2630.4.27
committer: Dmitry Lenev <dlenev@mysql.com>
branch nick: mysql-6.0-3726-w2
timestamp: Mon 2008-06-09 14:01:19 +0400
message:
  WL#3726 "DDL locking for all metadata objects".

  After review fixes in progress.

  Changed open_table() to return bool. This allows more easily to
  distinguish cases when this function succeeds but returns no TABLE
  instance (in case of view or in case of special kind of open) from
  cases when we have an error. Pointer to TABLE instance is now
  always returned in TABLE_LIST::table member.

  This change allows to get rid of false assumption in open_tables()
  implementation and makes it more clear.
This commit is contained in:
Konstantin Osipov
2009-12-01 17:58:31 +03:00
parent 1523cea6e9
commit 77be8ba5e0
4 changed files with 131 additions and 138 deletions

View File

@@ -3555,8 +3555,8 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
}
else
{
if (!(table= open_table(thd, create_table, thd->mem_root, &not_used2,
MYSQL_OPEN_TEMPORARY_ONLY)) &&
if (open_table(thd, create_table, thd->mem_root, &not_used2,
MYSQL_OPEN_TEMPORARY_ONLY) &&
!create_info->table_existed)
{
/*
@@ -3566,6 +3566,8 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
*/
drop_temporary_table(thd, create_table);
}
else
table= create_table->table;
}
}
reenable_binlog(thd);