summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <bell@51.0.168.192.in-addr.arpa>2005-08-11 10:20:06 +0300
committerunknown <bell@51.0.168.192.in-addr.arpa>2005-08-11 10:20:06 +0300
commit7a3cf493899a5d2c522e95de5ae97f707f623258 (patch)
treec9467d4560732a6152dd0c42cbeb6cfe2f19e67b
parent0872e83c4993fdb8eacdd82572896bf47555efed (diff)
parenta724dbc039771ed0bb3cab7b35330a1066612c6f (diff)
downloadmariadb-git-7a3cf493899a5d2c522e95de5ae97f707f623258.tar.gz
merge
BitKeeper/deleted/.del-query_cache_notembedded.result: Delete: mysql-test/r/query_cache_notembedded.result BitKeeper/deleted/.del-query_cache_notembedded.test: Delete: mysql-test/t/query_cache_notembedded.test mysql-test/r/func_str.result: Auto merged mysql-test/t/func_str.test: Auto merged
-rw-r--r--sql/item_strfunc.cc2
-rw-r--r--sql/sql_cache.cc6
2 files changed, 4 insertions, 4 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 52a2dedb67c..b7015b3d6ef 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -1187,7 +1187,7 @@ String *Item_func_substr_index::val_str(String *str)
}
}
else
- { // Start counting at end
+ {
/*
Negative index, start counting at the end
*/
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 366a13d59ba..2dd88f40005 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -762,7 +762,7 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
TABLE_COUNTER_TYPE local_tables;
ulong tot_length;
DBUG_ENTER("Query_cache::store_query");
- if (query_cache_size == 0)
+ if (query_cache_size == 0 || thd->locked_tables)
DBUG_VOID_RETURN;
uint8 tables_type= 0;
@@ -921,8 +921,8 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
bool check_tables;
DBUG_ENTER("Query_cache::send_result_to_client");
- if (query_cache_size == 0 || thd->variables.query_cache_type == 0)
-
+ if (query_cache_size == 0 || thd->locked_tables ||
+ thd->variables.query_cache_type == 0)
goto err;
/* Check that we haven't forgot to reset the query cache variables */