-
Notifications
You must be signed in to change notification settings - Fork 562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add more TRACE calls for easier debugging #1317
base: master
Are you sure you want to change the base?
Conversation
@@ -154,6 +154,8 @@ static bool ApplyPreconnAttrs(HDBC hdbc, SQLINTEGER ikey, PyObject *value, char | |||
return false; | |||
} | |||
|
|||
TRACE("ApplyPreconnAttrs.SQLSetConnectAttrW key=%d value=%p vallen=%d\n", ikey, ivalue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested this locally, but it appears there are 3 placeholders and 2 values.
@@ -1310,6 +1310,8 @@ void FreeParameterData(Cursor* cur) | |||
{ | |||
// Unbinds the parameters and frees the parameter buffer. | |||
|
|||
TRACE("FreeParameterData"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs newline?
@@ -750,12 +758,16 @@ static PyObject* execute(Cursor* cur, PyObject* pSql, PyObject* params, bool ski | |||
const char* pch = PyBytes_AS_STRING(query.Get()); | |||
SQLINTEGER cch = (SQLINTEGER)(PyBytes_GET_SIZE(query.Get()) / (isWide ? sizeof(uint16_t) : 1)); | |||
|
|||
TRACE("cursor.execute: isWide=%d query_len=%d\n", isWide, cch); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we build on so many platforms with different pointer & integer widths, I think we should cast anything that is not a plain integer when using %d. Most likely everything is 64 bits nowdays, but it would't hurt.
Looks good, but I added 3 comments in the Files changed tab using the web UI. Can you take a look at those? Thanks. |
Found this useful when debugging a handling
SQLFreeStmt
command on my driver (netsuite).