diff options
author | monty@mysql.com <> | 2005-01-15 14:09:45 +0200 |
---|---|---|
committer | monty@mysql.com <> | 2005-01-15 14:09:45 +0200 |
commit | 0a1076a25f897e4c383cdc5be6b713e65077496b (patch) | |
tree | e8856cd37d5a43bd18c06a8834fbfff83c0f4998 /sql/sql_base.cc | |
parent | 97b28521e6f2735ee6488682b15071f604f66cfd (diff) | |
parent | f34bc883ab4beda7ffd295a89ba62a30f8ccc0e5 (diff) | |
download | mariadb-git-0a1076a25f897e4c383cdc5be6b713e65077496b.tar.gz |
Merge with 4.1
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 48855892567..ab59610f485 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1867,6 +1867,34 @@ bool open_and_lock_tables(THD *thd, TABLE_LIST *tables) /* + Open all tables in list and process derived tables + + SYNOPSIS + open_normal_and_derived_tables + thd - thread handler + tables - list of tables for open&locking + + RETURN + FALSE - ok + TRUE - error + + NOTE + This is to be used on prepare stage when you don't read any + data from the tables. +*/ + +int open_normal_and_derived_tables(THD *thd, TABLE_LIST *tables) +{ + uint counter; + DBUG_ENTER("open_normal_and_derived_tables"); + if (open_tables(thd, tables, &counter)) + DBUG_RETURN(-1); /* purecov: inspected */ + relink_tables_for_derived(thd); + DBUG_RETURN(mysql_handle_derived(thd->lex)); +} + + +/* Let us propagate pointers to open tables from global table list to table lists for multi-delete */ |