Skip to content

Conversation

brqnko
Copy link

@brqnko brqnko commented Aug 29, 2025

PR Info

New Features

  • None

Bug Fixes

  • Fixes a syntax error when using lock_shared() on MariaDB.

Breaking Changes

  • None

Changes

  • Create a lock_phrase method in QueryBuilder so that it can be overridden in MySqlQueryBuilder to use LOCK IN SHARE MODE.

@tyt2y3
Copy link
Member

tyt2y3 commented Sep 12, 2025

thank you for the fix. is this syntax compatible with MySQL?

@brqnko
Copy link
Author

brqnko commented Sep 17, 2025

Yes, this LOCK IN SHARE MODE syntax is compatible with MySQL.

While FOR SHARE is the recommended syntax in MySQL 8.0+, LOCK IN SHARE MODE is still supported for backward compatibility and works on both MariaDB and MySQL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shared lock syntax incompatible with MariaDB
2 participants