Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #15119 -- Stopped pinging the MySQL server.

  • Loading branch information...
commit 282b2f40cd0aa09815001e178f60c9e71667d847 1 parent aea98e8
@aaugustin aaugustin authored
View
5 django/db/backends/__init__.py
@@ -53,11 +53,8 @@ def __ne__(self, other):
__hash__ = object.__hash__
- def _valid_connection(self):
- return self.connection is not None
-
def _cursor(self):
- if not self._valid_connection():
+ if self.connection is None:
conn_params = self.get_connection_params()
self.connection = self.get_new_connection(conn_params)
self.init_connection_state()
View
9 django/db/backends/mysql/base.py
@@ -402,15 +402,6 @@ def __init__(self, *args, **kwargs):
self.introspection = DatabaseIntrospection(self)
self.validation = DatabaseValidation(self)
- def _valid_connection(self):
- if self.connection is not None:
- try:
- self.connection.ping()
- return True
- except DatabaseError:
- self.close()
- return False
-
def get_connection_params(self):
kwargs = {
'conv': django_conversions,
Please sign in to comment.
Something went wrong with that request. Please try again.