In function lib/util_str.c/struppter_m() and strlower_m(), almost execute slow path. almost never fast path. I think while loop condition, -------------------------------------------------- while (*s && !(((unsigned char)s[0]) & 0x7F)) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -------------------------------------------------- is wrong. below code is correct? -------------------------------------------------- while (*s && (((unsigned char)s[0]) <= 0x7F)) { -------------------------------------------------- ------------------------------------------------------------------------- void strlower_m(char *s) { /* this is quite a common operation, so we want it to be fast. We optimise for the ascii case, knowing that all our supported multi-byte character sets are ascii-compatible (ie. they match for the first 128 chars) */ while (*s && !(((unsigned char)s[0]) & 0x7F)) { <---#### this #### *s = tolower((unsigned char)*s); s++; } if (!*s) return; /* I assume that lowercased string takes the same number of bytes * as source string even in UTF-8 encoding. (VIV) */ unix_strlower(s,strlen(s)+1,s,strlen(s)+1); } -------------------------------------------------------------------------
Applied for 3.0.2. Jeremy.
Fixed for 3.0.2. Jeremy.
*** Bug 978 has been marked as a duplicate of this bug. ***
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.