Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pessimistic_write_or_fail / pessimistic_partial_write lock option not implemented for MySQL #6530

Closed
jokester opened this issue Aug 7, 2020 · 0 comments

Comments

@jokester
Copy link
Contributor

jokester commented Aug 7, 2020

Issue type:

[ ] question
[ ] bug report
[x] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[x] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[ ] latest
[ ] @next
[x] 0.2.25


Currently the 2 lock options are only implemented for postgres: SelectQueryBuilder

It seems that the same behavior can be implemented for recent MySQL like (I'm not a database guru, corrections welcome)

pessimistic_write_or_fail   --  SELECT ... FOR UPDATE NOWAIT
pessimistic_partial_write  -- SELECT ... FOR UPDATE SKIP LOCKED

see:

lacunadream added a commit to lacunadream/typeorm that referenced this issue Dec 31, 2020
Add pessimistic_write_or_fail and pessimistic_partial_write support for mysql

Closes: typeorm#6530
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants