summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2004-03-04 18:32:55 +0200
committerbell@sanja.is.com.ua <>2004-03-04 18:32:55 +0200
commitd03034d3062f528266ac4853ab2f2ba17f01dfdb (patch)
treef122123efc8dd764d21d073a89045021aecd2992 /sql/sql_parse.cc
parentf8345cc6171edd0cbe78900975b16ed8d77f67d3 (diff)
downloadmariadb-git-d03034d3062f528266ac4853ab2f2ba17f01dfdb.tar.gz
invalidation of locking for write tables (BUG#2693)
fixed linking query_prealloc_size to query cache presence
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index ac3ccd4fc62..bc69f7136ad 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2307,8 +2307,12 @@ mysql_execute_command(void)
goto error;
thd->in_lock_tables=1;
thd->options|= OPTION_TABLE_LOCK;
- if (!(res=open_and_lock_tables(thd,tables)))
+ if (!(res= open_and_lock_tables(thd, tables)))
{
+#ifdef HAVE_QUERY_CACHE
+ if (thd->variables.query_cache_wlock_invalidate)
+ query_cache.invalidate_locked_for_write(tables);
+#endif /*HAVE_QUERY_CACHE*/
thd->locked_tables=thd->lock;
thd->lock=0;
send_ok(&thd->net);