-
Notifications
You must be signed in to change notification settings - Fork 84
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
Sql id changes #363
Sql id changes #363
Conversation
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.
Do we need to remove DO_OCI_HANDLE_FREE macro and real_oci_handle_free() given that OCIHandleFree() is avoided when using OCIStmtPrepare2() per oracle doc, it looks dead code here.
We need real_oci_handle_free() for other handles (service context handle, error handle, and a few others). Stmt handle alone will use OCIStmtRelease() |
Got it, thanks. Perhaps add a comment around the macro not to use for statement handle. |
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.
Change looks good.
Pls do not merge. I'll move the existing main to the internal mirror before merging this PR. |
errhp); | ||
if (rc2 != OCI_SUCCESS) { | ||
WRITE_LOG_ENTRY(logfile, LOG_DEBUG, "error getting sql_id"); | ||
sql_error(rc2, stmt); |
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 checked and believe we are logging and continuing
@@ -1042,7 +1043,7 @@ int OCCChild::handle_command(const int _cmd, std::string &_line) | |||
|
|||
OCIAttrSet((dvoid *)authp, OCI_HTYPE_SESSION, (dvoid *) const_cast<char*>(m_scuttle_id.c_str()), | |||
m_scuttle_id.length(), OCI_ATTR_CLIENT_INFO, errhp); | |||
|
|||
sql_id_str = ""; // Reset sql_id_str before execute |
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.
Perhaps do in PREPARE with m_bind_data.clear()
Changes to retrieve sql_id from Oracle. This will be added as part of the EXEC CAL message. It would be easier to map SQLHash -> Oracle sql_id
Note: The flag (OCI_PREP2_GET_SQL_ID) used is newly introduced and is not backward compatible with the 11g client.