Commit 04cbadde authored by unknown's avatar unknown
Browse files

another valgrind error fix for 4.1(backport from 5.0)

parent 84445bbb
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -220,6 +220,18 @@ static int free_share(TINA_SHARE *share)
}


bool tina_end()
{
  if (tina_init)
  {
    hash_free(&tina_open_tables);
    VOID(pthread_mutex_destroy(&tina_mutex));
  }
  tina_init= 0;
  return FALSE;
}


/* 
  Finds the end of a line.
  Currently only supports files written on a UNIX OS.
+2 −0
Original line number Diff line number Diff line
@@ -136,3 +136,5 @@ class ha_tina: public handler
  int find_current_row(byte *buf);
  int chain_append();
};

bool tina_end();
+4 −0
Original line number Diff line number Diff line
@@ -340,6 +340,10 @@ int ha_panic(enum ha_panic_function flag)
#ifdef HAVE_ARCHIVE_DB
  if (have_archive_db == SHOW_OPTION_YES)
    error|= archive_db_end();
#endif
#ifdef HAVE_CSV_DB
  if (have_csv_db == SHOW_OPTION_YES)
    error|= tina_end();
#endif
  return error;
} /* ha_panic */