#34852: Django Unit Tests break when using replicated MySQL Cluster v8.0.28
------------------------------------+--------------------------------------
     Reporter:  Aaron Blair         |                    Owner:  nobody
         Type:  Bug                 |                   Status:  new
    Component:  Testing framework   |                  Version:  4.1
     Severity:  Normal              |               Resolution:
     Keywords:  Test MySQL Cluster  |             Triage Stage:  Unreviewed
    Has patch:  0                   |      Needs documentation:  0
  Needs tests:  0                   |  Patch needs improvement:  0
Easy pickings:  1                   |                    UI/UX:  0
------------------------------------+--------------------------------------
Description changed by Aaron Blair:

Old description:

> 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)")

New description:

 When running unit tests, the internal testing of a db for using
 transactions breaks when using MySQL Cluster server v8.0.28 because that
 db version 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#comment:1>
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/0107018aae044cb2-7e9c9858-6bad-4717-80f7-c578483fe225-000000%40eu-central-1.amazonses.com.

Reply via email to