[interchange-cvs] interchange - heins modified lib/Vend/Interpolate.pm

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Wed Jul 3 15:02:00 2002


User:      heins
Date:      2002-07-03 19:01:44 GMT
Modified:  lib/Vend Interpolate.pm
Log:
* Fix [counter sql=3D"table:sequence"] for MySQL so that the sequence table
  does not need to be defined in IC. The new docs reflect this.

Revision  Changes    Path
2.76      +4 -3      interchange/lib/Vend/Interpolate.pm


rev 2.76, prev_rev 2.75
Index: Interpolate.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /anon_cvs/repository/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.75
retrieving revision 2.76
diff -u -r2.75 -r2.76
--- Interpolate.pm	3 Jul 2002 18:32:08 -0000	2.75
+++ Interpolate.pm	3 Jul 2002 19:01:44 -0000	2.76
@@ -1,6 +1,6 @@
 # Vend::Interpolate - Interpret Interchange tags
 #=20
-# $Id: Interpolate.pm,v 2.75 2002/07/03 18:32:08 mheins Exp $
+# $Id: Interpolate.pm,v 2.76 2002/07/03 19:01:44 mheins Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -27,7 +27,7 @@
 require Exporter;
 @ISA =3D qw(Exporter);
=20
-$VERSION =3D substr(q$Revision: 2.75 $, 10);
+$VERSION =3D substr(q$Revision: 2.76 $, 10);
=20
 @EXPORT =3D qw (
=20
@@ -2579,7 +2579,8 @@
 					);
 			}=20
 			elsif($dsn =3D~ /^dbi:mysql:/i) {
-				$dbh->do("INSERT INTO $tab VALUES (0)")		or die $diemsg;
+				$seq ||=3D $tab;
+				$dbh->do("INSERT INTO $seq VALUES (0)")		or die $diemsg;
 				my $sth =3D $dbh->prepare("select LAST_INSERT_ID()")
 					or die $diemsg;
 				$sth->execute()								or die $diemsg;