mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Fix for bug lp:1039277 "Crash in sql_cache.cc".
The crash happend when combining query cache, prepared statements and using a read only cursor. sql/sql_cache.cc: Fixed unlikely error when one adjust query cache size in middle of operation sql/sql_cursor.cc: Disable query cache when using cursors. This fixed lp:1039277 tests/mysql_client_test.c: Test case for lp:1039277
This commit is contained in:
@@ -115,6 +115,8 @@ int mysql_open_cursor(THD *thd, select_result *result,
|
||||
&thd->security_ctx->priv_user[0],
|
||||
(char *) thd->security_ctx->host_or_ip,
|
||||
2);
|
||||
/* Mark that we can't use query cache with cursors */
|
||||
thd->query_cache_is_applicable= 0;
|
||||
rc= mysql_execute_command(thd);
|
||||
MYSQL_QUERY_EXEC_DONE(rc);
|
||||
|
||||
|
Reference in New Issue
Block a user