Re: dbih_get_attr_k: assertion failed

[email protected] (Tim Bunce)
Newsgroups perl.dbi.users
Message-ID <[email protected]>
On Tue, Sep 21, 2010 at 06:01:20AM -0700, Mara wrote:
> Hi,
> 
> I'm using DBI to connect to an Oracle 9i database.
> After connect, prepare and execute of an 'update' statement, the
> following
> 
> $sth->fetchrow_hashref("NAME_lc")
> 
> failes with
> 
> DBI.xs:2001: dbih_get_attr_k: assertion »i == (((((const SV *)
> (name_av))->sv_flags & 0x00800000)) ? Perl_mg_size(my_perl, ((SV *)
> ({ void *_p = (name_av); _p; }))) : ((XPVAV*) (name_av)->sv_any)-
> >xav_fill)+1« failed.
> 
> Despite it being pointless to call fetchrow after an update I feel
> this still should not happen.

I agree. It should be an error not an assertion.

The relevant code is:

    if (DBIc_TRACE_LEVEL(imp_sth) >= 10)
        PerlIO_printf(DBILOGFP,"       FETCH $h->{%s} from $h->{NAME} with $h->{NUM_OF_FIELDS} = %d"
                                " and %ld entries in $h->{NAME}\n",
                neatsvpv(keysv,0), i, AvFILL(name_av)+1);
    assert((i == -1 && 0 == AvFILL(name_av)+1) || (i == AvFILL(name_av)+1));

Please enable trace level 10 and reply with the output of that log
message just before the assertion failed.

Thanks.

Tim.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.