Question

According to Xeround's Release Notes they don't support save points and I can't figure out how to turn off support for this in Django 1.4. Does anyone know how to accomplish this?

Was it helpful?

Solution

I had the same problem. Django seems to only check the version of the MySql when it decides whether to use savepoints or not. Xeround probably uses some non-standard database-engine that doesn't support savepoints even if the MySql version is high enough.

Quick fix (just for testing) is to just edit the django/db/backends/mysql/base.py to override the logic:

Before:

self.features.uses_savepoints = self.get_server_version() >= (5, 0, 3)

After:

self.features.uses_savepoints = False

I tested this and it didn't seem to cause problems.

Note: Editing django sources directly like this is not recommended, you probably should just create your own db backend module by subclassing or copying the mysql module and placing it inside your project. Remember to update settings.py database configuration to point to your module.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top