Opened 4 years ago
Closed 4 years ago
#31770 closed New feature (fixed)
Enable has_select_for_update_of feature on MySQL 8.0.1+.
Reported by: | Simon Charette | Owned by: | Simon Charette |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
While the SELECT FOR UPDATE
documentation now mentions the OF
option I couldn't find a single entry in the release notes so I'm not sure which version of MySQL supposedly added support for it.
All the tests/select_for_update
tests happen to pass when setting has_select_for_update_of = True
even on MySQL 5.5 so I'm not sure if this was always supported and never documented or if the syntax was always allowed and they just recently added support for it? Only the MySQL 8 documentation mentions it though.
In all cases it seems like the feature should be allowed since all supported versions of MySQL allow it.
Change History (7)
comment:1 by , 4 years ago
Description: | modified (diff) |
---|---|
Summary: | Enable has_select_for_update_of feature on MySQL 8 → Enable has_select_for_update_of feature on MySQL |
comment:2 by , 4 years ago
Summary: | Enable has_select_for_update_of feature on MySQL → Enable has_select_for_update_of feature on MySQL 8.0.1+. |
---|---|
Triage Stage: | Unreviewed → Accepted |
Version: | 3.0 → master |
comment:3 by , 4 years ago
select_for_update
tests fail for me on MySQL 5.6 and 5.7.
Not sure what I did wrong but I used django-docker-box
with MYSQL_VERSION=5.5 docker-compose run --rm mysql --noinput select_for_update
. I guess there might have been some Docker image caching involved.
comment:4 by , 4 years ago
Easy pickings: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:6 by , 4 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
It looks that it was officially added in MySQL 8.0.1:
select_for_update
tests fail for me on MySQL 5.6 and 5.7.