Navigation Menu

Skip to content

Commit

Permalink
Specify GRN_CURSOR_GE and GRN_CURSOR_ASCENDING explicitly.
Browse files Browse the repository at this point in the history
They are the default.
  • Loading branch information
kou committed Oct 5, 2012
1 parent cc1a00d commit eabd82f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions ha_mroonga.cpp
Expand Up @@ -6833,8 +6833,17 @@ int ha_mroonga::storage_read_range_first(const key_range *start_key,
break;
}
}
if (end_key && end_key->flag == HA_READ_BEFORE_KEY) {
flags |= GRN_CURSOR_LT | GRN_CURSOR_ASCENDING;
if (end_key) {
switch (end_key->flag) {
case HA_READ_BEFORE_KEY:
flags |= GRN_CURSOR_LT | GRN_CURSOR_ASCENDING;
break;
case HA_READ_AFTER_KEY:
flags |= GRN_CURSOR_GE | GRN_CURSOR_ASCENDING;
break;
default:
break;
}
}

uint pkey_nr = table->s->primary_key;
Expand Down

0 comments on commit eabd82f

Please sign in to comment.