Commit 50980272 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:4635] ::truncate_dictionary should keep the old row type


git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@41540 c7de825b-a66e-492c-adef-691d508d4ae1
parent b4b017b2
......@@ -8043,7 +8043,8 @@ int ha_tokudb::optimize(THD * thd, HA_CHECK_OPT * check_opt) {
int ha_tokudb::truncate_dictionary( uint keynr, DB_TXN* txn ) {
int error;
bool is_pk = (keynr == primary_key);
enum row_type type = get_row_type();
error = share->key_file[keynr]->close(share->key_file[keynr], 0);
assert(error == 0);
......@@ -8073,6 +8074,8 @@ int ha_tokudb::truncate_dictionary( uint keynr, DB_TXN* txn ) {
if (error) { goto cleanup; }
}
table->s->row_type = type; // ensure newly created dictionary has the original compression type
if (is_pk) {
error = create_main_dictionary(share->table_name, table, txn, &share->kc_info);
}
......
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