On 1/4/24 09:52, Marko Mäkelä wrote:
I tried a quick and dirty patch (attached) to fix this particular
case. Note: it only works with a fixed-length PRIMARY KEY, and I did
not run the regression test suite, only this particular test. We would
also need something similar for secondary indexes. But it is a start:

Nicely done! BTW (and this is tentative, I'm in a years-long process of wrapping my head around this as well) you may be able to get away without providing the same degree of safety for secondary indices--RR doesn't constrain predicate deps in the same way that Serializable does. I'm still working on building tests for that.

Would you be interested to help fix all this? It would be an iterative
process: you provide tests and we would update a branch accordingly.
You could even download precompiled packages from our CI system if
that is more convenient. Once we have it sorted out in some way (such
as "faking" deadlock errors), then it would be time to polish it, to
introduce new error messages or a new transaction isolation level, to
avoid risk of breaking any applications that would expect the current
buggy behaviour. First we would have to get the logic right.

Yeah! The existing Jepsen MySQL test suite should be able to do this. Right now it installs mariadb-server from the standard Debian Bookworm repositories, but modifying it to install a custom .deb file from your build system wouldn't be too hard. Or we could do tarballs with a little more work. Feel free to email me on or off-list, if you'd like me to try out a particular build. :-)

--Kyle