[interchange-cvs] interchange - jon modified lib/Vend/Table/DBI.pm

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Mon Mar 4 19:46:01 2002


User:      jon
Date:      2002-03-05 00:45:00 GMT
Modified:  lib/Vend/Table DBI.pm
Log:
Always set mv_search_match_count, and force it to be numeric to
work around DBI's funky "0E0" result row counts.

Revision  Changes    Path
2.15      +4 -3      interchange/lib/Vend/Table/DBI.pm


rev 2.15, prev_rev 2.14
Index: DBI.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/DBI.pm,v
retrieving revision 2.14
retrieving revision 2.15
diff -u -u -r2.14 -r2.15
--- DBI.pm	4 Mar 2002 19:50:02 -0000	2.14
+++ DBI.pm	5 Mar 2002 00:45:00 -0000	2.15
@@ -1,6 +1,6 @@
 # Vend::Table::DBI - Access a table stored in an DBI/DBD database
 #
-# $Id: DBI.pm,v 2.14 2002/03/04 19:50:02 jon Exp $
+# $Id: DBI.pm,v 2.15 2002/03/05 00:45:00 jon Exp $
 #
 # Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -20,7 +20,7 @@
 # MA  02111-1307  USA.
 
 package Vend::Table::DBI;
-$VERSION = substr(q$Revision: 2.14 $, 10);
+$VERSION = substr(q$Revision: 2.15 $, 10);
 
 use strict;
 
@@ -1757,8 +1757,9 @@
 
 	if ($rc < 1 and CORE::ref($ref) and scalar(@$ref) ) {
 		$rc = scalar(@$ref);
-		$::Values->{mv_search_match_count} = $rc;
 	}
+	# force to numeric, to handle DBI "0E0"-type results
+	$::Values->{mv_search_match_count} = $rc + 0;
 	if ($opt->{row_count}) {
 		return $rc unless $opt->{list};
 		$ref = [ [ $rc ] ];