mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Backport of:
---------------------------------------------------------- revno: 2617.69.24 committer: Konstantin Osipov <kostja@sun.com> branch nick: 5.4-42546 timestamp: Fri 2009-08-14 19:22:05 +0400 message: A pre-requisite for a fix for Bug#42546 "Backup: RESTORE fails, thinking it finds an existing table" Back-port from WL 148 "Foreign keys" feature tree a patch that introduced Prelocking_strategy class -- a way to parameterize open_tables() behaviour, implemented by Dmitry Lenev. (Part of WL#4284).
This commit is contained in:
@@ -1474,10 +1474,26 @@ 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);
|
||||
int 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)
|
||||
{
|
||||
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 derived,
|
||||
uint flags);
|
||||
int 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,
|
||||
bool derived, uint flags)
|
||||
{
|
||||
DML_prelocking_strategy prelocking_strategy;
|
||||
|
||||
return open_and_lock_tables_derived(thd, tables, derived, flags,
|
||||
&prelocking_strategy);
|
||||
}
|
||||
/* simple open_and_lock_tables without derived handling */
|
||||
inline int simple_open_n_lock_tables(THD *thd, TABLE_LIST *tables)
|
||||
{
|
||||
|
Reference in New Issue
Block a user