Commit 71e3a2b3 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#4656 fix the reverse scan bug exhibited by the update where desc on mysql 5.5 refs[t:4656]

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@41459 c7de825b-a66e-492c-adef-691d508d4ae1
parent 14881a56
......@@ -5123,12 +5123,9 @@ int ha_tokudb::get_next(uchar* buf, int direction) {
//
rows_fetched_using_bulk_fetch = 0;
if (direction > 0) {
error = cursor->c_getf_next(cursor, flags,
smart_dbt_bf_callback, &bf_info);
}
else {
error = cursor->c_getf_prev(cursor, flags,
smart_dbt_bf_callback, &bf_info);
error = cursor->c_getf_next(cursor, flags, smart_dbt_bf_callback, &bf_info);
} else {
error = cursor->c_getf_prev(cursor, flags, smart_dbt_bf_callback, &bf_info);
}
if (bulk_fetch_iteration < HA_TOKU_BULK_FETCH_ITERATION_MAX) {
bulk_fetch_iteration++;
......@@ -5147,11 +5144,13 @@ int ha_tokudb::get_next(uchar* buf, int direction) {
info.ha = this;
info.buf = buf;
info.keynr = active_index;
error = cursor->c_getf_next(cursor, flags,
SMART_DBT_CALLBACK, &info);
error = handle_cursor_error(error, HA_ERR_END_OF_FILE,
active_index);
if (direction > 0) {
error = cursor->c_getf_next(cursor, flags, SMART_DBT_CALLBACK, &info);
} else {
error = cursor->c_getf_prev(cursor, flags, SMART_DBT_CALLBACK, &info);
}
error = handle_cursor_error(error, HA_ERR_END_OF_FILE, active_index);
}
}
......
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