Commit 8ace5310 authored by unknown's avatar unknown
Browse files

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
parent e646f8f2
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -881,8 +881,6 @@ srv_general_init(void)

/*======================= InnoDB Server FIFO queue =======================*/

/* Maximum allowable purge history length.  <=0 means 'infinite'. */
ulint	srv_max_purge_lag		= 0;

/*************************************************************************
Puts an OS thread to wait if there are too many concurrent threads
+0 −2
Original line number Diff line number Diff line
@@ -358,8 +358,6 @@ sys_var_thd_bool sys_innodb_table_locks("innodb_table_locks",
                                               &SV::innodb_table_locks);
sys_var_long_ptr	sys_innodb_autoextend_increment("innodb_autoextend_increment",
							&srv_auto_extend_increment);
sys_var_long_ptr	sys_innodb_max_purge_lag("innodb_max_purge_lag",
							&srv_max_purge_lag);
#endif

/* Time/date/datetime formats */
+3 −3
Original line number Diff line number Diff line
@@ -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);
      }
+4 −2
Original line number Diff line number Diff line
@@ -1681,9 +1681,10 @@ bool select_create::send_eof()
    */
    if (!table->tmp_table)
    {
      ulong version= table->version;
      hash_delete(&open_cache,(byte*) table);
      /* Tell threads waiting for refresh that something has happened */
      if (table->version != refresh_version)
      if (version != refresh_version)
        VOID(pthread_cond_broadcast(&COND_refresh));
    }
    lock=0;
@@ -1707,11 +1708,12 @@ void select_create::abort()
    enum db_type table_type=table->db_type;
    if (!table->tmp_table)
    {
      ulong version= table->version;      
      hash_delete(&open_cache,(byte*) table);
      if (!create_info->table_existed)
        quick_rm_table(table_type, db, name);
      /* Tell threads waiting for refresh that something has happened */
      if (table->version != refresh_version)
      if (version != refresh_version)
        VOID(pthread_cond_broadcast(&COND_refresh));
    }
    else if (!create_info->table_existed)