mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Backport of:
---------------------------------------------------------- revno: 2630.4.26 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-prelocked_mode-to-push timestamp: Fri 2008-06-06 23:19:04 +0400 message: WL#3726: work on review comments. Remove thd->locked_tables. Always store MYSQL_LOCK instances in thd->lock. Rename thd->prelocked_mode to thd->locked_tables_mode. Use thd->locked_tables_mode to determine if we are under LOCK TABLES. Update the code to not assume that if thd->lock is set, LOCK TABLES mode is off. Review comments.
This commit is contained in:
@ -1136,7 +1136,7 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
|
||||
|
||||
See also a note on double-check locking usage above.
|
||||
*/
|
||||
if (thd->locked_tables || query_cache_size == 0)
|
||||
if (thd->locked_tables_mode || query_cache_size == 0)
|
||||
DBUG_VOID_RETURN;
|
||||
uint8 tables_type= 0;
|
||||
|
||||
@ -1364,7 +1364,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
|
||||
|
||||
See also a note on double-check locking usage above.
|
||||
*/
|
||||
if (is_disabled() || thd->locked_tables ||
|
||||
if (is_disabled() || thd->locked_tables_mode ||
|
||||
thd->variables.query_cache_type == 0 || query_cache_size == 0)
|
||||
goto err;
|
||||
|
||||
|
Reference in New Issue
Block a user