Navigation Menu

Skip to content

Commit

Permalink
storage: clear cache on data change oprations
Browse files Browse the repository at this point in the history
Data change operations are write_row, delete_row and update_row in
storage API.
  • Loading branch information
kou committed Feb 2, 2013
1 parent d126364 commit 9b3a045
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ha_mroonga.cpp
Expand Up @@ -5192,6 +5192,8 @@ int ha_mroonga::storage_write_row(uchar *buf)
}
slot_data->last_insert_record_id = record_id;

grn_db_touch(ctx, grn_ctx_db(ctx));

DBUG_RETURN(0);

err2:
Expand Down Expand Up @@ -5685,6 +5687,8 @@ int ha_mroonga::storage_update_row(const uchar *old_data, uchar *new_data)
DBUG_RETURN(error);
}

grn_db_touch(ctx, grn_ctx_db(ctx));

DBUG_RETURN(0);

err:
Expand Down Expand Up @@ -5977,6 +5981,9 @@ int ha_mroonga::storage_delete_row(const uchar *buf)
) {
DBUG_RETURN(error);
}

grn_db_touch(ctx, grn_ctx_db(ctx));

DBUG_RETURN(0);
}

Expand Down

0 comments on commit 9b3a045

Please sign in to comment.