diff options
author | unknown <sanja@askmonty.org> | 2011-05-18 16:27:19 +0300 |
---|---|---|
committer | unknown <sanja@askmonty.org> | 2011-05-18 16:27:19 +0300 |
commit | 1177bea2f1cd0c9f887670b65c9a403a26f07d76 (patch) | |
tree | 86c61cd5b446c4e6a3fc89470b3e35e806d99924 /sql/sql_parse.cc | |
parent | 0da2df248ba5915630d04e7b7335bea409670cd6 (diff) | |
download | mariadb-git-1177bea2f1cd0c9f887670b65c9a403a26f07d76.tar.gz |
Rewritten patch of percona - switching query cache on and off, removing comments.
client/mysqltest.cc:
Column names.
mysql-test/r/grant_cache_no_prot.result:
fix of text.
mysql-test/r/grant_cache_ps_prot.result:
Fix of test.
mysql-test/r/query_cache.result:
Switching on and off query cache.
mysql-test/t/query_cache.test:
Switching on and off query cache.
mysys/charset.c:
Fix of parser.
sql/handler.cc:
thd added to parameters.
sql/log_event.cc:
thd added to parameters.
sql/log_event_old.cc:
thd added to parameters.
sql/mysql_priv.h:
Fixed functions definitions.
sql/mysqld.cc:
Comments stripping.
sql/set_var.cc:
Switching on and off query cache.
sql/set_var.h:
Switching on and off query cache.
sql/share/errmsg.txt:
New errors.
sql/sql_cache.cc:
Switching query cache on and off, removing comments.
sql/sql_cache.h:
thd added to parameters.
sql/sql_class.h:
Comments stripping.
sql/sql_db.cc:
thd added to parameters.
sql/sql_lex.cc:
lex fixed.
sql/sql_parse.cc:
thd added to parameters.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 2699443ebd0..a1a654264a5 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1055,7 +1055,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd, } thread_running++; - /* TODO: set thd->lex->sql_command to SQLCOM_END here */ VOID(pthread_mutex_unlock(&LOCK_thread_count)); /** @@ -1252,15 +1251,15 @@ bool dispatch_command(enum enum_server_command command, THD *thd, #endif thd->set_query(beginning_of_next_stmt, length); - VOID(pthread_mutex_lock(&LOCK_thread_count)); /* Count each statement from the client. */ statistic_increment(thd->status_var.questions, &LOCK_status); + thd->set_time(); /* Reset the query start time for next query. */ + VOID(pthread_mutex_lock(&LOCK_thread_count)); thd->query_id= next_query_id(); - thd->set_time(); /* Reset the query start time. */ - /* TODO: set thd->lex->sql_command to SQLCOM_END here */ VOID(pthread_mutex_unlock(&LOCK_thread_count)); + /* TODO: set thd->lex->sql_command to SQLCOM_END here */ mysql_parse(thd, beginning_of_next_stmt, length, &end_of_stmt); } @@ -3552,7 +3551,7 @@ end_with_restore_list: { #ifdef HAVE_QUERY_CACHE if (thd->variables.query_cache_wlock_invalidate) - query_cache.invalidate_locked_for_write(first_table); + query_cache.invalidate_locked_for_write(thd, first_table); #endif /*HAVE_QUERY_CACHE*/ thd->locked_tables=thd->lock; thd->lock=0; @@ -7010,7 +7009,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables, #ifdef HAVE_QUERY_CACHE if (options & REFRESH_QUERY_CACHE_FREE) { - query_cache.pack(); // FLUSH QUERY CACHE + query_cache.pack(thd); // FLUSH QUERY CACHE options &= ~REFRESH_QUERY_CACHE; // Don't flush cache, just free memory } if (options & (REFRESH_TABLES | REFRESH_QUERY_CACHE)) |