[MDEV-12633] Conditional jump or move depends on uninitialised value in my_scan_weight_utf8_general_ci, main.mysql_client_test fails in biuldbot with valgrind Created: 2017-04-29 Updated: 2017-11-02 Resolved: 2017-11-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Plugins, Server, Tests |
| Affects Version/s: | 10.1, 10.2 |
| Fix Version/s: | 10.1.29, 10.2.11 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Also reproducible locally. |
| Comments |
| Comment by Elena Stepanova [ 2017-04-29 ] | ||||||||||||
|
main.mysql_client_test_nonblock, main.show_check, main.mysqlcheck, main.mysql_client_test_comp, main.drop-no_root are also affected. | ||||||||||||
| Comment by Alexander Barkov [ 2017-11-02 ] | ||||||||||||
|
The failure is repeatable with this simplified test file:
The failure happens because dd_frm_type() leaves the engine_name argument uninitialized when it could not read the engine name from a junk FRM file, while it still returns FRMTYPE_TABLE. So the caller does not know that engine_name is not properly set and continues with searching a handler by name. Perhaps dd_frm_type() should be fixed to return FRMTYPE_ERROR in such cases. | ||||||||||||
| Comment by Michael Widenius [ 2017-11-02 ] | ||||||||||||
|
We can't return FRMTYPE_ERROR from dd_frm_type if the .frm file exists, as otherwise we would not be able to drop a bad .frm file with 'drop table' Simple fix is to just ensure that engine_name is an empty string, if something goes wrong. | ||||||||||||
| Comment by Michael Widenius [ 2017-11-02 ] | ||||||||||||
|
Fix pushed |