#34852: Django Unit Tests break when using replicated MySQL Cluster v8.0.28
-------------------------------------+-------------------------------------
               Reporter:  Aaron      |          Owner:  nobody
  Blair                              |
                   Type:  Bug        |         Status:  new
              Component:  Testing    |        Version:  4.1
  framework                          |
               Severity:  Normal     |       Keywords:  Test MySQL Cluster
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  1
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 When running unit tests, the internal testing of a db for using
 transactions breaks when using MySQL Cluster server v8.0.28 because it
 requires a primary key for tables, and this line in
 https://github.com/django/django/blob/main/django/db/backends/base/features.py
 breaks it :


 {{{
     @cached_property
     def supports_transactions(self):
         """Confirm support for transactions."""
         with self.connection.cursor() as cursor:
             cursor.execute("CREATE TABLE ROLLBACK_TEST (X INT)")
 }}}


 We have been patch-fixing that file as follows:

 <-             cursor.execute("CREATE TABLE ROLLBACK_TEST (X INT PRIMARY
 KEY)")
 ---
 ->             cursor.execute("CREATE TABLE ROLLBACK_TEST (X INT)")

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34852>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018aae0344aa-38d009a9-0320-44a3-ae54-41a6a93cd6a8-000000%40eu-central-1.amazonses.com.

Reply via email to