Skip to content

Commit 4f226d7

Browse files
committed
fixing compilation erros
1 parent a8540a7 commit 4f226d7

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
@@ -2389,10 +2389,10 @@ int OCCChild::execute_query(const std::string& query)
23892389
return -1;
23902390
}
23912391

2392-
rc = OCIStmtPrepare2(svchp,
2393-
stmthp, errhp, (text *)const_cast<char *>(query.c_str()),
2392+
rc = OCIStmtPrepare2(svchp, &stmthp, errhp, (text *)const_cast<char *>(query.c_str()),
23942393
(ub4)query.length(),
2395-
(ub4)OCI_NTV_SYNTAX, (ub4)OCI_DEFAULT);
2394+
NULL, 0,
2395+
(ub4)OCI_NTV_SYNTAX, OCI_DEFAULT);
23962396
if (rc != OCI_SUCCESS)
23972397
{
23982398
DO_OCI_HANDLE_FREE(stmthp, OCI_HTYPE_STMT, LOG_WARNING);
@@ -3143,11 +3143,12 @@ int OCCChild::prepare(const std::string& _statement, occ::ApiVersion _version)
31433143
cache_misses++;
31443144

31453145
// prepare the new statement
3146-
rc = OCIStmtPrepare2(svchp,
3147-
entry->stmthp,
3146+
rc = OCIStmtPrepare2(svchp, &entry->stmthp,
31483147
errhp,
31493148
(text *)const_cast<char *>(statement.c_str()),
31503149
(ub4)statement.length(),
3150+
NULL, //No Key
3151+
0, //Key Length
31513152
(ub4)OCI_NTV_SYNTAX,
31523153
OCI_DEFAULT | OCI_PREP2_GET_SQL_ID);
31533154
if (rc != OCI_SUCCESS)
@@ -5417,7 +5418,7 @@ int OCCChild::get_db_charset(std::string& _charset)
54175418
sys_context('USERENV', 'DB_UNIQUE_NAME') AS db_uname, \
54185419
sys_context('USERENV', 'SID') AS sid \
54195420
FROM nls_database_parameters WHERE parameter = 'NLS_CHARACTERSET'";
5420-
rc = OCIStmtPrepare2(svchp, stmthp, errhp, (text *)const_cast<char *>(sql), strlen(sql), OCI_NTV_SYNTAX, OCI_DEFAULT);
5421+
rc = OCIStmtPrepare2(svchp, &stmthp, errhp, (text *)const_cast<char *>(sql), strlen(sql), NULL, 0, OCI_NTV_SYNTAX, OCI_DEFAULT);
54215422
if (rc != OCI_SUCCESS)
54225423
{
54235424
DO_OCI_HANDLE_FREE(stmthp, OCI_HTYPE_STMT, LOG_WARNING);
@@ -5528,7 +5529,7 @@ int OCCChild::execute_query_with_n_binds( const std::string & _sql, const std::v
55285529
return -1;
55295530
}
55305531

5531-
rc = OCIStmtPrepare2(svchp, m_session_var_stmthp, errhp, (text *)const_cast<char *>(_sql.c_str()), (ub4)_sql.length(), OCI_NTV_SYNTAX, OCI_DEFAULT);
5532+
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);
55325533
if (rc != OCI_SUCCESS)
55335534
{
55345535
DO_OCI_HANDLE_FREE(m_session_var_stmthp, OCI_HTYPE_STMT, LOG_WARNING);

0 commit comments

Comments
 (0)