1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #34761 -- Dropped support for MySQL < 8.0.11.

This commit is contained in:
Mariusz Felisiak
2023-08-03 18:54:29 +02:00
committed by GitHub
parent b3e0170ab5
commit b719688b21
10 changed files with 35 additions and 61 deletions

View File

@@ -23,20 +23,6 @@ class TestFeatures(TestCase):
self.assertFalse(connection.features.supports_transactions)
del connection.features.supports_transactions
def test_skip_locked_no_wait(self):
with mock.MagicMock() as _connection:
_connection.mysql_version = (8, 0, 1)
_connection.mysql_is_mariadb = False
database_features = DatabaseFeatures(_connection)
self.assertTrue(database_features.has_select_for_update_skip_locked)
self.assertTrue(database_features.has_select_for_update_nowait)
with mock.MagicMock() as _connection:
_connection.mysql_version = (8, 0, 0)
_connection.mysql_is_mariadb = False
database_features = DatabaseFeatures(_connection)
self.assertFalse(database_features.has_select_for_update_skip_locked)
self.assertFalse(database_features.has_select_for_update_nowait)
def test_allows_auto_pk_0(self):
with mock.MagicMock() as _connection:
_connection.sql_mode = {"NO_AUTO_VALUE_ON_ZERO"}