I have a perl script that is doing a CTAS. The table creates successfully (I can query the table after program exits with error). The reason it is exiting with an error is because the return code from the execute is undef. On smaller create tables this same code works fine. On larger longer running queries (about 40 min) is when it gets the return value of undf On the connect RaiseError is turned off. Below is the execute statement.
$sth->execute() or do {
$msg = "ERROR:$0: Error in SQL execute:\n$DBI::errstr";
$dbh->rollback();
confess "$msg";
};
Has anyone come across this before or how can one not trip the error in this case?
Below is trace from a run:
DBI::st=HASH(0x15783d0) trace level set to 0x0/14 (DBI @ 0x0/0) in
+ DBI 1.609-ithread (pid 26383)
-> execute for DBD::Oracle::st (DBI::st=HASH(0x16e9b28)~0x15783d0)
+ thr#154e010
dbd_st_execute CREATE (out0, lob0)...
Statement Execute Mode is 0 (DEFAULT)
OCIStmtExecute(19c18d8,19cd328,19b9f68,1,0,0,0,mode=DEFAULT,0)
+=SUCCESS
OCIAttrGet(19cd328,OCI_HTYPE_STMT,7fffb492eec8,0,OCI_ATTR_ROW_
+COUNT,19b9f68)=SUCCESS
OCIAttrGet(19cd328,OCI_HTYPE_STMT,7fffb492eece,0,OCI_ATTR_SQLF
+NCODE,19b9f68)=SUCCESS
dbd_st_execute CREATE returned (SUCCESS, rpc2211750915, fn1, o
+ut0)
<- execute= undef at ./test_query.pl line 80
-> finish for DBD::Oracle::st (DBI::st=HASH(0x16e9b28)~0x15783d0)
+thr#154e010
<- finish= 1 at ./test_query.pl line 98
-> DESTROY for DBD::Oracle::st (DBI::st=HASH(0x15783d0)~INNER) thr
+#154e010
dbd_st_destroy
OCIHandleFree(19cd328,OCI_HTYPE_STMT)=SUCCESS
<- DESTROY= undef
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.