Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
preetwinder
erp5
Commits
18c96931
Commit
18c96931
authored
Sep 05, 2013
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DeadlockDebugger: don't print "MySQL query: no query" when there is no query
parent
a3cd5781
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
product/DeadlockDebugger/dumper.py
product/DeadlockDebugger/dumper.py
+3
-3
No files found.
product/DeadlockDebugger/dumper.py
View file @
18c96931
...
@@ -62,14 +62,14 @@ def dump_threads():
...
@@ -62,14 +62,14 @@ def dump_threads():
if
reqinfo
:
if
reqinfo
:
reqinfo
=
" (%s)"
%
reqinfo
reqinfo
=
" (%s)"
%
reqinfo
mysql_info
=
'
no query
'
mysql_info
=
''
f
=
frame
f
=
frame
try
:
try
:
from
Products.ZMySQLDA.db
import
DB
from
Products.ZMySQLDA.db
import
DB
while
f
is
not
None
:
while
f
is
not
None
:
code
=
f
.
f_code
code
=
f
.
f_code
if
code
is
DB
.
_query
.
func_code
:
if
code
is
DB
.
_query
.
func_code
:
mysql_info
=
str
(
f
.
f_locals
[
'query'
])
mysql_info
=
"MySQL query:
\
n
%s
\
n
"
%
f
.
f_locals
[
'query'
]
break
break
f
=
f
.
f_back
f
=
f
.
f_back
except
ImportError
:
except
ImportError
:
...
@@ -77,7 +77,7 @@ def dump_threads():
...
@@ -77,7 +77,7 @@ def dump_threads():
output
=
StringIO
()
output
=
StringIO
()
traceback
.
print_stack
(
frame
,
file
=
output
)
traceback
.
print_stack
(
frame
,
file
=
output
)
res
.
append
(
"Thread %s%s:
\
n
%s
\
n
MySQL query:
\
n
%s
\
n
"
%
res
.
append
(
"Thread %s%s:
\
n
%s
\
n
%s
"
%
(
thread_id
,
reqinfo
,
output
.
getvalue
(),
mysql_info
))
(
thread_id
,
reqinfo
,
output
.
getvalue
(),
mysql_info
))
res
.
append
(
"End of dump
\
n
"
)
res
.
append
(
"End of dump
\
n
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment