1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

invalidation of locking for write tables (BUG#2693)

fixed linking query_prealloc_size to query cache presence


mysql-test/r/query_cache.result:
  test of QC invalidation by LOCK command
mysql-test/t/query_cache.test:
  test of QC invalidation by LOCK command
sql/mysqld.cc:
  new variable query_cache_wlock_invalidate
  fixed query_prealloc_size with QC absence
sql/set_var.cc:
  new variable query_cache_wlock_invalidate
sql/sql_cache.cc:
  new method for table invalidation
sql/sql_cache.h:
  new method for table invalidation
sql/sql_class.h:
  new variable query_cache_wlock_invalidate
sql/sql_parse.cc:
  layout fixed
This commit is contained in:
unknown
2004-03-04 18:32:55 +02:00
parent 53368efea3
commit d4f43e511c
8 changed files with 82 additions and 4 deletions

View File

@ -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);