src/dbs/atrshmlogdb_oracle.c
int atrshmlog_free_prepared_db(atrshmlog_dbsession_t *i_db)
{
  if (i_db->stmthp[0])
    {
      ub4 typ = OCI_HTYPE_STMT;
      
      int retdb = OCIHandleFree(i_db->stmthp[0], typ);

      if (retdb != OCI_SUCCESS)
	{
	  printf("free prepared problem begin\n");  
	}
      i_db->stmthp[0] = 0;
    }
  
  if (i_db->stmthp[1])
    {
      ub4 typ = OCI_HTYPE_STMT;
      
      int retdb = OCIHandleFree(i_db->stmthp[1], typ);

      if (retdb != OCI_SUCCESS)
	{
	  printf("free prepared problem commit\n");  
	}
      i_db->stmthp[1] = 0;
    }
  
  if (i_db->stmthp[2])
    {
      ub4 typ = OCI_HTYPE_STMT;
      
      int retdb = OCIHandleFree(i_db->stmthp[2], typ);

      if (retdb != OCI_SUCCESS)
	{
	  printf("free prepared problem rollback\n");  
	}
      i_db->stmthp[2] = 0;
    }
  
  if (i_db->stmthp[3])
    {
      ub4 typ = OCI_HTYPE_STMT;
      
      int retdb = OCIHandleFree(i_db->stmthp[3], typ);

      if (retdb != OCI_SUCCESS)
	{
	  printf("free prepared problem get seq\n");  
	}
      i_db->stmthp[3] = 0;
    }
  
  if (i_db->stmthp[4])
    {
      ub4 typ = OCI_HTYPE_STMT;
      
      int retdb = OCIHandleFree(i_db->stmthp[4], typ);

      if (retdb != OCI_SUCCESS)
	{
	  printf("free prepared problem head\n");  
	}
      i_db->stmthp[4] = 0;
    }
  
  if (i_db->stmthp[5])
    {
      ub4 typ = OCI_HTYPE_STMT;
      
      int retdb = OCIHandleFree(i_db->stmthp[5], typ);

      if (retdb != OCI_SUCCESS)
	{
	  printf("free prepared problem cstring\n");  
	}
      i_db->stmthp[5] = 0;
    }
  
  if (i_db->stmthp[6])
    {
      ub4 typ = OCI_HTYPE_STMT;
      
      int retdb = OCIHandleFree(i_db->stmthp[6], typ);

      if (retdb != OCI_SUCCESS)
	{
	  printf("free prepared problem ucs\n");  
	}
      i_db->stmthp[6] = 0;
    }
  
  if (i_db->stmthp[7])
    {
      ub4 typ = OCI_HTYPE_STMT;
      
      int retdb = OCIHandleFree(i_db->stmthp[7], typ);

      if (retdb != OCI_SUCCESS)
	{
	  printf("free prepared problem last\n");  
	}
      i_db->stmthp[7] = 0;
    }
  

  return 0;
}
/**
 * helper: free our session cached prepared statements
 */
free our session cached prepared statements
free our session cached prepared statements
int atrshmlog_free_prepared_db(atrshmlog_dbsession_t *i_db)
{
  if (i_db->stmthp[0])
    {
      ub4 typ = OCI_HTYPE_STMT;
      int retdb = OCIHandleFree(i_db->stmthp[0], typ);
      if (retdb != OCI_SUCCESS)
	{
	  printf("free prepared problem begin\n");  
	}
      i_db->stmthp[0] = 0;
    }
  if (i_db->stmthp[1])
    {
      ub4 typ = OCI_HTYPE_STMT;
      int retdb = OCIHandleFree(i_db->stmthp[1], typ);
      if (retdb != OCI_SUCCESS)
	{
	  printf("free prepared problem commit\n");  
	}
      i_db->stmthp[1] = 0;
    }
  if (i_db->stmthp[2])
    {
      ub4 typ = OCI_HTYPE_STMT;
      int retdb = OCIHandleFree(i_db->stmthp[2], typ);
      if (retdb != OCI_SUCCESS)
	{
	  printf("free prepared problem rollback\n");  
	}
      i_db->stmthp[2] = 0;
    }
  if (i_db->stmthp[3])
    {
      ub4 typ = OCI_HTYPE_STMT;
      int retdb = OCIHandleFree(i_db->stmthp[3], typ);
      if (retdb != OCI_SUCCESS)
	{
	  printf("free prepared problem get seq\n");  
	}
      i_db->stmthp[3] = 0;
    }
  if (i_db->stmthp[4])
    {
      ub4 typ = OCI_HTYPE_STMT;
      int retdb = OCIHandleFree(i_db->stmthp[4], typ);
      if (retdb != OCI_SUCCESS)
	{
	  printf("free prepared problem head\n");  
	}
      i_db->stmthp[4] = 0;
    }
  if (i_db->stmthp[5])
    {
      ub4 typ = OCI_HTYPE_STMT;
      int retdb = OCIHandleFree(i_db->stmthp[5], typ);
      if (retdb != OCI_SUCCESS)
	{
	  printf("free prepared problem cstring\n");  
	}
      i_db->stmthp[5] = 0;
    }
  if (i_db->stmthp[6])
    {
      ub4 typ = OCI_HTYPE_STMT;
      int retdb = OCIHandleFree(i_db->stmthp[6], typ);
      if (retdb != OCI_SUCCESS)
	{
	  printf("free prepared problem ucs\n");  
	}
      i_db->stmthp[6] = 0;
    }
  if (i_db->stmthp[7])
    {
      ub4 typ = OCI_HTYPE_STMT;
      int retdb = OCIHandleFree(i_db->stmthp[7], typ);
      if (retdb != OCI_SUCCESS)
	{
	  printf("free prepared problem last\n");  
	}
      i_db->stmthp[7] = 0;
    }
  return 0;
}
int atrshmlog_free_prepared_db ( atrshmlog_dbsession_t * i_db ) { if ( i_db -> stmthp [ 0 ] ) { ub4 typ = OCI_HTYPE_STMT ; int retdb = OCIHandleFree ( i_db -> stmthp [ 0 ] , typ ) ; if ( retdb != OCI_SUCCESS ) { printf ( " \n " ) ; } i_db -> stmthp [ 0 ] = 0 ; } if ( i_db -> stmthp [ 1 ] ) { ub4 typ = OCI_HTYPE_STMT ; int retdb = OCIHandleFree ( i_db -> stmthp [ 1 ] , typ ) ; if ( retdb != OCI_SUCCESS ) { printf ( " \n " ) ; } i_db -> stmthp [ 1 ] = 0 ; } if ( i_db -> stmthp [ 2 ] ) { ub4 typ = OCI_HTYPE_STMT ; int retdb = OCIHandleFree ( i_db -> stmthp [ 2 ] , typ ) ; if ( retdb != OCI_SUCCESS ) { printf ( " \n " ) ; } i_db -> stmthp [ 2 ] = 0 ; } if ( i_db -> stmthp [ 3 ] ) { ub4 typ = OCI_HTYPE_STMT ; int retdb = OCIHandleFree ( i_db -> stmthp [ 3 ] , typ ) ; if ( retdb != OCI_SUCCESS ) { printf ( " \n " ) ; } i_db -> stmthp [ 3 ] = 0 ; } if ( i_db -> stmthp [ 4 ] ) { ub4 typ = OCI_HTYPE_STMT ; int retdb = OCIHandleFree ( i_db -> stmthp [ 4 ] , typ ) ; if ( retdb != OCI_SUCCESS ) { printf ( " \n " ) ; } i_db -> stmthp [ 4 ] = 0 ; } if ( i_db -> stmthp [ 5 ] ) { ub4 typ = OCI_HTYPE_STMT ; int retdb = OCIHandleFree ( i_db -> stmthp [ 5 ] , typ ) ; if ( retdb != OCI_SUCCESS ) { printf ( " \n " ) ; } i_db -> stmthp [ 5 ] = 0 ; } if ( i_db -> stmthp [ 6 ] ) { ub4 typ = OCI_HTYPE_STMT ; int retdb = OCIHandleFree ( i_db -> stmthp [ 6 ] , typ ) ; if ( retdb != OCI_SUCCESS ) { printf ( " \n " ) ; } i_db -> stmthp [ 6 ] = 0 ; } if ( i_db -> stmthp [ 7 ] ) { ub4 typ = OCI_HTYPE_STMT ; int retdb = OCIHandleFree ( i_db -> stmthp [ 7 ] , typ ) ; if ( retdb != OCI_SUCCESS ) { printf ( " \n " ) ; } i_db -> stmthp [ 7 ] = 0 ; } return 0 ; }
helper: free our session cached prepared statements
helper : free our session cached prepared statements