diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2014-12-02 14:50:18 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2014-12-05 11:01:49 +0400 |
commit | 9bc5cec0f115d7d0c277a49b91b96109560280f4 (patch) | |
tree | 0513fb2a87651c5a3d948733141a09399b17a67f /sql/lock.h | |
parent | faf169d245d05a835ec8ebcf1defb556c85f2766 (diff) | |
download | mariadb-git-9bc5cec0f115d7d0c277a49b91b96109560280f4.tar.gz |
MDEV-7004 - Merge scalability fixes from 10.0-power
Preallocate locks on THD mem_root to avoid expensive malloc.
Diffstat (limited to 'sql/lock.h')
-rw-r--r-- | sql/lock.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/lock.h b/sql/lock.h index a4833cdc38e..ca2f267f3d5 100644 --- a/sql/lock.h +++ b/sql/lock.h @@ -42,8 +42,10 @@ 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 +#define GET_LOCK_UNLOCK 0 +#define GET_LOCK_STORE_LOCKS 1 +#define GET_LOCK_ACTION_MASK 1 +#define GET_LOCK_ON_THD (1 << 1) MYSQL_LOCK *get_lock_data(THD *thd, TABLE **table_ptr, uint count, uint flags); void reset_lock_data(MYSQL_LOCK *sql_lock, bool unlock); |