[MDEV-18156] Assertion `0' failed or `btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with PAD_CHAR_TO_FULL_LENGTH Created: 2019-01-06 Updated: 2022-11-15 Resolved: 2019-09-03 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types, Virtual Columns |
| Affects Version/s: | 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.2.27, 10.3.18, 10.4.8, 10.5.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | affects-tests | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Description |
|
Note: It might well be a duplicate of
|
| Comments |
| Comment by Alexander Barkov [ 2019-02-18 ] | ||||||||||||||||||||||||
|
The problem happens because after changing sql_mode, the value of the column 'v' changes from CONCAT('bar',0x0000000000) to CONCAT('bar', 0x2020202020). This script demonstrates the difference:
A possible solution would be to disallow CHAR columns inside virtual column expressions. | ||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2019-05-25 ] | ||||||||||||||||||||||||
|
This one now also causes btr_validate_index assertion (with InnoDB):
| ||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2019-08-23 ] | ||||||||||||||||||||||||
|
A similar crash happens with the NO_UNSIGNED_SUBTRACTION flag change:
| ||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2019-08-23 ] | ||||||||||||||||||||||||
|
A similar crash happens with TIME_ROUND_FRACTIONAL. See | ||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2019-08-26 ] | ||||||||||||||||||||||||
|
Please review a patch: | ||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2019-08-28 ] | ||||||||||||||||||||||||
|
serg, please review a new version: | ||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2019-08-28 ] | ||||||||||||||||||||||||
|
This patch is good, basically ok to push. But it makes old tables unreadable (an error when a table is opened). We need some reasonable user-friendly behavior on upgrades. In a separate patch, yes. But both have to be pushed together, otherwise we risk that the first patch will be released alone and the second patch won't make it. | ||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2019-08-29 ] | ||||||||||||||||||||||||
|
serg, please find an additional patch here: It allows to open old tables for most purposes, only creation of "bad" virtual fields is now disallowed. Note, automatic fixing, like adding RTRIM()/RPAD(), is not implemented yet. Thanks. | ||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2019-08-30 ] | ||||||||||||||||||||||||
|
ok to push | ||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2020-08-11 ] | ||||||||||||||||||||||||
|
For the record, despite having a long history, I think it ended up only fixed in 10.5, as the fix wasn't acceptable for post-GA versions. But there were several commits in all branches, so I'm not sure what is the correct value for fixVersion. |