summaryrefslogtreecommitdiff
path: root/sql/sql_prepare.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-03-09 08:06:59 +0100
committerSergei Golubchik <sergii@pisem.net>2012-03-09 08:06:59 +0100
commit4933d21e5d93840ddcf41bf25ed92fbe253ae92d (patch)
treea4d892b86aa46927978f82976fff61f1e5193383 /sql/sql_prepare.cc
parent97ee59d27d3daca806fdb3577df5a0e0a45a0a30 (diff)
parent7009bf411a8cb9a6e035b761b5e6352b4f474303 (diff)
downloadmariadb-git-4933d21e5d93840ddcf41bf25ed92fbe253ae92d.tar.gz
merge with mysql-5.5.21
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r--sql/sql_prepare.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index da9dcc053cf..e25751a4b88 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -2284,6 +2284,9 @@ void mysqld_stmt_prepare(THD *thd, const char *packet, uint packet_length)
thd->protocol= save_protocol;
+ sp_cache_enforce_limit(thd->sp_proc_cache, stored_program_cache_size);
+ sp_cache_enforce_limit(thd->sp_func_cache, stored_program_cache_size);
+
/* check_prepared_statemnt sends the metadata packet in case of success */
end:
DBUG_VOID_RETURN;
@@ -2645,6 +2648,9 @@ void mysqld_stmt_execute(THD *thd, char *packet_arg, uint packet_length)
stmt->execute_loop(&expanded_query, open_cursor, packet, packet_end);
thd->protocol= save_protocol;
+ sp_cache_enforce_limit(thd->sp_proc_cache, stored_program_cache_size);
+ sp_cache_enforce_limit(thd->sp_func_cache, stored_program_cache_size);
+
/* Close connection socket; for use with client testing (Bug#43560). */
DBUG_EXECUTE_IF("close_conn_after_stmt_execute", vio_close(thd->net.vio););