2

I'm using Compose for MySQL which uses MySQL 5.7 Group Replication

When trying doing DB tests with Django 1.11.4 i get errors regarding the rollback_test (because it doesn't hold the requirement of Primary Key)

and transaction-write-set-extraction!=OFF requirement for creating SAVEPOINTS.

django.db.utils.OperationalError: (1290, 'The MySQL server is running with the --transaction-write-set-extraction!=OFF option so it cannot execute this statement')

Everything works well besides the tests.

Is there any way to tell Django that it's a Group-Replication MySQL DB and avoid these specific tests?

Yarh
  • 895
  • 7
  • 15

1 Answers1

0

The transaction-write-set-extraction is required for using Group Replication on InnoDB

Versions prior to MySQL 5.7.19 does not support save points on Group Replication.

Upgrade your local and production MySQL to 5.7.19 or later.

Replication: Group Replication now supports SQL transaction SAVEPOINT.

As for Django it creates saves points when nesting atomic code, so you may encounter this issue in the future outside of your tests.

When the atomic() decorator is nested, it creates a savepoint to allow partial commit or rollback.

Also you may need to check if your production server is properly configured for InnoDB cluster.

Yasser A
  • 86
  • 5
  • Yes it's a problem with Compose for MySQL. I just switched to another provider since Django doesn't support it – Yarh Aug 27 '17 at 16:18
  • Might want to check out Compose now. MySQL 5.7.20 is now available – Dr G. Nov 29 '17 at 18:24