Permalink
Browse files

BUG#21121197 - IB_CURSOR_MOVETO() DOESN'T ACCEPT SEARCH TUPPLE WITH S…

…MALLER

N_FIELDS

We should accept the tuples with less fields than what's defined on the index.

Reviewed-by: Sunny Bains <sunny.bains@oracle.com>
Approved over IM

(cherry picked from commit 3bbda42e6f389320b9282a198137d8a87e317311)
  • Loading branch information...
Bin Su
Bin Su committed May 21, 2015
1 parent aeef8dc commit d511b503353c1588e90907f59b947e31796c1fc1
Showing with 4 additions and 0 deletions.
  1. +4 −0 storage/innobase/api/api0api.cc
@@ -2104,6 +2104,10 @@ ib_cursor_moveto(
n_fields = dict_index_get_n_ordering_defined_by_user(prebuilt->index);
if (n_fields > dtuple_get_n_fields(tuple->ptr)) {
n_fields = dtuple_get_n_fields(tuple->ptr);
}
dtuple_set_n_fields(search_tuple, n_fields);
dtuple_set_n_fields_cmp(search_tuple, n_fields);

0 comments on commit d511b50

Please sign in to comment.