Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

revert #56

  • Loading branch information...
commit 33fda0d039b03f9a036a1fae36a3f10f0e7de56e 1 parent 51395a4
@ahiguti authored
Showing with 2 additions and 9 deletions.
  1. +2 −9 handlersocket/database.cpp
View
11 handlersocket/database.cpp
@@ -796,23 +796,18 @@ dbcontext::cmd_find_internal(dbcallback_i& cb, const prep_stmt& pst,
size_t modified_count = 0;
int r = 0;
bool is_first = true;
- bool in_loop = false;
for (uint32_t cnt = 0; cnt < limit + skip;) {
if (is_first) {
is_first = false;
const key_part_map kpm = (1U << args.kvalslen) - 1;
r = hnd->index_read_map(table->record[0], key_buf, kpm, find_flag);
- if (args.invalues_keypart >= 0) {
- in_loop = true;
- }
- } else if (!in_loop && args.invalues_keypart >= 0) {
+ } else if (args.invalues_keypart >= 0) {
if (++invalues_idx >= args.invalueslen) {
break;
}
kplen_sum = prepare_keybuf(args, key_buf, table, kinfo, invalues_idx);
const key_part_map kpm = (1U << args.kvalslen) - 1;
r = hnd->index_read_map(table->record[0], key_buf, kpm, find_flag);
- in_loop = true;
} else {
switch (find_flag) {
case HA_READ_BEFORE_KEY:
@@ -857,8 +852,7 @@ dbcontext::cmd_find_internal(dbcallback_i& cb, const prep_stmt& pst,
}
++cnt;
}
- if (args.invalues_keypart >= 0 && r != 0 ) {
- in_loop = false;
+ if (args.invalues_keypart >= 0 && r == HA_ERR_KEY_NOT_FOUND) {
continue;
}
if (r != 0 && r != HA_ERR_RECORD_DELETED) {
@@ -1187,4 +1181,3 @@ dbcontext::set_statistics(size_t num_conns, size_t num_active)
};
-
Please sign in to comment.
Something went wrong with that request. Please try again.