#include "ocilib.h"
#if defined(_WINDOWS)
#define sleep(x) Sleep(x*1000)
#else
#include <unistd.h>
#endif
void long_oracle_call(
OCI_Thread *thread,
void *data)
{
clock_t t_start = clock();
int err_code = 0;
{
if (err)
{
}
}
printf("call duration %d, expected oracle error is 1013, got %d", clock() - t_start, err_code);
}
int main(void)
{
{
return EXIT_FAILURE;
}
sleep(1);
return EXIT_SUCCESS;
}
OCI_SYM_PUBLIC boolean OCI_API OCI_Break(OCI_Connection *con)
Perform an immediate abort of any currently Oracle OCI call.
OCI_SYM_PUBLIC boolean OCI_API OCI_ConnectionFree(OCI_Connection *con)
Close a physical connection to an Oracle database server.
OCI_SYM_PUBLIC OCI_Connection *OCI_API OCI_ConnectionCreate(const otext *db, const otext *user, const otext *pwd, unsigned int mode)
Create a physical connection to an Oracle database server.
struct OCI_Thread OCI_Thread
OCILIB encapsulation of OCI Threads.
struct OCI_Connection OCI_Connection
Oracle physical connection.
struct OCI_Statement OCI_Statement
Oracle SQL or PL/SQL statement.
struct OCI_Error OCI_Error
Encapsulates an Oracle or OCILIB exception.
OCI_SYM_PUBLIC OCI_Error *OCI_API OCI_GetLastError(void)
Retrieve the last error or warning occurred within the last OCILIB call.
OCI_SYM_PUBLIC int OCI_API OCI_ErrorGetOCICode(OCI_Error *err)
Retrieve Oracle Error code from error handle.
OCI_SYM_PUBLIC boolean OCI_API OCI_Cleanup(void)
Clean up all resources allocated by the library.
OCI_SYM_PUBLIC boolean OCI_API OCI_Initialize(POCI_ERROR err_handler, const otext *lib_path, unsigned int mode)
Initialize the library.
OCI_SYM_PUBLIC OCI_Statement *OCI_API OCI_StatementCreate(OCI_Connection *con)
Create a statement object and return its handle.
OCI_SYM_PUBLIC boolean OCI_API OCI_ExecuteStmt(OCI_Statement *stmt, const otext *sql)
Prepare and Execute a SQL statement or PL/SQL block.
OCI_SYM_PUBLIC boolean OCI_API OCI_StatementFree(OCI_Statement *stmt)
Free a statement and all resources associated to it (resultsets ...)
OCI_SYM_PUBLIC boolean OCI_API OCI_ThreadRun(OCI_Thread *thread, POCI_THREAD proc, void *arg)
Execute the given routine within the given thread object.
OCI_SYM_PUBLIC boolean OCI_API OCI_ThreadJoin(OCI_Thread *thread)
Join the given thread.
OCI_SYM_PUBLIC boolean OCI_API OCI_ThreadFree(OCI_Thread *thread)
Destroy a thread object.
OCI_SYM_PUBLIC OCI_Thread *OCI_API OCI_ThreadCreate(void)
Create a Thread object.