mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
WL# 2094 Federated Storage Handler
This changeset/patch is on top of changesets 1.1814 and 1.1846 (for bugs 8033 and 8065) and now fixes bug 8535. These changes have been built and tested successfully on build.mysql.com handler.cc: Added hooks for federated_db_init() and federated_db_end(), as done with ha_archive_db does, per suggestion by Ingo in code review of patch 1.1846. ha_federated.h: declaration of federated_db_init() and federated_db_end() ha_federated.cc: - Fixed some indentation problems from indent-ex (mainly to do with cases where "variablename += value" - Added federated_db_init() and federated_db_end(), as done with archive, which also handler more elegantly one of the memory leaks from bug 8033 where the federated_mutex was not freed - Removed extrenous debug messages in parse_url() - Fixed bug 8535, caused by NULL being quoted in write_row. This used to work (incorrectly) but a recent change was made in the server that exposed this
This commit is contained in:
@ -364,6 +364,16 @@ int ha_init()
|
||||
opt_using_transactions=1;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_FEDERATED_DB
|
||||
if (have_federated_db == SHOW_OPTION_YES)
|
||||
{
|
||||
if (federated_db_init())
|
||||
{
|
||||
have_federated_db= SHOW_OPTION_DISABLED;
|
||||
error= 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_ARCHIVE_DB
|
||||
if (have_archive_db == SHOW_OPTION_YES)
|
||||
{
|
||||
@ -405,6 +415,10 @@ int ha_panic(enum ha_panic_function flag)
|
||||
if (have_ndbcluster == SHOW_OPTION_YES)
|
||||
error|=ndbcluster_end();
|
||||
#endif
|
||||
#ifdef HAVE_FEDERATED_DB
|
||||
if (have_federated_db == SHOW_OPTION_YES)
|
||||
error|= federated_db_end();
|
||||
#endif
|
||||
#ifdef HAVE_ARCHIVE_DB
|
||||
if (have_archive_db == SHOW_OPTION_YES)
|
||||
error|= archive_db_end();
|
||||
|
Reference in New Issue
Block a user