If you're working on a Django project along with other members of your team and you're using MariaDB (while the others are using MySQL) you're gonna have a bad time. Everytime you'll run migrations generated on a machine with other database than yours you'll get a strange exception and Google wouldn't give you too many hopes about solving it.
The exception, django.db.transaction.TransactionManagementError: Transaction managed block ended with pending COMMIT/ROLLBACK is caused by leave_transaction_management method in django/db/backends/__init__.py and its source seems to be an incompatibility between MariaDB and MySQL (even if the former is just a fork of the other one).
So you want a fix? I couldn't find any, but I fixed this by compiling MySQL from AUR (I'm using Manjaro, which is based on Arch Linux). Even if it's not really a solution maybe you're coming here from Google and maybe this will help you to solve your issue: Arch/Manjaro uses MariaDB and South seems to not like it very much.
Fresh install of manjaro (with maria db).
ReplyDeleteTried to migrate on an existing project, same issue.
So i guess they fucked something up in the latest version of MariaDB, because I used MariaDb with south, and worked fine.
Same solution worked for me too, compile mysql from aur.
yaourt -S mysql
I think this happens only when migrations were generated on a machine with MySQL, but I'm not entirely sure.
ReplyDelete