문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top