Commit 14881a56 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#4592 merge mainline handlerton for mysql 5.5 refs[t:4592]

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@41457 c7de825b-a66e-492c-adef-691d508d4ae1
parent dbe5d696
This diff is collapsed.
......@@ -363,11 +363,17 @@ class ha_tokudb : public handler {
int acquire_table_lock (DB_TXN* trans, TABLE_LOCK_TYPE lt);
int estimate_num_rows(DB* db, u_int64_t* num_rows, DB_TXN* txn);
bool has_auto_increment_flag(uint* index);
int write_frm_data(DB* db, DB_TXN* txn, const char* frm_name);
int verify_frm_data(const char* frm_name, DB_TXN* trans);
int write_to_status(DB* db, HA_METADATA_KEY curr_key_data, void* data, uint size, DB_TXN* txn );
int write_metadata(DB* db, void* key, uint key_size, void* data, uint data_size, DB_TXN* txn );
int remove_frm_data(DB *db, DB_TXN *txn);
int write_to_status(DB* db, HA_METADATA_KEY curr_key_data, void* data, uint size, DB_TXN* txn);
int remove_from_status(DB* db, HA_METADATA_KEY curr_key_data, DB_TXN* txn);
int write_metadata(DB* db, void* key, uint key_size, void* data, uint data_size, DB_TXN* txn);
int remove_metadata(DB* db, void* key_data, uint key_size, DB_TXN* transaction);
int update_max_auto_inc(DB* db, ulonglong val);
int remove_key_name_from_status(DB* status_block, char* key_name, DB_TXN* txn);
int write_key_name_to_status(DB* status_block, char* key_name, DB_TXN* txn);
......@@ -544,7 +550,13 @@ class ha_tokudb : public handler {
int cmp_ref(const uchar * ref1, const uchar * ref2);
bool check_if_incompatible_data(HA_CREATE_INFO * info, uint table_changes);
#if MYSQL_VERSION_ID >= 50521
int add_index(TABLE *table_arg, KEY *key_info, uint num_of_keys, handler_add_index **add);
int final_add_index(handler_add_index *add, bool commit);
#else
int add_index(TABLE *table_arg, KEY *key_info, uint num_of_keys);
#endif
int tokudb_add_index(
TABLE *table_arg,
KEY *key_info,
......@@ -559,6 +571,12 @@ 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 MYSQL_VERSION_ID >= 50521
bool is_alter_table_hot();
#endif
void prepare_for_alter();
#if defined(HA_GENERAL_ONLINE)
void print_alter_info(
TABLE *altered_table,
......@@ -637,7 +655,7 @@ class ha_tokudb : public handler {
int direction,
THD* thd
);
private:
int read_full_row(uchar * buf);
int __close(int mutex_is_locked);
......
......@@ -182,7 +182,7 @@ 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)
#if defined(HA_GENERAL_ONLINE) || defined(HA_INPLACE_ADD_INDEX_NO_READ_WRITE)
static uint tokudb_alter_table_flags(uint flags);
#endif
static int tokudb_rollback_to_savepoint(handlerton * hton, THD * thd, void *savepoint);
......@@ -332,7 +332,7 @@ 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)
#if defined(HA_GENERAL_ONLINE) || defined(HA_INPLACE_ADD_INDEX_NO_READ_WRITE)
tokudb_hton->alter_table_flags = tokudb_alter_table_flags;
#endif
if (!tokudb_home)
......@@ -1349,6 +1349,15 @@ 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);
}
#elif defined(HA_INPLACE_ADD_INDEX_NO_READ_WRITE)
static uint tokudb_alter_table_flags(uint flags) {
return HA_INPLACE_ADD_INDEX_NO_READ_WRITE
| HA_INPLACE_ADD_INDEX_NO_WRITE
| HA_INPLACE_DROP_INDEX_NO_READ_WRITE
| HA_INPLACE_ADD_UNIQUE_INDEX_NO_READ_WRITE
| HA_INPLACE_ADD_UNIQUE_INDEX_NO_WRITE
| HA_INPLACE_DROP_UNIQUE_INDEX_NO_READ_WRITE;
}
#endif
......@@ -1585,7 +1594,10 @@ mysql_declare_plugin(tokudb)
TOKUDB_PLUGIN_VERSION, /* 4.0.0 */
NULL, /* status variables */
tokudb_system_variables, /* system variables */
NULL /* config options */
NULL, /* config options */
#if MYSQL_VERSION_ID >= 50521
0, /* flags */
#endif
},
{
MYSQL_INFORMATION_SCHEMA_PLUGIN,
......@@ -1599,7 +1611,10 @@ mysql_declare_plugin(tokudb)
TOKUDB_PLUGIN_VERSION, /* 4.0.0 */
NULL, /* status variables */
NULL, /* system variables */
NULL /* config options */
NULL, /* config options */
#if MYSQL_VERSION_ID >= 50521
0, /* flags */
#endif
},
{
MYSQL_INFORMATION_SCHEMA_PLUGIN,
......@@ -1613,7 +1628,10 @@ mysql_declare_plugin(tokudb)
TOKUDB_PLUGIN_VERSION, /* 4.0.0 */
NULL, /* status variables */
NULL, /* system variables */
NULL /* config options */
NULL, /* config options */
#if MYSQL_VERSION_ID >= 50521
0, /* flags */
#endif
}
mysql_declare_plugin_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