mirror of
https://github.com/django/django.git
synced 2025-10-25 14:46:09 +00:00
Simplified MySQL version checking.
Django used to check the version of MySQL before handling the first
request, which required:
- opening a connection
- closing it, to avoid holding it idle until the first request.
This code isn't necessary any longer since Django dropped support for
some versions of MySQL, and other database backends don't implement a
similar dance. For consistency and maintenability, remove it.
Reverts 4423757c0c.
Closes #18135.
This commit is contained in:
@@ -123,12 +123,6 @@ class MySQLTests(TestCase):
|
||||
else:
|
||||
self.assertFalse(found_reset)
|
||||
|
||||
@unittest.skipUnless(connection.vendor == 'mysql',
|
||||
"Test valid only for MySQL")
|
||||
def test_server_version_connections(self):
|
||||
connection.close()
|
||||
connection.mysql_version
|
||||
self.assertTrue(connection.connection is None)
|
||||
|
||||
class DateQuotingTest(TestCase):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user