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?
In all cases it seems like the feature should be allowed since all
supported versions of MySQL allow it.
--
Ticket URL: <https://code.djangoproject.com/ticket/31770>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
> While the `SELECT FOR UPDATE`
> [https://dev.mysql.com/doc/refman/8.0/en/select.html#idm45705194357888
> documentation now mentions the] `OF` option I
> [https://www.oracle.com/search/results?Ntt=%22FOR%20UPDATE%20OF%22&Dy=1&Nty=1&cat=mysql&Ntk
> =SI-ALL5 couldn't find a single entry in the release notes] so I'm not
> sure which version of MySQL 8 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?
>
> In all cases it seems like the feature should be allowed since all
> supported versions of MySQL allow it.
New description:
While the `SELECT FOR UPDATE`
[https://dev.mysql.com/doc/refman/8.0/en/select.html#idm45705194357888
documentation now mentions the] `OF` option I
[https://www.oracle.com/search/results?Ntt=%22FOR%20UPDATE%20OF%22&Dy=1&Nty=1&cat=mysql&Ntk
=SI-ALL5 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.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31770#comment:1>
* version: 3.0 => master
* stage: Unreviewed => Accepted
Comment:
It looks that it was officially added in
[https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html#mysqld-8-0-1-feature
MySQL 8.0.1]:
> ''"OF now is a reserved word and cannot be used as an identifier without
identifier quoting."''
`select_for_update` tests fail for me on MySQL 5.6 and 5.7.
--
Ticket URL: <https://code.djangoproject.com/ticket/31770#comment:2>
Comment (by Simon Charette):
> `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.
--
Ticket URL: <https://code.djangoproject.com/ticket/31770#comment:3>
* owner: nobody => Simon Charette
* status: new => assigned
* easy: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/31770#comment:4>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/31770#comment:5>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/31770#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"ca6c5e5fc23f2855a7094d195f09975b21a7ec3f" ca6c5e5]:
{{{
#!CommitTicketReference repository=""
revision="ca6c5e5fc23f2855a7094d195f09975b21a7ec3f"
Fixed #31770 -- Allowed select_for_update(of) on MySQL 8.0.1+.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31770#comment:7>