Commit 51e2a01a authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#3018 build tokudb with mysql 5.5.9 refs[t:3018]

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@29780 c7de825b-a66e-492c-adef-691d508d4ae1
parent dfdddddc
......@@ -291,7 +291,11 @@ static inline bool do_ignore_flag_optimization(THD* thd, TABLE* table, bool opt_
ulonglong ha_tokudb::table_flags() const {
return (table && do_ignore_flag_optimization(ha_thd(), table, share->replace_into_fast) ?
int_table_flags | HA_BINLOG_STMT_CAPABLE :
#if defined(HA_GENERNAL_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);
#endif
}
//
......@@ -7148,9 +7152,11 @@ void ha_tokudb::print_error(int error, myf errflag) {
if (error == DB_KEYEXIST) {
error = HA_ERR_FOUND_DUPP_KEY;
}
#if defined(HA_ALTER_ERROR)
if (error == HA_ALTER_ERROR) {
error = HA_ERR_UNSUPPORTED;
}
}
#endif
handler::print_error(error, errflag);
}
......@@ -7682,6 +7688,8 @@ bool tables_have_same_keys(TABLE* table, TABLE* altered_table, bool print_error)
return retval;
}
#if defined(HA_GENERAL_ONLINE)
void ha_tokudb::print_alter_info(
TABLE *altered_table,
HA_CREATE_INFO *create_info,
......@@ -9107,6 +9115,8 @@ int tokudb_update_fun(
return error;
}
#endif
struct check_context {
THD *thd;
};
......
......@@ -529,6 +529,7 @@ class ha_tokudb : public handler {
void restore_drop_indexes(TABLE *table_arg, uint *key_num, uint num_of_keys);
int final_drop_index(TABLE *table_arg);
#if defined(HA_GENERAL_ONLINE)
void print_alter_info(
TABLE *altered_table,
HA_CREATE_INFO *create_info,
......@@ -557,7 +558,7 @@ class ha_tokudb : public handler {
{
return 0;
}
#endif
// delete all rows from the table
// effect: all dictionaries, including the main and indexes, should be empty
......
......@@ -167,7 +167,9 @@ static bool tokudb_show_status(handlerton * hton, THD * thd, stat_print_fn * pri
static int tokudb_close_connection(handlerton * hton, THD * thd);
static int tokudb_commit(handlerton * hton, THD * thd, bool all);
static int tokudb_rollback(handlerton * hton, THD * thd, bool all);
#if defined(HA_GENERAL_ONLINE)
static uint tokudb_alter_table_flags(uint flags);
#endif
static int tokudb_rollback_to_savepoint(handlerton * hton, THD * thd, void *savepoint);
static int tokudb_savepoint(handlerton * hton, THD * thd, void *savepoint);
static int tokudb_release_savepoint(handlerton * hton, THD * thd, void *savepoint);
......@@ -262,7 +264,9 @@ static int tokudb_init_func(void *p) {
tokudb_hton->panic = tokudb_end;
tokudb_hton->flush_logs = tokudb_flush_logs;
tokudb_hton->show_status = tokudb_show_status;
#if defined(HA_GENERAL_ONLINE)
tokudb_hton->alter_table_flags = tokudb_alter_table_flags;
#endif
if (!tokudb_home)
tokudb_home = mysql_real_data_home;
DBUG_PRINT("info", ("tokudb_home: %s", tokudb_home));
......@@ -1393,6 +1397,7 @@ void tokudb_cleanup_log_files(void) {
DBUG_VOID_RETURN;
}
#if defined(HA_GENERAL_ONLINE)
//
// *******NOTE*****
// If the flags HA_ONLINE_DROP_INDEX and HA_ONLINE_DROP_UNIQUE_INDEX
......@@ -1405,7 +1410,7 @@ static uint tokudb_alter_table_flags(uint flags)
HA_ONLINE_ADD_UNIQUE_INDEX_NO_WRITES| HA_ONLINE_DROP_UNIQUE_INDEX_NO_WRITES|HA_GENERAL_ONLINE);
}
#endif
// options flags
......
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