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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
1c2ab1ec
Commit
1c2ab1ec
authored
May 13, 2022
by
Xiaowu Zhang
10
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZMySQLDA/db.py: show error sql in log
parent
588617cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
product/ZMySQLDA/db.py
product/ZMySQLDA/db.py
+4
-2
No files found.
product/ZMySQLDA/db.py
View file @
1c2ab1ec
...
...
@@ -395,10 +395,10 @@ class DB(TM):
self
.
_forceReconnection
()
self
.
db
.
query
(
query
)
else
:
LOG
(
'ZMySQLDA'
,
ERROR
,
'query failed: %s'
%
(
query
,))
LOG
(
'
Operation
ZMySQLDA'
,
ERROR
,
'query failed: %s'
%
(
query
,))
raise
except
ProgrammingError
:
LOG
(
'ZMySQLDA'
,
ERROR
,
'query failed: %s'
%
(
query
,))
LOG
(
'
Programming
ZMySQLDA'
,
ERROR
,
'query failed: %s'
%
(
query
,))
raise
try
:
return
self
.
db
.
store_result
()
...
...
@@ -432,6 +432,8 @@ class DB(TM):
qs
=
"SET STATEMENT %s FOR SELECT %s"
%
(
statement
,
select
)
if
max_rows
:
qs
=
"%s LIMIT %d"
%
(
qs
,
max_rows
)
if
';'
in
qs
:
LOG
(
'query with ;'
,
ERROR
,
query_string
)
c
=
self
.
_query
(
qs
)
if
c
:
if
desc
is
not
None
is
not
c
.
describe
():
...
...
Xiaowu Zhang
@xiaowu.zhang
mentioned in commit
6586619e
·
Feb 21, 2023
mentioned in commit
6586619e
mentioned in commit 6586619e4500f81173fad52e222a0d3797927b5f
Toggle commit list
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