Commit 3d417ee5 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #893

make table scans grab an entire read lock from the beginning

git-svn-id: file:///svn/mysql/tokudb-engine/src@4404 c7de825b-a66e-492c-adef-691d508d4ae1
parent 9732f7f3
......@@ -2652,8 +2652,16 @@ int ha_tokudb::index_last(uchar * buf) {
//
int ha_tokudb::rnd_init(bool scan) {
TOKUDB_DBUG_ENTER("ha_tokudb::rnd_init");
int error;
current_row.flags = DB_DBT_REALLOC;
TOKUDB_DBUG_RETURN(index_init(primary_key, 0));
if (scan) {
DB* db = share->key_file[primary_key];
error = db->pre_acquire_read_lock(db, transaction, db->dbt_neg_infty(), NULL, db->dbt_pos_infty(), NULL);
if (error) { goto cleanup; }
}
error = index_init(primary_key, 0);
cleanup:
TOKUDB_DBUG_RETURN(error);
}
//
......
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