Commit bc430174 authored by unknown's avatar unknown

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


sql/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()
sql/ha_federated.h:
  declaration of federated_db_init() and federated_db_end()
sql/handler.cc:
  Added hooks for federated_db_init() and federated_db_end(), as done with ha_archive_db does.
parent 300dde3d
This diff is collapsed.
......@@ -174,3 +174,6 @@ public:
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
enum thr_lock_type lock_type); //required
};
bool federated_db_init(void);
bool federated_db_end(void);
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment