[MDEV-32012] hash unique corrupts index on virtual blobs Created: 2023-08-25 Updated: 2023-11-22 Resolved: 2023-09-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Virtual Columns |
| Affects Version/s: | 10.4, 10.5, 10.6, 10.10, 10.11, 11.0, 11.1 |
| Fix Version/s: | 10.4.32, 10.5.23, 10.6.16, 10.10.7, 10.11.6, 11.0.4, 11.1.3 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Sergei Golubchik | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Description |
|
What happens here is the following sequence of events:
This isn't exactly a new kind of problems, this has happened before a few times in partitioning ( |
| Comments |
| Comment by Michael Widenius [ 2023-08-25 ] |
|
This bug only happens the following context (all have to apply)
In this case the error will happen when there is a duplicate hash value for the generated key. Temporary workarounds (any of):
If the generated blob was only used for unique checks, changing the blob to a varchar will have no effect on any applications using the table. |
| Comment by Michael Widenius [ 2023-08-25 ] |
|
Thus bug had been around a long time. It has not been known before this reported issue. As a follow-up improvement we will fix the hash function to have less collision, which will improve performance a bit. |
| Comment by Elena Stepanova [ 2023-09-02 ] |
|
Testing for the fix was performed, as far as it's possible with other existing bugs around virtual columns and unique hash keys. It didn't reveal any issues which hadn't been known before, and the reported problem was resolved, so it should be pushed into main. |