SeaQL / sea-orm

🐚 An async & dynamic ORM for Rust
https://www.sea-ql.org/SeaORM/
Apache License 2.0
7.03k stars 493 forks source link

Shared lock syntax incompatible with MariaDB #2107

Open tp971 opened 7 months ago

tp971 commented 7 months ago

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.