#27619: Queries where column name includes a '%' character break when using
MySQL
-----------------------------------------+------------------------
Reporter: Zach Zundel | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
Sorry about this nonsense, but...
I have a table in MySQL with a column name '%exp'. I know this is a poor
choice for a column name.
When calling the objects.all(), I was getting a rather frustrating error
message from pyMySQL, "not enough arguments for format string." I couldn't
figure out what was causing it until I printed result of calling
QuerySet.Query.sql_with_params() on the resulting QuerySet. I saw that
there were no params, but the string contained %e, which python
interpreted as trying to format the string.
--
Ticket URL: <https://code.djangoproject.com/ticket/27619>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/053.a7aa6aec976dddaf6ae92c52389dcf7e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.