Commit d5e6dce9 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #732

make error handling of index_read and index_last consistent with
MyISAM and InnoDB

git-svn-id: file:///svn/mysql/tokudb-engine/src@3800 c7de825b-a66e-492c-adef-691d508d4ae1
parent 49aeda23
......@@ -2231,7 +2231,7 @@ int ha_tokudb::index_read(uchar * buf, const uchar * key, uint key_len, enum ha_
error = HA_ERR_UNSUPPORTED;
break;
}
error = read_row(error, buf, active_index, &row, &last_key, find_flag != HA_READ_KEY_EXACT);
error = read_row(error, buf, active_index, &row, &last_key, 0);
if (error && (tokudb_debug & TOKUDB_DEBUG_ERROR))
TOKUDB_TRACE("error:%d:%d\n", error, find_flag);
TOKUDB_DBUG_RETURN(error);
......@@ -2363,7 +2363,7 @@ int ha_tokudb::index_last(uchar * buf) {
DBT row;
statistic_increment(table->in_use->status_var.ha_read_last_count, &LOCK_status);
bzero((void *) &row, sizeof(row));
TOKUDB_DBUG_RETURN(read_row(cursor->c_get(cursor, &last_key, &row, DB_LAST), buf, active_index, &row, &last_key, 0));
TOKUDB_DBUG_RETURN(read_row(cursor->c_get(cursor, &last_key, &row, DB_LAST), buf, active_index, &row, &last_key, 1));
}
//
......
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