[MDEV-19235] MariaDB Server compiled for 128 Indexes crashes at startup Created: 2019-04-10 Updated: 2023-05-16 Resolved: 2019-05-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.4 |
| Fix Version/s: | 10.4.5 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Axel Schwenke | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Description |
|
I compiled MariaDB-10.4.4 from the released tarball with support for 128 indexes by using -DMAX_INDEXES=128 for cmake. The binary crashes when mysql_install_db creates system tables. In order to get a proper stack trace I started the binary on an existing datadir. It also crashes at startup; this time producing a proper stack trace:
|
| Comments |
| Comment by Axel Schwenke [ 2019-04-10 ] | ||
|
Two side notes:
| ||
| Comment by Sergei Golubchik [ 2019-04-11 ] | ||
|
The crash is caused by
members of the KEY class that were added in 10.4. I see three possible ways to fix it:
| ||
| Comment by Axel Schwenke [ 2019-04-11 ] | ||
If I had a vote, I would put it here. C++ certainly has a suitable container that could be used instead of MY_BITMAP. std::bitset comes to mind. Or std::vector<bool>. Those will be portable and (hopefully) properly optimized. We will still need to use proper assignments to copy those struct members. | ||
| Comment by Sergei Golubchik [ 2019-04-15 ] | ||
|
Yes, after discussing this bug with shagalla, we've agreed to try the last approach. Not necessarily an std container, though. Just something that can be as trivially coped and bzero'ed as ulonglong. | ||
| Comment by Vladislav Vaintroub [ 2019-04-18 ] | ||
|
serg , could you please review https://github.com/MariaDB/server/commit/a4be420c920ef5faaf5b1735c22dd7958d0c26e7 ? buildbot of this branch(which uses MAX_INDEXES=128) |