mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Backport of:
------------------------------------------------------------ revno: 2630.4.16 committer: Dmitry Lenev <dlenev@mysql.com> branch nick: mysql-6.0-3726-w timestamp: Thu 2008-05-29 09:45:02 +0400 message: WL#3726 "DDL locking for all metadata objects". After review changes in progress. Tweaked some comments and did some renames to avoid ambiguites. sql/mysql_priv.h: Removed name_lock_locked_table() function. sql/sql_base.cc: Got rid of name_lock_locked_table() function after replacing the only call to it with its body. Simplified open_table() code by making "action" argument mandatory (i.e. one now should always pass non-0 pointer in this argument). Renamed TABLE_LIST::open_table_type to open_type to avoid confusing it with type of table. Adjusted comments according to review. sql/sql_handler.cc: Added comment clarifying in which cases we can have TABLE::mdl_lock set to 0. sql/sql_insert.cc: Now the 4th argument of open_table() is mandatory (it makes no sense to complicate open_table() code when we can simply pass dummy variable). sql/sql_parse.cc: Renamed TABLE_LIST::open_table_type to open_type to avoid confusing it with type of table. sql/sql_prepare.cc: Renamed TABLE_LIST::open_table_type to open_type to avoid confusing it with type of table. sql/sql_table.cc: Now the 4th argument of open_table() is mandatory (it makes no sense to complicate open_table() code when we can simply pass dummy variable). sql/sql_trigger.cc: Replaced the only call to name_lock_locked_table() function with its body. sql/sql_view.cc: Renamed TABLE_LIST::open_table_type to open_type to avoid confusing it with type of table. sql/table.h: Renamed TABLE_LIST::open_table_type to open_type (to avoid confusing it with type of table) and improved comments describing this member.
This commit is contained in:
@@ -2631,7 +2631,7 @@ case SQLCOM_PREPARE:
|
||||
if (!(create_info.options & HA_LEX_CREATE_TMP_TABLE))
|
||||
{
|
||||
lex->link_first_table_back(create_table, link_to_local);
|
||||
create_table->open_table_type= TABLE_LIST::OPEN_OR_CREATE;
|
||||
create_table->open_type= TABLE_LIST::OPEN_OR_CREATE;
|
||||
}
|
||||
|
||||
if (!(res= open_and_lock_tables(thd, lex->query_tables)))
|
||||
|
||||
Reference in New Issue
Block a user