diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-12-12 09:35:18 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-12-12 09:57:17 +0200 |
commit | 34841d2305b6bbe2c0b496add905b1dd478dafbe (patch) | |
tree | 85b31de5caf44a9024d73e41fbdbdadb29ff5526 /strings | |
parent | 62eaf7b657fd25bb4457049c81fb929314d6eb1d (diff) | |
parent | a285e68018018ef3959f6381aa61347b73902997 (diff) | |
download | mariadb-git-34841d2305b6bbe2c0b496add905b1dd478dafbe.tar.gz |
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-mb.c | 10 | ||||
-rw-r--r-- | strings/ctype-simple.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index 9e476c23202..bfd533e6f98 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -799,9 +799,9 @@ fill_max_and_min: 'a\0\0... is the smallest possible string when we have space expand a\ff\ff... is the biggest possible string */ - *min_length= ((cs->state & MY_CS_BINSORT) ? (size_t) (min_str - min_org) : - res_length); - *max_length= res_length; + *min_length= (cs->state & (MY_CS_BINSORT | MY_CS_NOPAD)) ? + (size_t) (min_str - min_org) : + res_length; /* Create min key */ do { @@ -1002,9 +1002,9 @@ my_like_range_generic(CHARSET_INFO *cs, a\min\min... is the smallest possible string a\max\max... is the biggest possible string */ - *min_length= ((cs->state & MY_CS_BINSORT) ? + *min_length= (cs->state & (MY_CS_BINSORT | MY_CS_NOPAD)) ? (size_t) (min_str - min_org) : - res_length); + res_length; *max_length= res_length; goto pad_min_max; } diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index cf73f117f0f..fc5218caba1 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -1059,9 +1059,9 @@ my_bool my_like_range_simple(CHARSET_INFO *cs, if (*ptr == w_many) /* '%' in SQL */ { /* Calculate length of keys */ - *min_length= ((cs->state & MY_CS_BINSORT) ? + *min_length= (cs->state & (MY_CS_BINSORT | MY_CS_NOPAD)) ? (size_t) (min_str - min_org) : - res_length); + res_length; *max_length= res_length; do { |