diff options
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-uca.c | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c index 4763a7b7e1b..91af7af0c54 100644 --- a/strings/ctype-uca.c +++ b/strings/ctype-uca.c @@ -7099,38 +7099,37 @@ static int my_strnncollsp_uca(CHARSET_INFO *cs, { s_res= scanner_handler->next(&sscanner); t_res= scanner_handler->next(&tscanner); + } while ( s_res == t_res && s_res >0); - if (s_res > 0 && t_res < 0) - { - /* Calculate weight for SPACE character */ - t_res= cs->sort_order_big[0][0x20 * cs->sort_order[0]]; + if (s_res > 0 && t_res < 0) + { + /* Calculate weight for SPACE character */ + t_res= cs->sort_order_big[0][0x20 * cs->sort_order[0]]; - /* compare the first string to spaces */ - do - { - if (s_res != t_res) - return (s_res - t_res); - s_res= scanner_handler->next(&sscanner); - } while (s_res > 0); - return 0; - } - - if (s_res < 0 && t_res > 0) + /* compare the first string to spaces */ + do { - /* Calculate weight for SPACE character */ - s_res= cs->sort_order_big[0][0x20 * cs->sort_order[0]]; - - /* compare the second string to spaces */ - do - { - if (s_res != t_res) - return (s_res - t_res); - t_res= scanner_handler->next(&tscanner); - } while (t_res > 0); - return 0; - } + if (s_res != t_res) + return (s_res - t_res); + s_res= scanner_handler->next(&sscanner); + } while (s_res > 0); + return 0; + } - } while ( s_res == t_res && s_res >0); + if (s_res < 0 && t_res > 0) + { + /* Calculate weight for SPACE character */ + s_res= cs->sort_order_big[0][0x20 * cs->sort_order[0]]; + + /* compare the second string to spaces */ + do + { + if (s_res != t_res) + return (s_res - t_res); + t_res= scanner_handler->next(&tscanner); + } while (t_res > 0); + return 0; + } return ( s_res - t_res ); } |