diff options
Diffstat (limited to 'sql/lock.h')
-rw-r--r-- | sql/lock.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/lock.h b/sql/lock.h index 6f779595af8..442881c5b9b 100644 --- a/sql/lock.h +++ b/sql/lock.h @@ -12,7 +12,8 @@ typedef struct st_mysql_lock MYSQL_LOCK; MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **table, uint count, uint flags); -void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock); +bool mysql_lock_tables(THD *thd, MYSQL_LOCK *sql_lock, uint flags); +void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock, bool free_lock= 1); void mysql_unlock_read_tables(THD *thd, MYSQL_LOCK *sql_lock); void mysql_unlock_some_tables(THD *thd, TABLE **table,uint count); void mysql_lock_remove(THD *thd, MYSQL_LOCK *locked,TABLE *table); @@ -25,4 +26,11 @@ bool lock_schema_name(THD *thd, const char *db); bool lock_object_name(THD *thd, MDL_key::enum_mdl_namespace mdl_type, const char *db, const char *name); +/* flags for get_lock_data */ +#define GET_LOCK_UNLOCK 1 +#define GET_LOCK_STORE_LOCKS 2 + +MYSQL_LOCK *get_lock_data(THD *thd, TABLE **table_ptr, uint count, uint flags); +void reset_lock_data(MYSQL_LOCK *sql_lock, bool unlock); + #endif /* LOCK_INCLUDED */ |