[MDEV-7086] main.ctype_cp932 fails in buildbot on a valgrind build Created: 2014-11-12 Updated: 2014-11-18 Resolved: 2014-11-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.0 |
| Fix Version/s: | 10.0.15 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | buildbot, tests, valgrind | ||
| Issue Links: |
|
||||||||
| Description |
|
http://buildbot.askmonty.org/buildbot/builders/work-amd64-valgrind/builds/6310/steps/test/logs/stdio
|
| Comments |
| Comment by Sergei Petrunia [ 2014-11-12 ] | |||||||||||||||||||||||||||||||||||||||
|
When I run the test on its own, I get a different failure:
| |||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2014-11-12 ] | |||||||||||||||||||||||||||||||||||||||
|
Hmm.. after re-compling the tree exactly like the buildbot does, this new failure is gone, and I get a failure just like in the report. | |||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2014-11-12 ] | |||||||||||||||||||||||||||||||||||||||
|
The query that causes the error:
| |||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2014-11-12 ] | |||||||||||||||||||||||||||||||||||||||
|
The testcase that fails was added by this cset:
| |||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2014-11-12 ] | |||||||||||||||||||||||||||||||||||||||
|
Ok, so we are running this query:
and in my_wildcmp_mb_bin_impl we reach this code:
on the last line we have wildstr == wildend, but we still access wildstr[0], the byte beyond the end of the patter. In MariaDB-10.0 this causes a valgrind failure. In mysql-5.5, the code inside my_wildcmp_mb_bin_impl executes in exactly the same way. However, the pattern string is zero-terminated and we dont get the valgrind failure. I guess this could be fixed by either 2. Changing the condition
to not access wildstr[0] when wildstr==wildstr_end. I am not sure which is better. | |||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Petrunia [ 2014-11-12 ] | |||||||||||||||||||||||||||||||||||||||
|
bar, this is a charset issue. Could you take over please? | |||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2014-11-17 ] | |||||||||||||||||||||||||||||||||||||||
|
The problem is also repeatable with ascii characters in a cp932_bin column:
and with the default collation for cp932:
| |||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2014-11-17 ] | |||||||||||||||||||||||||||||||||||||||
|
Also repeatable with latin1 character set:
|