1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed access to freed memory

innobase/srv/srv0srv.c:
  after merge fix
sql/set_var.cc:
  after merge fix
sql/sql_cache.cc:
  after merge fix
This commit is contained in:
unknown
2004-10-27 21:56:17 +03:00
parent e646f8f2d1
commit 8ace53109e
4 changed files with 7 additions and 9 deletions

View File

@ -1037,9 +1037,9 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
*/
for (tmptable= thd->temporary_tables; tmptable ; tmptable= tmptable->next)
{
if (tmptable->key_length - TMP_TABLE_KEY_EXTRA == table->key_len() &&
if (tmptable->key_length - TMP_TABLE_KEY_EXTRA == table->key_length() &&
!memcmp(tmptable->table_cache_key, table->data(),
table->key_len()))
table->key_length()))
{
DBUG_PRINT("qcache",
("Temporary table detected: '%s.%s'",
@ -1050,7 +1050,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
temporary tables => assign following variable to make check
faster.
*/
thd->safe_to_cache_query=0;
thd->lex->safe_to_cache_query=0;
BLOCK_UNLOCK_RD(query_block);
DBUG_RETURN(-1);
}