From 9bc5cec0f115d7d0c277a49b91b96109560280f4 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Tue, 2 Dec 2014 14:50:18 +0400 Subject: MDEV-7004 - Merge scalability fixes from 10.0-power Preallocate locks on THD mem_root to avoid expensive malloc. --- sql/lock.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sql/lock.h') 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); -- cgit v1.2.1