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

refs #4476 partition write frm data for the 5.6.7 handlerton

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@48967 c7de825b-a66e-492c-adef-691d508d4ae1
parent d755a5cf
......@@ -666,6 +666,9 @@ private:
int read_data_from_range_query_buff(uchar* buf, bool need_val);
void invalidate_bulk_fetch();
int delete_all_rows_internal();
#if TOKU_INCLUDE_WRITE_FRM_DATA
int write_frm_data(const uchar *frm_data, size_t frm_len);
#endif
};
#if MYSQL_VERSION_ID >= 50506
......
......@@ -156,23 +156,9 @@ ha_tokudb::is_alter_table_hot() {
TOKUDB_DBUG_RETURN(is_hot);
}
// write the new frm data to the status dictionary using the alter table transaction
int
ha_tokudb::new_alter_table_frm_data(const uchar *frm_data, size_t frm_len) {
TOKUDB_DBUG_ENTER("new_alter_table_path");
int error = 0;
if (TOKU_PARTITION_WRITE_FRM_DATA || table->part_info == NULL) {
// write frmdata to status
THD *thd = ha_thd();
tokudb_trx_data *trx = (tokudb_trx_data *) thd_data_get(thd, tokudb_hton->slot);
assert(trx);
DB_TXN *txn = trx->stmt; // use alter table transaction
assert(txn);
error = write_to_status(share->status_block, hatoku_frm_data, (void *)frm_data, (uint)frm_len, txn);
}
TOKUDB_DBUG_RETURN(error);
return write_frm_data(frm_data, frm_len);
}
void
......
......@@ -737,3 +737,24 @@ tables_have_same_keys_and_columns(TABLE* first_table, TABLE* second_table, bool
exit:
return retval;
}
#if TOKU_INCLUDE_WRITE_FRM_DATA
// write the new frm data to the status dictionary using the alter table transaction
int
ha_tokudb::write_frm_data(const uchar *frm_data, size_t frm_len) {
TOKUDB_DBUG_ENTER("write_frm_data");
int error = 0;
if (TOKU_PARTITION_WRITE_FRM_DATA || table->part_info == NULL) {
// write frmdata to status
THD *thd = ha_thd();
tokudb_trx_data *trx = (tokudb_trx_data *) thd_data_get(thd, tokudb_hton->slot);
assert(trx);
DB_TXN *txn = trx->stmt; // use alter table transaction
assert(txn);
error = write_to_status(share->status_block, hatoku_frm_data, (void *)frm_data, (uint)frm_len, txn);
}
TOKUDB_DBUG_RETURN(error);
}
#endif
......@@ -35,12 +35,14 @@
#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
#elif 50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699
#define TOKU_INCLUDE_ALTER_56 1
#define TOKU_INCLUDE_ROW_TYPE_COMPRESSION 1
#define TOKU_INCLUDE_XA 1
#define TOKU_PARTITION_WRITE_FRM_DATA 0
#define TOKU_PARTITION_WRITE_FRM_DATA 1
#define TOKU_INCLUDE_WRITE_FRM_DATA 1
#elif 50500 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50599
#define TOKU_INCLUDE_ALTER_56 1
......@@ -48,12 +50,14 @@
#define TOKU_INCLUDE_ROW_TYPE_COMPRESSION 1
#define TOKU_INCLUDE_XA 1
#define TOKU_PARTITION_WRITE_FRM_DATA 1
#define TOKU_INCLUDE_WRITE_FRM_DATA 1
#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
#error
......
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