[t:2927], fix issue

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@23783 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Zardosht Kasheff 2010-09-14 13:27:08 +00:00 committed by Yoni Fogel
parent 300cefb2c0
commit d2f8bb187e

View file

@ -4152,6 +4152,9 @@ int ha_tokudb::index_end() {
int ha_tokudb::handle_cursor_error(int error, int err_to_return, uint keynr) {
TOKUDB_DBUG_ENTER("ha_tokudb::handle_cursor_error");
if (error) {
if (error == DB_LOCK_NOTGRANTED) {
error = HA_ERR_LOCK_WAIT_TIMEOUT;
}
last_cursor_error = error;
table->status = STATUS_NOT_FOUND;
int r = cursor->c_close(cursor);
@ -4302,6 +4305,9 @@ int ha_tokudb::read_full_row(uchar * buf) {
lockretry_wait;
}
if (error) {
if (error == DB_LOCK_NOTGRANTED) {
error = HA_ERR_LOCK_WAIT_TIMEOUT;
}
table->status = STATUS_NOT_FOUND;
TOKUDB_DBUG_RETURN(error == DB_NOTFOUND ? HA_ERR_CRASHED : error);
}