Commit e632443f authored by Sebastien Robin's avatar Sebastien Robin

Revert "Add counter to manage_debug_thread SQL queries"

This reverts commit c00318de.
parent c00318de
......@@ -69,8 +69,7 @@ def dump_threads():
while f is not None:
code = f.f_code
if code is DB._query.func_code:
mysql_info = "\nMySQL query #%s:\n%s\n" % (f.f_locals['self']._count,
f.f_locals['query'])
mysql_info = "\nMySQL query:\n%s\n" % f.f_locals['query']
break
f = f.f_back
except ImportError:
......
......@@ -319,7 +319,6 @@ class DB(TM):
because they are bound to the connection. This check can be
overridden by passing force_reconnect with True value.
"""
self._count += 1
try:
self.db.query(query)
except OperationalError, m:
......@@ -333,7 +332,6 @@ class DB(TM):
raise
# Hm. maybe the db is hosed. Let's restart it.
self._forceReconnection()
self._count += 1
self.db.query(query)
except ProgrammingError, exception:
LOG('ZMySQLDA', ERROR, 'query failed: %s' % (query,))
......@@ -401,7 +399,6 @@ class DB(TM):
def _begin(self, *ignored):
"""Begin a transaction (when TM is enabled)."""
self._count = 0
try:
self._transaction_begun = True
# Ping the database to reconnect if connection was closed.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment