sea-orm icon indicating copy to clipboard operation
sea-orm copied to clipboard

Shared lock syntax incompatible with MariaDB

Open tp971 opened this issue 2 years ago • 0 comments

When selecting with a shared lock, e.g. Entity::find().lock_shared(), the generated query looks like SELECT ... FROM ... FOR SHARE, but MariaDB only supports the syntax SELECT ... FROM ... LOCK IN SHARE MODE (see https://mariadb.com/kb/en/select/). This is basically the old syntax for MySQL, so this issue might also occur with an old MySQL server. The current MySQL version supports both variants.

tp971 avatar Feb 11 '24 05:02 tp971