Menu

update+reteurning cause 'Segmentation fault'

Anonymous
2014-01-18
2014-03-19
  • Anonymous

    Anonymous - 2014-01-18

    My enviroment is
    OCILIB: version 3.12.1, two charset are ANSI;
    LINUX+ORACLE 10g(32bits) for server and client.

    I use OCILIB from a year ago, it gave me great help, thanks vince.rogier very much.
    Today, when I use SQL='update ... returning into rowid, tx_date into :c0, :c10',
    I found two problems if this SQL is executed two or more consecutive times on a SAME connection, and
    both problems are exist in $OCILIB/src/demo/ocilib_demo.c( test_returning() ).

    Problem A:‘segmentation fault'.
    BUT, if I remove tx_date from returning subclause, all is OK.

    Problem B: In ocilib_demo.c::test_returning(), if using SQL
    OCI_Prepare(st, MT("update test_lob set code = code + 1 returning code, rowid into :i, :l")), and
    OCI_RegisterString(st, MT(":l"), OCI_SIZE_ROWID);
    In executing test_returning(), 'OCI-22062: invalid input string [XX]' is issued, where 'XX' is 'AA' .
    AND, in call cleanup(), a string 'VT102' is printed on screen.

    Thanks.
    X.Q.Wan

     
  • Vincent Rogier

    Vincent Rogier - 2014-03-18

    Hi,

    I'll check that point asap.

    Regards,

    Vincent

     
  • Anonymous

    Anonymous - 2014-03-19

    Hi,

    Issue resolved and an fixed in OCI SVN trunk (v4.0.0) at revision 210

    Details:

    C API : Fixed segfault if a statement was executing more than once SQL statement with a "returning clause" (since statement cache support). It was due to an nice bug in the OCI client !

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.