Commit 2eeed518 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:4720], fix add index for partitioned tables, handler piece

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@41818 c7de825b-a66e-492c-adef-691d508d4ae1
parent 60a4abba
...@@ -10158,11 +10158,14 @@ ha_tokudb::prepare_for_alter() { ...@@ -10158,11 +10158,14 @@ ha_tokudb::prepare_for_alter() {
THD *thd = ha_thd(); THD *thd = ha_thd();
tokudb_trx_data *trx = (tokudb_trx_data *) thd_data_get(thd, tokudb_hton->slot); tokudb_trx_data *trx = (tokudb_trx_data *) thd_data_get(thd, tokudb_hton->slot);
assert(trx); assert(trx);
// for partitioned tables, a transaction may already exist,
// as we call prepare_for_alter on all partitions
if (!trx->sub_sp_level) {
int error = create_txn(thd, trx); int error = create_txn(thd, trx);
assert(error == 0); assert(error == 0);
assert(thd->in_sub_stmt == 0); assert(thd->in_sub_stmt == 0);
}
transaction = trx->sub_sp_level; transaction = trx->sub_sp_level;
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
......
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