Code

Ticket #12923: mysql-last_executed_query.patch

File mysql-last_executed_query.patch, 507 bytes (added by pablobm, 4 years ago)

Patch for DatabaseOperations on the MySQL backend

  • django/db/backends/mysql/base.py

     
    224224        second = '%s-12-31 23:59:59.99' 
    225225        return [first % value, second % value] 
    226226 
     227    def last_executed_query(self, cursor, sql, params): 
     228        return sql % cursor.connection.literal(params) 
     229 
    227230class DatabaseWrapper(BaseDatabaseWrapper): 
    228231 
    229232    operators = {