diff options
author | unknown <pem@mysql.comhem.se> | 2004-09-17 15:40:38 +0200 |
---|---|---|
committer | unknown <pem@mysql.comhem.se> | 2004-09-17 15:40:38 +0200 |
commit | e2c4279ce2540413af535348b06148f62ce0d610 (patch) | |
tree | 1a5856409767655746801aa6e8341de4da23b4f4 /sql/sql_cache.h | |
parent | 32fed579c50eebb134a783e578e9ee2938233034 (diff) | |
download | mariadb-git-e2c4279ce2540413af535348b06148f62ce0d610.tar.gz |
Fixed BUG#3583: query cache doesn't work for stored procedures.
mysql-test/r/sp.result:
New test case for BUG#3583.
(And current query is now set correctly.)
mysql-test/t/sp.test:
New test case for BUG#3583.
sql/sp_head.cc:
Set the thd->query and try to use cached query, if any, when executing a statement.
sql/sp_head.h:
Extract the sub-query and store in sp_instr_stmt.
sql/sql_cache.cc:
Keep the net->pkt_nr up-to-date when using query cache.
This makes it work with stored procedures too.
sql/sql_cache.h:
Keep the net->pkt_nr up-to-date when using query cache.
This makes it work with stored procedures too.
sql/sql_yacc.yy:
Extract the sub-query and store in sp_instr_stmt.
(And it's never safe to cache references to local variables.)
Diffstat (limited to 'sql/sql_cache.h')
-rw-r--r-- | sql/sql_cache.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_cache.h b/sql/sql_cache.h index 432c7659aa5..b54bc4f7b7b 100644 --- a/sql/sql_cache.h +++ b/sql/sql_cache.h @@ -116,6 +116,7 @@ struct Query_cache_query NET *wri; ulong len; uint8 tbls_type; + unsigned int last_pkt_nr; inline void init_n_lock(); void unlock_n_destroy(); |