Commit 4019cbf6 authored by unknown's avatar unknown
Browse files

Bug#15976: Multiply warnings about unfreed memory

  leaks caused by Archive storage engine not closing files and
  storage engines not receiving panic() during shutdown


sql/ha_archive.cc:
  surplus my_close() call not neccessary as azclose() should work
sql/mysqld.cc:
  Make sure storage engines get panic() call by moving it before plugin_free()
storage/archive/azio.c:
  typo perhaps. azio was not closing files.
parent 81ca1581
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -591,8 +591,6 @@ int ha_archive::create(const char *name, TABLE *table_arg,
    goto error2;
  }

  my_close(create_file, MYF(0));

  DBUG_RETURN(0);

error3:
+1 −1
Original line number Diff line number Diff line
@@ -1152,6 +1152,7 @@ void clean_up(bool print_message)
  lex_free();				/* Free some memory */
  set_var_free();
  free_charsets();
  (void) ha_panic(HA_PANIC_CLOSE);	/* close all tables and logs */
  if (!opt_noacl)
  {
#ifdef HAVE_DLOPEN
@@ -1159,7 +1160,6 @@ void clean_up(bool print_message)
#endif
    plugin_free();
  }
  (void) ha_panic(HA_PANIC_CLOSE);	/* close all tables and logs */
  if (tc_log)
    tc_log->close();
  xid_cache_free();
+1 −1
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ int destroy (s)
      err = inflateEnd(&(s->stream));
    }
  }
  if (s->file < 0 && my_close(s->file, MYF(0))) 
  if (s->file > 0 && my_close(s->file, MYF(0))) 
  {
#ifdef ESPIPE
    if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */