Subject: | OCI_FETCH_RELATIVE is "sticky" (affects the following fetches) |
Something related to ticket 76410, but nevertheless a bit different :
the relative step specified by OCI_FETCH_RELATIVE seems to be "sticky";
it affects the following cals to ->fetch().
my $sth = $dbh->prepare($sql, {ora_exe_mode =>
OCI_STMT_SCROLLABLE_READONLY});
$sth->execute;
my @r1 = @{$sth->ora_fetch_scroll(OCI_FETCH_RELATIVE, 4)};
my @r2 = @{$sth->fetch}; # this is record 8, not record 5 !!
my @r3 = @{$sth->fetch}; # this is record 12, not record 6 !!
Together with ticket 76410, this seems to indicate that scrollable
cursors are incompatible with regular methods of the fetch_* family;
the only way to get correct data is to use various calls to
ora_fetch_scroll().
This is quite unfortunate because we have to recreate by hand all the
variants for fetching arrayrefs, hashrefs, slices, etc.