Commit 737a0dbc authored by bar@mysql.com's avatar bar@mysql.com

ctype-ucs2.c:

  Bug#5523 Test failure: 'ctype_uca'
  Type cast should have been applied to shift and bit-and operation results, not to min_sort_char/max_sort_char before the operation.
parent 19a5d67e
...@@ -1345,10 +1345,10 @@ my_bool my_like_range_ucs2(CHARSET_INFO *cs, ...@@ -1345,10 +1345,10 @@ my_bool my_like_range_ucs2(CHARSET_INFO *cs,
} }
if (ptr[0] == '\0' && ptr[1] == w_one) /* '_' in SQL */ if (ptr[0] == '\0' && ptr[1] == w_one) /* '_' in SQL */
{ {
*min_str++= (char) cs->min_sort_char >> 8; *min_str++= (char) (cs->min_sort_char >> 8);
*min_str++= (char) cs->min_sort_char & 255; *min_str++= (char) (cs->min_sort_char & 255);
*max_str++= (char) cs->max_sort_char >> 8; *max_str++= (char) (cs->max_sort_char >> 8);
*max_str++= (char) cs->max_sort_char & 255; *max_str++= (char) (cs->max_sort_char & 255);
continue; continue;
} }
if (ptr[0] == '\0' && ptr[1] == w_many) /* '%' in SQL */ if (ptr[0] == '\0' && ptr[1] == w_many) /* '%' in SQL */
...@@ -1358,8 +1358,8 @@ my_bool my_like_range_ucs2(CHARSET_INFO *cs, ...@@ -1358,8 +1358,8 @@ my_bool my_like_range_ucs2(CHARSET_INFO *cs,
do { do {
*min_str++ = 0; *min_str++ = 0;
*min_str++ = 0; *min_str++ = 0;
*max_str++ = (char) cs->max_sort_char >>8; *max_str++ = (char) (cs->max_sort_char >> 8);
*max_str++ = (char) cs->max_sort_char & 255; *max_str++ = (char) (cs->max_sort_char & 255);
} while (min_str + 1 < min_end); } while (min_str + 1 < min_end);
return 0; return 0;
} }
......
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