[svn:dbi] r14197 - dbi/trunk

[email protected]
Newsgroups perl.dbi.changes
Message-ID <[email protected]>
Author: REHSACK
Date: Tue Jun 29 06:04:30 2010
New Revision: 14197

Modified:
   dbi/trunk/DBI.xs

Log:
It would be reasonable for ->{NAME} => ->{NAME_[lu]c} mapping to handle
a -1 vs 0 mismatch gracefully in assert


Modified: dbi/trunk/DBI.xs
==============================================================================
--- dbi/trunk/DBI.xs	(original)
+++ dbi/trunk/DBI.xs	Tue Jun 29 06:04:30 2010
@@ -2130,7 +2130,11 @@
                         hv = newHV();
                     else av = newAV();
                     i = DBIc_NUM_FIELDS(imp_sth);
-                    assert(i == AvFILL(name_av)+1);
+		    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 $->{NAME}\n",
+				neatsvpv(keysv,0), i, AvFILL(name_av)+1);
+                    assert((i == -1 && 0 == AvFILL(name_av)+1) || (i == AvFILL(name_av)+1));
                     while (--i >= 0) {
                         sv = newSVsv(AvARRAY(name_av)[i]);
                         name = SvPV_nolen(sv);
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.