Commit 0b1ccfc1 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

put the status update cursor inside of a transaction. close #426

git-svn-id: file:///svn/mysql/tokudb-engine/src@2353 c7de825b-a66e-492c-adef-691d508d4ae1
parent 4dfbf205
......@@ -1088,7 +1088,11 @@ void ha_tokudb::get_status() {
}
if (!(share->status & STATUS_ROW_COUNT_INIT) && share->status_block) {
share->org_rows = share->rows = table_share->max_rows ? table_share->max_rows : HA_TOKUDB_MAX_ROWS;
if (!share->status_block->cursor(share->status_block, 0, &cursor, 0)) {
DB_TXN *transaction = 0;
int r = db_env->txn_begin(db_env, 0, &transaction, 0);
if (r == 0) {
r = share->status_block->cursor(share->status_block, transaction, &cursor, 0);
if (r == 0) {
DBT row;
char rec_buff[64];
bzero((void *) &row, sizeof(row));
......@@ -1108,6 +1112,9 @@ void ha_tokudb::get_status() {
}
cursor->c_close(cursor);
}
r = transaction->commit(transaction, 0);
transaction = 0;
}
cursor = 0;
}
share->status |= STATUS_PRIMARY_KEY_INIT | STATUS_ROW_COUNT_INIT;
......
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