Skip to content

Commit 108fc9a

Browse files
committed
Merge remote-tracking branch 'origin/oci_prepare2_upgrade_changes' into oci_prepare2_upgrade_changes
2 parents 6f48ca6 + 4f226d7 commit 108fc9a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

worker/cppworker/worker/OCCChild.cpp

+8-7
Original file line numberDiff line numberDiff line change
@@ -2404,10 +2404,10 @@ int OCCChild::execute_query(const std::string& query)
24042404
return -1;
24052405
}
24062406

2407-
rc = OCIStmtPrepare2(svchp,
2408-
stmthp, errhp, (text *)const_cast<char *>(query.c_str()),
2407+
rc = OCIStmtPrepare2(svchp, &stmthp, errhp, (text *)const_cast<char *>(query.c_str()),
24092408
(ub4)query.length(),
2410-
(ub4)OCI_NTV_SYNTAX, (ub4)OCI_DEFAULT);
2409+
NULL, 0,
2410+
(ub4)OCI_NTV_SYNTAX, OCI_DEFAULT);
24112411
if (rc != OCI_SUCCESS)
24122412
{
24132413
DO_OCI_HANDLE_FREE(stmthp, OCI_HTYPE_STMT, LOG_WARNING);
@@ -3158,11 +3158,12 @@ int OCCChild::prepare(const std::string& _statement, occ::ApiVersion _version)
31583158
cache_misses++;
31593159

31603160
// prepare the new statement
3161-
rc = OCIStmtPrepare2(svchp,
3162-
entry->stmthp,
3161+
rc = OCIStmtPrepare2(svchp, &entry->stmthp,
31633162
errhp,
31643163
(text *)const_cast<char *>(statement.c_str()),
31653164
(ub4)statement.length(),
3165+
NULL, //No Key
3166+
0, //Key Length
31663167
(ub4)OCI_NTV_SYNTAX,
31673168
OCI_DEFAULT | OCI_PREP2_GET_SQL_ID);
31683169
if (rc != OCI_SUCCESS)
@@ -5432,7 +5433,7 @@ int OCCChild::get_db_charset(std::string& _charset)
54325433
sys_context('USERENV', 'DB_UNIQUE_NAME') AS db_uname, \
54335434
sys_context('USERENV', 'SID') AS sid \
54345435
FROM nls_database_parameters WHERE parameter = 'NLS_CHARACTERSET'";
5435-
rc = OCIStmtPrepare2(svchp, stmthp, errhp, (text *)const_cast<char *>(sql), strlen(sql), OCI_NTV_SYNTAX, OCI_DEFAULT);
5436+
rc = OCIStmtPrepare2(svchp, &stmthp, errhp, (text *)const_cast<char *>(sql), strlen(sql), NULL, 0, OCI_NTV_SYNTAX, OCI_DEFAULT);
54365437
if (rc != OCI_SUCCESS)
54375438
{
54385439
DO_OCI_HANDLE_FREE(stmthp, OCI_HTYPE_STMT, LOG_WARNING);
@@ -5543,7 +5544,7 @@ int OCCChild::execute_query_with_n_binds( const std::string & _sql, const std::v
55435544
return -1;
55445545
}
55455546

5546-
rc = OCIStmtPrepare2(svchp, m_session_var_stmthp, errhp, (text *)const_cast<char *>(_sql.c_str()), (ub4)_sql.length(), OCI_NTV_SYNTAX, OCI_DEFAULT);
5547+
rc = OCIStmtPrepare2(svchp, &m_session_var_stmthp, errhp, (text *)const_cast<char *>(_sql.c_str()), (ub4)_sql.length(), NULL, 0, OCI_NTV_SYNTAX, OCI_DEFAULT);
55475548
if (rc != OCI_SUCCESS)
55485549
{
55495550
DO_OCI_HANDLE_FREE(m_session_var_stmthp, OCI_HTYPE_STMT, LOG_WARNING);

0 commit comments

Comments
 (0)