Commit f2f4f317 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

refs #6094 remove HA_GENERAL_ONLINE code from the handlerton

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@53679 c7de825b-a66e-492c-adef-691d508d4ae1
parent c57723bf
...@@ -295,11 +295,7 @@ static inline uint get_ext_key_parts(const KEY *key) { ...@@ -295,11 +295,7 @@ static inline uint get_ext_key_parts(const KEY *key) {
ulonglong ha_tokudb::table_flags() const { ulonglong ha_tokudb::table_flags() const {
return (table && do_ignore_flag_optimization(ha_thd(), table, share->replace_into_fast) ? return (table && do_ignore_flag_optimization(ha_thd(), table, share->replace_into_fast) ?
int_table_flags | HA_BINLOG_STMT_CAPABLE : int_table_flags | HA_BINLOG_STMT_CAPABLE :
#if defined(HA_GENERAL_ONLINE)
int_table_flags | HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | HA_ONLINE_ALTER);
#else
int_table_flags | HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE); int_table_flags | HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE);
#endif
} }
// //
......
...@@ -610,46 +610,6 @@ class ha_tokudb : public handler { ...@@ -610,46 +610,6 @@ class ha_tokudb : public handler {
int new_alter_table_frm_data(const uchar *frm_data, size_t frm_len); int new_alter_table_frm_data(const uchar *frm_data, size_t frm_len);
bool try_hot_alter_table(); bool try_hot_alter_table();
#endif #endif
#if TOKU_INCLUDE_ALTER_51
public:
int add_index(TABLE *table_arg, KEY *key_info, uint num_of_keys);
int prepare_drop_index(TABLE *table_arg, uint *key_num, uint num_of_keys);
int final_drop_index(TABLE *table_arg);
#endif
#if defined(HA_GENERAL_ONLINE)
private:
void print_alter_info(
TABLE *altered_table,
HA_CREATE_INFO *create_info,
HA_ALTER_FLAGS *alter_flags,
uint table_changes
);
public:
int check_if_supported_alter(TABLE *altered_table,
HA_CREATE_INFO *create_info,
HA_ALTER_FLAGS *alter_flags,
HA_ALTER_INFO *alter_info,
uint table_changes
);
int alter_table_phase1(THD *thd,
TABLE *altered_table,
HA_CREATE_INFO *create_info,
HA_ALTER_INFO *alter_info,
HA_ALTER_FLAGS *alter_flags)
{
return 0;
}
int alter_table_phase2(THD *thd,
TABLE *altered_table,
HA_CREATE_INFO *create_info,
HA_ALTER_INFO *alter_info,
HA_ALTER_FLAGS *alter_flags);
int alter_table_phase3(THD *thd, TABLE *table)
{
return 0;
}
#endif
private: private:
int tokudb_add_index( int tokudb_add_index(
......
...@@ -60,14 +60,8 @@ ...@@ -60,14 +60,8 @@
#define TOKU_INCLUDE_EXTENDED_KEYS 1 #define TOKU_INCLUDE_EXTENDED_KEYS 1
#endif #endif
#elif 50100 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID < 50299
#define TOKU_INCLUDE_ALTER_51 1
#define TOKU_INCLUDE_ROW_TYPE_COMPRESSION 1
#define TOKU_INCLUDE_XA 1
#define TOKU_PARTITION_WRITE_FRM_DATA 0
#define TOKU_INCLUDE_WRITE_FRM_DATA 0
#else #else
#error #error
#endif #endif
......
...@@ -228,7 +228,7 @@ static int tokudb_commit_by_xid(handlerton* hton, XID* xid); ...@@ -228,7 +228,7 @@ static int tokudb_commit_by_xid(handlerton* hton, XID* xid);
static int tokudb_rollback_by_xid(handlerton* hton, XID* xid); static int tokudb_rollback_by_xid(handlerton* hton, XID* xid);
#endif #endif
#if defined(HA_GENERAL_ONLINE) || defined(HA_INPLACE_ADD_INDEX_NO_READ_WRITE) #if defined(HA_INPLACE_ADD_INDEX_NO_READ_WRITE)
static uint tokudb_alter_table_flags(uint flags); static uint tokudb_alter_table_flags(uint flags);
#endif #endif
static int tokudb_rollback_to_savepoint(handlerton * hton, THD * thd, void *savepoint); static int tokudb_rollback_to_savepoint(handlerton * hton, THD * thd, void *savepoint);
...@@ -388,7 +388,7 @@ static int tokudb_init_func(void *p) { ...@@ -388,7 +388,7 @@ static int tokudb_init_func(void *p) {
tokudb_hton->panic = tokudb_end; tokudb_hton->panic = tokudb_end;
tokudb_hton->flush_logs = tokudb_flush_logs; tokudb_hton->flush_logs = tokudb_flush_logs;
tokudb_hton->show_status = tokudb_show_status; tokudb_hton->show_status = tokudb_show_status;
#if defined(HA_GENERAL_ONLINE) || defined(HA_INPLACE_ADD_INDEX_NO_READ_WRITE) #if defined(HA_INPLACE_ADD_INDEX_NO_READ_WRITE)
tokudb_hton->alter_table_flags = tokudb_alter_table_flags; tokudb_hton->alter_table_flags = tokudb_alter_table_flags;
#endif #endif
if (!tokudb_home) if (!tokudb_home)
...@@ -1766,20 +1766,7 @@ static void tokudb_cleanup_log_files(void) { ...@@ -1766,20 +1766,7 @@ static void tokudb_cleanup_log_files(void) {
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
#if defined(HA_GENERAL_ONLINE) #if defined(HA_INPLACE_ADD_INDEX_NO_READ_WRITE)
//
// *******NOTE*****
// If the flags HA_ONLINE_DROP_INDEX and HA_ONLINE_DROP_UNIQUE_INDEX
// are ever added, prepare_drop_index and final_drop_index will need to be modified
// so that the actual deletion of DB's is done in final_drop_index and not prepare_drop_index
//
static uint tokudb_alter_table_flags(uint flags)
{
return (HA_ONLINE_ADD_INDEX_NO_WRITES| HA_ONLINE_DROP_INDEX_NO_WRITES |
HA_ONLINE_ADD_UNIQUE_INDEX_NO_WRITES| HA_ONLINE_DROP_UNIQUE_INDEX_NO_WRITES|HA_GENERAL_ONLINE);
}
#elif defined(HA_INPLACE_ADD_INDEX_NO_READ_WRITE)
static uint tokudb_alter_table_flags(uint flags) { static uint tokudb_alter_table_flags(uint flags) {
return HA_INPLACE_ADD_INDEX_NO_READ_WRITE return HA_INPLACE_ADD_INDEX_NO_READ_WRITE
| HA_INPLACE_ADD_INDEX_NO_WRITE | HA_INPLACE_ADD_INDEX_NO_WRITE
......
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