Bug #60348 trim trailing spaces processes data only byte wise (continue of bug14637 (2))
| Submitted: | 4 Mar 2011 20:14 | Modified: | 15 Jan 2013 15:24 |
|---|---|---|---|
| Reporter: | Linhai Song | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server | Severity: | S5 (Performance) |
| Version: | 5.1.55 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | performance | ||
[4 Mar 2011 20:14]
Linhai Song
[4 Mar 2011 22:07]
Linhai Song
there is another place follow this situation:
13 /mysql-5.1.55/sql/sql_select.cc:14484
for (str=copy->str,end= str+copy->length;
end > str && end[-1] == ' ' ;
end--) ;
[12 Mar 2011 2:05]
Linhai Song
I have done some unit test, and found that if the number of blank characters is larger than 4, patch version will work better.
I put my unit test results as follows:
blank characters patch un-patch
1 0.016 0.013
2 0.019 0.017
3 0.022 0.019
4 0.02 0.21
5 0.021 0.024
6 0.023 0.026
7 0.028 0.029
8 0.023 0.03
9 0.024 0.035
10 0.028 0.037
11 0.029 0.04
12 0.024 0.044
13 0.026 0.045
14 0.028 0.048
15 0.031 0.051
code fragments are run 1000000 in my unit test, and time unit is second.
[15 Jan 2013 15:24]
Matthew Lord
I think that Shane has identified the underlying issue and created an internal feature request for it (14057034). Due to this, I will mark this as verified. Thank you for your helpful reports, Linhai!
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.053 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.