diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py
index 98233c7..87e7d2a 100644
a
|
b
|
class DatabaseOperations(BaseDatabaseOperations):
|
255 | 255 | def max_name_length(self): |
256 | 256 | return 64 |
257 | 257 | |
| 258 | def savepoint_create_sql(self, sid): |
| 259 | return "SAVEPOINT %s" % sid |
| 260 | |
| 261 | def savepoint_commit_sql(self, sid): |
| 262 | return "RELEASE SAVEPOINT %s" % sid |
| 263 | |
| 264 | def savepoint_rollback_sql(self, sid): |
| 265 | return "ROLLBACK TO SAVEPOINT %s" % sid |
| 266 | |
258 | 267 | class DatabaseWrapper(BaseDatabaseWrapper): |
259 | 268 | vendor = 'mysql' |
260 | 269 | operators = { |
… |
… |
class DatabaseWrapper(BaseDatabaseWrapper):
|
322 | 331 | self.connection = Database.connect(**kwargs) |
323 | 332 | self.connection.encoders[SafeUnicode] = self.connection.encoders[unicode] |
324 | 333 | self.connection.encoders[SafeString] = self.connection.encoders[str] |
| 334 | self.features.uses_savepoints = \ |
| 335 | self.get_server_version() >= (5, 0, 3) |
325 | 336 | connection_created.send(sender=self.__class__, connection=self) |
326 | 337 | cursor = CursorWrapper(self.connection.cursor()) |
327 | 338 | return cursor |