Menu

#31 Typo and bug in collection elements handling

v1.0_(example)
closed
nobody
None
9
2014-08-05
2014-07-22
No

Hi Vincent,

I found few bugs in collection elements handling introduced since last few updates.

  1. Typo in macro OCI_ELEM_SET_VALUE
    file: element.c, line: 54

Now:
if (!elem->obj)
{
func_init;
}

if (!elem->obj)
{
....

Should be:
if (!elem->obj)
{
func_init;
}

if (elem->obj)
{
....

  1. OCI_ElemSetObject is broken since change in function OCI_ElemSetNullIndicator.
    Symptoms: use OCI_ElemSetObject to set object to element, then use OCI_ElemGetObject to retrieve object on same element, in result second object differs from original.
    I reverted changes in OCI_ElemSetNullIndicator to previous version and it fixed the problem.

if (elem->typinf->cols[0].datatype == OCI_CDT_OBJECT)
{
OCI_Object obj = (OCI_Object ) elem->obj;

if (obj != NULL)
{
    elem->pind = obj->tab_ind;
}

}
else
{
if (elem->pind != NULL)
{
*elem->pind = value;
}
}

Thanks.

Discussion

  • Victor Mischenko

    Also try to comment all legacy macro at the and of ocilib.h and eliminate few compilation errors in library.

    Thanks.

     
  • Vincent Rogier

    Vincent Rogier - 2014-07-27

    Hi,

    Can you be more precise with the issues related with legacy macros and compilation errors ?

    Regards,

    Vincent

     
  • Vincent Rogier

    Vincent Rogier - 2014-07-27

    I've fixed issues related to element indicators and compilation issues (don_t have a clue how I could have committed a ocilib.h file in that state....)

    But i don't get your statement related to legacy macros...

     
  • Vincent Rogier

    Vincent Rogier - 2014-08-05
    • status: open --> closed
     
Auth0 Logo