diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-12-09 12:04:55 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-12-09 12:04:55 +0300 |
commit | 351b912e8549037e5c5006d184b5092707ae7c5a (patch) | |
tree | ab383df31e6af9c12b49b742a2078505a98fcf9e /sql/mysql_priv.h | |
parent | 546e16ebd8685f490d90e376df6116175b62fcba (diff) | |
download | mariadb-git-351b912e8549037e5c5006d184b5092707ae7c5a.tar.gz |
Backport of:
----------------------------------------------------------
revno: 2617.69.25
committer: Konstantin Osipov <kostja@sun.com>
branch nick: 5.4-42546
timestamp: Fri 2009-08-14 23:52:00 +0400
message:
A cleanup in open_tables() and lock_tables():
change return type of these functions to bool from int,
to follow convention in the rest of the code.
(Part of WL#4284 review fixes).
sql/mysql_priv.h:
Change return type of open_talbes() and lock_tables() from
int to bool.
sql/sql_base.cc:
Change return type of open_tables() and lock_tables() from int to bool.
sql/sql_handler.cc:
Use bool now that open_tables() returns bool.
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r-- | sql/mysql_priv.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index c956a0bfd12..e61c9a923c3 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1474,19 +1474,20 @@ int setup_ftfuncs(SELECT_LEX* select); int init_ftfuncs(THD *thd, SELECT_LEX* select, bool no_order); void wait_for_condition(THD *thd, pthread_mutex_t *mutex, pthread_cond_t *cond); -int open_tables(THD *thd, TABLE_LIST **tables, uint *counter, uint flags, +bool open_tables(THD *thd, TABLE_LIST **tables, uint *counter, uint flags, Prelocking_strategy *prelocking_strategy); -inline int open_tables(THD *thd, TABLE_LIST **tables, uint *counter, uint flags) +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); } /* open_and_lock_tables with optional derived handling */ -int open_and_lock_tables_derived(THD *thd, TABLE_LIST *tables, +bool open_and_lock_tables_derived(THD *thd, TABLE_LIST *tables, bool derived, uint flags, Prelocking_strategy *prelocking_strategy); -inline int open_and_lock_tables_derived(THD *thd, TABLE_LIST *tables, +inline bool open_and_lock_tables_derived(THD *thd, TABLE_LIST *tables, bool derived, uint flags) { DML_prelocking_strategy prelocking_strategy; @@ -1495,12 +1496,12 @@ inline int open_and_lock_tables_derived(THD *thd, TABLE_LIST *tables, &prelocking_strategy); } /* simple open_and_lock_tables without derived handling */ -inline int simple_open_n_lock_tables(THD *thd, TABLE_LIST *tables) +inline bool simple_open_n_lock_tables(THD *thd, TABLE_LIST *tables) { return open_and_lock_tables_derived(thd, tables, FALSE, 0); } /* open_and_lock_tables with derived handling */ -inline int open_and_lock_tables(THD *thd, TABLE_LIST *tables) +inline bool open_and_lock_tables(THD *thd, TABLE_LIST *tables) { return open_and_lock_tables_derived(thd, tables, TRUE, 0); } @@ -1508,9 +1509,9 @@ inline int open_and_lock_tables(THD *thd, TABLE_LIST *tables) TABLE *open_n_lock_single_table(THD *thd, TABLE_LIST *table_l, thr_lock_type lock_type, uint flags); bool open_normal_and_derived_tables(THD *thd, TABLE_LIST *tables, uint flags); -int lock_tables(THD *thd, TABLE_LIST *tables, uint counter, uint flags, +bool lock_tables(THD *thd, TABLE_LIST *tables, uint counter, uint flags, bool *need_reopen); -int decide_logging_format(THD *thd, TABLE_LIST *tables); +bool decide_logging_format(THD *thd, TABLE_LIST *tables); TABLE *open_temporary_table(THD *thd, const char *path, const char *db, const char *table_name, bool link_in_list); bool rm_temporary_table(handlerton *base, char *path); |