mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Test Bug: Memory leaks in the archive handler.
Moved initialization code into a new init function. Added a new cleanup function. Added a call to close the meta file.
This commit is contained in:
@@ -277,6 +277,16 @@ int ha_init()
|
||||
else
|
||||
opt_using_transactions=1;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_ARCHIVE_DB
|
||||
if (have_archive_db == SHOW_OPTION_YES)
|
||||
{
|
||||
if (archive_db_init())
|
||||
{
|
||||
have_archive_db= SHOW_OPTION_DISABLED;
|
||||
error= 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return error;
|
||||
}
|
||||
@@ -308,6 +318,10 @@ int ha_panic(enum ha_panic_function flag)
|
||||
#ifdef HAVE_NDBCLUSTER_DB
|
||||
if (have_ndbcluster == SHOW_OPTION_YES)
|
||||
error|=ndbcluster_end();
|
||||
#endif
|
||||
#ifdef HAVE_ARCHIVE_DB
|
||||
if (have_archive_db == SHOW_OPTION_YES)
|
||||
error|= archive_db_end();
|
||||
#endif
|
||||
return error;
|
||||
} /* ha_panic */
|
||||
|
||||
Reference in New Issue
Block a user