summaryrefslogtreecommitdiff
path: root/sql/sql_base.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2014-12-08 10:56:08 +0400
committerAlexander Barkov <bar@mariadb.org>2014-12-08 10:56:08 +0400
commitc6d3f8058db30a6621e36b05564a1b2ae68bec7f (patch)
tree0fa3846bc82e7abc7ba46b58776ac98c30412d07 /sql/sql_base.h
parentb372720177cececb499b96b5e6d422b32d85729c (diff)
downloadmariadb-git-c6d3f8058db30a6621e36b05564a1b2ae68bec7f.tar.gz
MDEV-7112 Split HA_CREATE_INFO
Diffstat (limited to 'sql/sql_base.h')
-rw-r--r--sql/sql_base.h59
1 files changed, 53 insertions, 6 deletions
diff --git a/sql/sql_base.h b/sql/sql_base.h
index e39ec16028b..0041972f101 100644
--- a/sql/sql_base.h
+++ b/sql/sql_base.h
@@ -226,15 +226,41 @@ int setup_conds(THD *thd, TABLE_LIST *tables, List<TABLE_LIST> &leaves,
void wrap_ident(THD *thd, Item **conds);
int setup_ftfuncs(SELECT_LEX* select);
int init_ftfuncs(THD *thd, SELECT_LEX* select, bool no_order);
-bool lock_table_names(THD *thd, TABLE_LIST *table_list,
+bool lock_table_names(THD *thd, const DDL_options_st &options,
+ TABLE_LIST *table_list,
TABLE_LIST *table_list_end, ulong lock_wait_timeout,
uint flags);
-bool open_tables(THD *thd, TABLE_LIST **tables, uint *counter, uint flags,
+static inline bool
+lock_table_names(THD *thd, TABLE_LIST *table_list,
+ TABLE_LIST *table_list_end, ulong lock_wait_timeout,
+ uint flags)
+{
+ return lock_table_names(thd, thd->lex->create_info, table_list,
+ table_list_end, lock_wait_timeout, flags);
+}
+bool open_tables(THD *thd, const DDL_options_st &options,
+ TABLE_LIST **tables, uint *counter, uint flags,
Prelocking_strategy *prelocking_strategy);
+static inline bool
+open_tables(THD *thd, TABLE_LIST **tables, uint *counter, uint flags,
+ Prelocking_strategy *prelocking_strategy)
+{
+ return open_tables(thd, thd->lex->create_info, tables, counter, flags,
+ prelocking_strategy);
+}
/* open_and_lock_tables with optional derived handling */
-bool open_and_lock_tables(THD *thd, TABLE_LIST *tables,
+bool open_and_lock_tables(THD *thd, const DDL_options_st &options,
+ TABLE_LIST *tables,
bool derived, uint flags,
Prelocking_strategy *prelocking_strategy);
+static inline bool
+open_and_lock_tables(THD *thd, TABLE_LIST *tables,
+ bool derived, uint flags,
+ Prelocking_strategy *prelocking_strategy)
+{
+ return open_and_lock_tables(thd, thd->lex->create_info,
+ tables, derived, flags, prelocking_strategy);
+}
/* simple open_and_lock_tables without derived handling for single table */
TABLE *open_n_lock_single_table(THD *thd, TABLE_LIST *table_l,
thr_lock_type lock_type, uint flags,
@@ -460,11 +486,21 @@ public:
inline bool
+open_tables(THD *thd, const DDL_options_st &options,
+ TABLE_LIST **tables, uint *counter, uint flags)
+{
+ DML_prelocking_strategy prelocking_strategy;
+
+ return open_tables(thd, options, tables, counter, flags,
+ &prelocking_strategy);
+}
+inline bool
open_tables(THD *thd, TABLE_LIST **tables, uint *counter, uint flags)
{
DML_prelocking_strategy prelocking_strategy;
- return open_tables(thd, tables, counter, flags, &prelocking_strategy);
+ return open_tables(thd, thd->lex->create_info, tables, counter, flags,
+ &prelocking_strategy);
}
inline TABLE *open_n_lock_single_table(THD *thd, TABLE_LIST *table_l,
@@ -478,12 +514,23 @@ inline TABLE *open_n_lock_single_table(THD *thd, TABLE_LIST *table_l,
/* open_and_lock_tables with derived handling */
-inline bool open_and_lock_tables(THD *thd, TABLE_LIST *tables,
+inline bool open_and_lock_tables(THD *thd,
+ const DDL_options_st &options,
+ TABLE_LIST *tables,
bool derived, uint flags)
{
DML_prelocking_strategy prelocking_strategy;
- return open_and_lock_tables(thd, tables, derived, flags,
+ return open_and_lock_tables(thd, options, tables, derived, flags,
+ &prelocking_strategy);
+}
+inline bool open_and_lock_tables(THD *thd, TABLE_LIST *tables,
+ bool derived, uint flags)
+{
+ DML_prelocking_strategy prelocking_strategy;
+
+ return open_and_lock_tables(thd, thd->lex->create_info,
+ tables, derived, flags,
&prelocking_strategy);
}