diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index 8cce0388985..d875fddf7b3 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -5071,7 +5071,8 @@ int ha_tokudb::fill_range_query_buf( // we tell the cursor to continue and don't store // the key locally else if (result == ICP_NO_MATCH) { - goto check_bounds; + error = TOKUDB_CURSOR_CONTINUE; + goto cleanup; } } #endif @@ -5224,7 +5225,6 @@ int ha_tokudb::fill_range_query_buf( error = 0; goto cleanup; } - check_bounds: if (direction > 0) { // compare what we got to the right endpoint of prelocked range // because we are searching keys in ascending order