Commit 49a37d5a authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

refs #4675, fix auto increment behavior on truncate to reset properly

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@49931 c7de825b-a66e-492c-adef-691d508d4ae1
parent 76cd9b2a
......@@ -7942,6 +7942,16 @@ int ha_tokudb::delete_all_rows_internal() {
// zap the row count
if (error == 0) {
share->rows = 0;
// update auto increment
share->last_auto_increment = 0;
// calling write_to_status directly because we need to use txn
write_to_status(
share->status_block,
hatoku_max_ai,
&share->last_auto_increment,
sizeof(share->last_auto_increment),
txn
);
}
share->try_table_lock = true;
......
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