-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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
Fixed #27321 -- Added detection for table case name sensitivity on MySQL #7607
Conversation
This works but it's not strictly true. The description for the feature is:
MySQL is not case sensitive for many kinds of quotable identifiers, as per the docs:
It's just table names that are case sensitive, depending on the filesystem. In practice Django is only using |
@cached_property | ||
def ignores_quoted_identifier_case(self): | ||
""" | ||
See https://dev.mysql.com/doc/refman/5.7/en/identifier-case-sensitivity.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Omit 5.7 in the URL, although this URL is the first result for searching "LOWER_CASE_TABLE_NAMES MySQL" so maybe there's not much value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know you could skip the version number from the url's, nice.
Maybe there isn't much value, but I hope it's useful for review at least
0f53f7b
to
c0ff4e4
Compare
Not sure about renaming the feature (added in c2e62fd). Any opinion @charettes? |
Since the flag is only part of 1.10 and describes more accurately the checks we perform against it I wouldn't be opposed to rename it. |
Should I add a deprecation shim or are database backends too internal to be subject to the deprecation policy? |
c0ff4e4
to
a33342d
Compare
@adamchainz I don't think a shim is required. If a third party database backend was relying on this flag the tests for this feature will fail and they'll be pointed in the right direction. What do you think @manfre? |
We could add the change in the "Database backend API" section of the backwards-incompatibel changes in the release notes. That said, a Google search for |
a33342d
to
1897bbf
Compare
@@ -240,6 +240,9 @@ Database backends | |||
* Added the :setting:`TEST['TEMPLATE'] <TEST_TEMPLATE>` setting to let | |||
PostgreSQL users specify a template for creating the test database. | |||
|
|||
* Renamed the ``ignores_quoted_identifier_case`` feature to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This goes in "Backwards-incompatible changes" not "MInor features".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops thx.
It depends on the value of the `lower_case_table_names` setting, plus the case sensitivity of the filesystem that the table is on.
1897bbf
to
d619656
Compare
A bit late, but the release notes are plenty for the rename, especially since it doesn't appear that it is in use (at least for the open sourced backends). |
Thx @manfre |
It depends on the value of the
lower_case_table_names
setting, plus the case sensitivity of the filesystem that the table is on.