mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 19:11:46 +01:00
simplify the delete_all_rows. addresses #969
git-svn-id: file:///svn/mysql/tokudb-engine/src@5237 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
1b27128066
commit
1502e53e09
1 changed files with 1 additions and 2 deletions
|
@ -4374,14 +4374,13 @@ ulong ha_tokudb::field_offset(Field *field) {
|
|||
int ha_tokudb::delete_all_rows() {
|
||||
TOKUDB_DBUG_ENTER("delete_all_rows");
|
||||
int error = 0;
|
||||
tokudb_trx_data *trx = (tokudb_trx_data *) thd_data_get(current_thd, tokudb_hton->slot);
|
||||
|
||||
// truncate all dictionaries
|
||||
uint curr_num_DBs = table->s->keys + test(hidden_primary_key);
|
||||
for (uint i = 0; i < curr_num_DBs; i++) {
|
||||
DB *db = share->key_file[i];
|
||||
u_int32_t row_count = 0;
|
||||
error = db->truncate(db, trx ? trx->stmt : 0, &row_count, 0);
|
||||
error = db->truncate(db, transaction, &row_count, 0);
|
||||
if (error)
|
||||
break;
|
||||
// do something with the row_count?
|
||||
|
|
Loading…
Add table
Reference in a new issue