Ticket #10851: mysql_default_params_tuple.diff
File mysql_default_params_tuple.diff, 1.2 KB (added by , 16 years ago) |
---|
-
/usr/share/python-support/python-django/django/db/backends/mysql/base.py
old new 78 78 def __init__(self, cursor): 79 79 self.cursor = cursor 80 80 81 def execute(self, query, args=None):81 def execute(self, query, params=()): 82 82 try: 83 return self.cursor.execute(query, args)83 return self.cursor.execute(query, params) 84 84 except Database.OperationalError, e: 85 85 # Map some error codes to IntegrityError, since they seem to be 86 86 # misclassified and Django would prefer the more logical place. … … 88 88 raise Database.IntegrityError(tuple(e)) 89 89 raise 90 90 91 def executemany(self, query, args):91 def executemany(self, query, params): 92 92 try: 93 return self.cursor.executemany(query, args)93 return self.cursor.executemany(query, params) 94 94 except Database.OperationalError, e: 95 95 # Map some error codes to IntegrityError, since they seem to be 96 96 # misclassified and Django would prefer the more logical place.