summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/operations.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-12-05 13:14:47 -0500
committerTim Graham <timograham@gmail.com>2018-12-05 14:46:23 -0500
commit284b3221a2c17af5bfe2edbf851ac0a9901f91a0 (patch)
tree3456700cc5a0f14ef7cdbdad881ce202c49086c2 /django/db/backends/mysql/operations.py
parentfbc7e4138921d0fbee823ce6ea9774de66d27e47 (diff)
downloaddjango-284b3221a2c17af5bfe2edbf851ac0a9901f91a0.tar.gz
Fixed #30013 -- Fixed DatabaseOperations.last_executed_query() with mysqlclient 1.3.14+.
Diffstat (limited to 'django/db/backends/mysql/operations.py')
-rw-r--r--django/db/backends/mysql/operations.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/backends/mysql/operations.py b/django/db/backends/mysql/operations.py
index 1414520eff..43f4f748d4 100644
--- a/django/db/backends/mysql/operations.py
+++ b/django/db/backends/mysql/operations.py
@@ -138,10 +138,10 @@ class DatabaseOperations(BaseDatabaseOperations):
return [(None, ("NULL", [], False))]
def last_executed_query(self, cursor, sql, params):
- # With MySQLdb, cursor objects have an (undocumented) "_last_executed"
+ # With MySQLdb, cursor objects have an (undocumented) "_executed"
# attribute where the exact query sent to the database is saved.
# See MySQLdb/cursors.py in the source distribution.
- query = getattr(cursor, '_last_executed', None)
+ query = getattr(cursor, '_executed', None)
if query is not None:
query = query.decode(errors='replace')
return query