Subject: | execute_array: no exception w/o ArrayTupleStatus |
use DBI();
my $dbh = DBI->connect or die $DBI::errstr;
$dbh->{RaiseError} = 1;
$dbh->{PrintError} = 0;
$dbh->{AutoCommit} = 0;
# $dbh->do('create table mytest( a int )');
$dbh->prepare('insert into mytest values (?)')->execute_array( {},
['_1'] );
If ArrayTupleStatus is omitted, err_count is not set and thence
no exception is raised.
Patch attached.
Subject: | dbdimp.c.diff |
--- dbdimp.152 Fri Oct 19 16:41:17 2012
+++ dbdimp.c Wed Oct 24 10:57:12 2012
@@ -3883,13 +3883,15 @@
" ora_st_execute_array %d errors in batch.\n",
num_errs);
+ if(num_errs) {
+ sv_setiv(err_count,num_errs);
+ }
if(num_errs && tuples_status_av) {
OCIError *row_errhp, *tmp_errhp;
ub4 row_off;
SV *err_svs[3];
/*AV *err_av;*/
sb4 err_code;
- sv_setiv(err_count,num_errs);
err_svs[0] = newSViv((IV)0);
err_svs[1] = newSVpvn("", 0);
err_svs[2] = newSVpvn("S1000",5);