Commit 93eef69d authored by unknown's avatar unknown
Browse files

Finish the merge of the patch for bug #15195 from 4.1 -> 5.0

- Adapt it to work with the handlerton class


sql/handler.cc:
  Only create new MERGE handler if merge engine is enabled
sql/mysql_priv.h:
  Use the myisammrg_hton.state field for the have_merge_db option
sql/mysqld.cc:
  Handle the OPT_MERGE (--skip-merge) option case
parent d7baef2a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -302,7 +302,9 @@ handler *get_new_handler(TABLE *table, MEM_ROOT *alloc, enum db_type db_type)
#endif
  case DB_TYPE_MRG_MYISAM:
  case DB_TYPE_MRG_ISAM:
    if (have_merge_db == SHOW_OPTION_YES)
      return new (alloc) ha_myisammrg(table);
    return NULL;
#ifdef HAVE_BERKELEY_DB
  case DB_TYPE_BERKELEY_DB:
    if (have_berkeley_db == SHOW_OPTION_YES)
+4 −1
Original line number Diff line number Diff line
@@ -1323,8 +1323,11 @@ extern handlerton ndbcluster_hton;
extern SHOW_COMP_OPTION have_ndbcluster;
#endif

/* MRG_MYISAM handler is always built, but may be skipped */
extern handlerton myisammrg_hton;
#define have_merge_db myisammrg_hton.state

extern SHOW_COMP_OPTION have_isam;
extern SHOW_COMP_OPTION have_merge_db;
extern SHOW_COMP_OPTION have_raid, have_openssl, have_symlink, have_dlopen;
extern SHOW_COMP_OPTION have_query_cache;
extern SHOW_COMP_OPTION have_geometry, have_rtree_keys;
+5 −0
Original line number Diff line number Diff line
@@ -6887,6 +6887,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
    global_system_variables.tx_isolation= (type-1);
    break;
  }
  case OPT_MERGE:
    if (opt_merge)
      have_merge_db= SHOW_OPTION_YES;
    else
      have_merge_db= SHOW_OPTION_DISABLED;
#ifdef HAVE_BERKELEY_DB
  case OPT_BDB_NOSYNC:
    /* Deprecated option */