r23197 - in /branches/upstream/libdbd-pg-perl/current: Changes META.yml Makefile.PL Pg.pm README SIGNATURE dbdimp.c lib/Bundle/DBD/Pg.pm t/99_spellcheck.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Mon Jul 14 19:04:51 UTC 2008


Author: gregoa
Date: Mon Jul 14 19:04:49 2008
New Revision: 23197

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=23197
Log:
[svn-upgrade] Integrating new upstream version, libdbd-pg-perl (2.8.5)

Modified:
    branches/upstream/libdbd-pg-perl/current/Changes
    branches/upstream/libdbd-pg-perl/current/META.yml
    branches/upstream/libdbd-pg-perl/current/Makefile.PL
    branches/upstream/libdbd-pg-perl/current/Pg.pm
    branches/upstream/libdbd-pg-perl/current/README
    branches/upstream/libdbd-pg-perl/current/SIGNATURE
    branches/upstream/libdbd-pg-perl/current/dbdimp.c
    branches/upstream/libdbd-pg-perl/current/lib/Bundle/DBD/Pg.pm
    branches/upstream/libdbd-pg-perl/current/t/99_spellcheck.t

Modified: branches/upstream/libdbd-pg-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-pg-perl/current/Changes?rev=23197&op=diff
==============================================================================
--- branches/upstream/libdbd-pg-perl/current/Changes (original)
+++ branches/upstream/libdbd-pg-perl/current/Changes Mon Jul 14 19:04:49 2008
@@ -1,6 +1,14 @@
 ('GSM' is Greg Sabino Mullane, greg at turnstep.com)
 
-2.8.4 Released July 10, 2008
+2.8.5 Released July 13, 2008
+
+	- Fix an obscure bug in which a coredump occurs if client_min_messages 
+	  	is set to DEBUG3 or greater, and we then exit without disconnecting 
+		while AutoCommit is off. The new behavior is to simply not attempt to 
+		output the debugging information about the final 'rollback'. [GSM]
+	- More documentation improvements.
+
+2.8.4 Released July 10, 2008 (subversion r11520)
 
 	- Minor Perl::Critic test adjustments.
 	- Documentation enhancements.

Modified: branches/upstream/libdbd-pg-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-pg-perl/current/META.yml?rev=23197&op=diff
==============================================================================
--- branches/upstream/libdbd-pg-perl/current/META.yml (original)
+++ branches/upstream/libdbd-pg-perl/current/META.yml Mon Jul 14 19:04:49 2008
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name                        : DBD-Pg
-version                     : 2.8.4
+version                     : 2.8.5
 abstract                    : DBI PostgreSQL interface
 author:              
   - Greg Sabino Mullane <greg at turnstep.com>
@@ -38,10 +38,10 @@
 provides:
   DBD::Pg:
     file                    : Pg.pm
-    version                 : 2.8.4
+    version                 : 2.8.5
   Bundle::DBD::Pg:
     file                    : lib/Bundle/DBD/Pg.pm
-    version                 : 2.8.4
+    version                 : 2.8.5
 
 keywords:
   - Postgres

Modified: branches/upstream/libdbd-pg-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-pg-perl/current/Makefile.PL?rev=23197&op=diff
==============================================================================
--- branches/upstream/libdbd-pg-perl/current/Makefile.PL (original)
+++ branches/upstream/libdbd-pg-perl/current/Makefile.PL Mon Jul 14 19:04:49 2008
@@ -1,4 +1,4 @@
-# $Id: Makefile.PL 11516 2008-07-10 17:15:06Z turnstep $
+# $Id: Makefile.PL 11526 2008-07-13 03:25:21Z turnstep $
 
 use ExtUtils::MakeMaker;
 use Config;
@@ -7,7 +7,7 @@
 use 5.006001;
 
 ## No version.pm for this one, as the prereqs are not loaded yet.
-my $VERSION = '2.8.4';
+my $VERSION = '2.8.5';
 
 my $lib;
 BEGIN {

Modified: branches/upstream/libdbd-pg-perl/current/Pg.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-pg-perl/current/Pg.pm?rev=23197&op=diff
==============================================================================
--- branches/upstream/libdbd-pg-perl/current/Pg.pm (original)
+++ branches/upstream/libdbd-pg-perl/current/Pg.pm Mon Jul 14 19:04:49 2008
@@ -1,5 +1,5 @@
 #  -*-cperl-*-
-#  $Id: Pg.pm 11516 2008-07-10 17:15:06Z turnstep $
+#  $Id: Pg.pm 11527 2008-07-13 14:12:22Z turnstep $
 #
 #  Copyright (c) 2002-2008 Greg Sabino Mullane and others: see the Changes file
 #  Portions Copyright (c) 2002 Jeffrey W. Baker
@@ -17,7 +17,7 @@
 {
 	package DBD::Pg;
 
-	use version; our $VERSION = qv('2.8.4');
+	use version; our $VERSION = qv('2.8.5');
 
 	use DBI ();
 	use DynaLoader ();
@@ -1694,7 +1694,7 @@
 
 =head1 VERSION
 
-This documents version 2.8.4 of the DBD::Pg module
+This documents version 2.8.5 of the DBD::Pg module
 
 =head1 DESCRIPTION
 
@@ -2121,8 +2121,8 @@
 
 =item B<Warn> (boolean, inherited)
 
-Enables warnings. This is on by default, and should only be turned off in a local block for a short a time 
-as is absolutely needed.
+Enables warnings. This is on by default, and should only be turned off in a local block 
+for a short a time only when absolutely needed.
 
 =item B<Active> (boolean, read-only)
 
@@ -2146,7 +2146,10 @@
 
 =item B<Executed> (boolean, read-only)
 
-Implemented by DBI, no driver-specific impact.
+Indicates if a handle has been executed. For database handles, this value is true after the C<do()> method has been called, or 
+when one of the child statement handles has issued an execute(). Issuing a C<commit> or C<rollback> always resets the 
+attribute to false for database handles. For statement handles, any call to C<execute()> or it variants will flip the value to 
+true for the lifetime of the statement handle.
 
 =item B<Type> (scalar)
 
@@ -2168,11 +2171,15 @@
 
 =item B<PrintError> (boolean, inherited)
 
-Implemented by DBI, no driver-specific impact.
+Forces database errors to also generate warnings, which can then be filtered with methods such as 
+locally redefining $SIG{__WARN__} or using modules such as CGI::Carp. This attribute is on 
+by default.
 
 =item B<RaiseError> (boolean, inherited)
 
-Implemented by DBI, no driver-specific impact.
+Forces errors to always raise an exception. Although it defaults to off, it is recommended that this 
+be turned on, as the alternative is to check the return value of every method (prepare, execute, fetch, etc.) 
+to check for any problems. See the DBI docs for more information.
 
 =item B<HandleError> (boolean, inherited)
 
@@ -2556,28 +2563,57 @@
 
 =item B<commit>
 
-  $rc  = $dbh->commit;
-
-Supported by this driver as proposed by DBI. See also the notes about
-B<Transactions> elsewhere in this document.
+  $rc = $dbh->commit;
+
+Issues a COMMIT to the server, indicating that the current transaction is finished and that 
+all changes made will be visible to other processes. If AutoCommit is enabled, then 
+a warning is given and no COMMIT is issued. Returns true on success, false on error.
+See also the the section on L</Transactions>.
 
 =item B<rollback>
 
-  $rc  = $dbh->rollback;
-
-Supported by this driver as proposed by DBI. See also the notes about
-B<Transactions> elsewhere in this document.
+  $rc = $dbh->rollback;
+
+Issues a ROLLBACK to the server, which discards any changes made in the current transaction. If AutoCommit 
+is enabled, then a warning is given and no ROLLBACK is issued. Returns true on success, and 
+false on error. See also the the section on L</Transactions>.
 
 =item B<begin_work>
 
-Supported by this driver as proposed by DBI. Note that this will not 
-issue a "begin" until immediately before the next given command.
+This method turns on transactions until the next call to C<commit> or C<rollback>, if AutoCommit is 
+currently enabled. If it is not enabled, calling begin_work will issue an error. Note that the 
+transaction will not actually begin until the first statement after begin_work is called.
+Example:
+
+  $dbh->{AutoCommit} = 1;
+  $dbh->do("INSERT INTO foo VALUES (123)"); ## Changes committed immediately
+  $dbh->begin_work();
+  ## Not in a transaction yet, but AutoCommit is set to 0
+
+  $dbh->do("INSERT INTO foo VALUES (345)");
+  ## DBD::PG actually issues two statements here:
+  ## BEGIN;
+  ## INSERT INTO foo VALUES (345)
+  ## We are now in a transaction
+
+  $dbh->commit();
+  ## AutoCommit is now set to 1 again
 
 =item B<disconnect>
 
   $rc  = $dbh->disconnect;
 
-Supported by this driver as proposed by DBI.
+Disconnects from the Postgres database. Any uncommitted changes will be rolled back upon disconnection. It's 
+good policy to always explicitly call commit or rollback at some point before disconnecting, rather than 
+relying on the default rollback behavior.
+
+This method may give warnings about "disconnect invalidates X active statement handle(s)". This means that 
+you called $sth->execute() but did not finish fetching all the rows from them. To avoid seeing this 
+warning, either fetch all the rows or call $sth->finish() for each executed statement handle.
+
+If the script exits before disconnect is called (or, more precisely, if the database handle is no longer 
+referenced by anything), then the database handle' DESTROY method will call the rollback() and disconnect() 
+methods automatically. It is best to explicitly disconnect rather than rely on this behavior.
 
 =item pg_notifies
 
@@ -2613,9 +2649,9 @@
 
   $rc = $dbh->ping;
 
-This driver supports the C<ping> method, which can be used to check the validity
-of a database handle. The value returned is either 0, indicating that the 
-connection is no longer valid, or a positive integer, indicating the following:
+This C<ping> method is used to check the validity of a database handle. The value returned is 
+either 0, indicating that the connection is no longer valid, or a positive integer, indicating 
+the following:
 
   Value    Meaning
   --------------------------------------------------
@@ -2840,7 +2876,20 @@
 
 =item B<quote_identifier>
 
-Implemented by DBI, no driver-specific impact.
+  $string = $dbh->quote_identifier( $name );
+  $string = $dbh->quote_identifier( $catalog, $schema, $table);
+
+Returns a quoted version of the supplied string, which is commonly a schema, 
+table, or column name. The three argument form will return the schema and 
+the table together, separated by a dot (the $catalog argument is ignored).
+Examples:
+
+  print $dbh->quote_identifier('grapefruit'); ## Prints: "grapefruit"
+
+  print $dbh->quote_identifier('juicy fruit'); ## Prints: "juicy fruit"
+
+  print $dbh->quote_identifier(undef, 'public', 'pg_proc');
+  ## Prints: "public"."pg_proc"
 
 =item B<pg_server_trace>
 
@@ -3286,9 +3335,6 @@
 object identifier. The offset and len parameters may be set to zero, in which
 case the driver fetches the whole blob at once.
 
-Starting with PostgreSQL 6.5, every access to a blob has to be put into a
-transaction. This holds even for a read-only access.
-
 See also the PostgreSQL-specific functions concerning blobs, which are
 available via the C<func> interface.
 
@@ -3340,14 +3386,15 @@
 
 =item B<PRECISION>  (arrayref, read-only)
 
-Supported by this driver. C<NUMERIC> types will return the precision. Types of
-C<CHAR> and C<VARCHAR> will return their size (number of characters). Other
-types will return the number of I<bytes>.
+Returns a reference to an array of integer values of each column. 
+C<NUMERIC> types will return the precision. Types of C<CHAR> and C<VARCHAR> 
+will return their size (number of characters). Other types will return the number 
+of I<bytes>.
 
 =item B<SCALE>  (arrayref, read-only)
 
-Supported by this driver as proposed by DBI. The only type
-that will return a value currently is C<NUMERIC>.
+Returns a reference to an array of integer values of each column. 
+The only type that will return a value currently is C<NUMERIC>.
 
 =item B<NULLABLE>  (arrayref, read-only)
 
@@ -3802,9 +3849,8 @@
 =head2 Large Objects
 
 This driver supports all largeobject functions provided by libpq via the
-C<func> method. Please note that, starting with PostgreSQL 6.5, any access to
-a large object -- even read-only large objects -- must be put into a
-transaction!
+C<func> method. Please note that access to a large object, even read-only 
+large objects, must be put into a transaction.
 
 =head2 Cursors
 
@@ -3903,4 +3949,3 @@
 See also B<DBI/ACKNOWLEDGMENTS>.
 
 =cut
-

Modified: branches/upstream/libdbd-pg-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-pg-perl/current/README?rev=23197&op=diff
==============================================================================
--- branches/upstream/libdbd-pg-perl/current/README (original)
+++ branches/upstream/libdbd-pg-perl/current/README Mon Jul 14 19:04:49 2008
@@ -1,12 +1,12 @@
 
 DBD::Pg  --  the DBI PostgreSQL interface for Perl
 
-# $Id: README 11516 2008-07-10 17:15:06Z turnstep $
+# $Id: README 11526 2008-07-13 03:25:21Z turnstep $
 
 DESCRIPTION:
 ------------
 
-This is version 2.8.4 of DBD::Pg.  The web site for this interface, and 
+This is version 2.8.5 of DBD::Pg.  The web site for this interface, and 
 the latest version, can be found at:
 
 	http://search.cpan.org/dist/DBD-Pg/

Modified: branches/upstream/libdbd-pg-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-pg-perl/current/SIGNATURE?rev=23197&op=diff
==============================================================================
--- branches/upstream/libdbd-pg-perl/current/SIGNATURE (original)
+++ branches/upstream/libdbd-pg-perl/current/SIGNATURE Mon Jul 14 19:04:49 2008
@@ -15,22 +15,22 @@
 Hash: RIPEMD160
 
 SHA1 3df5dd8bb3a3881f50cb1c2025be8c77580cda1c .perlcriticrc
-SHA1 1a08c60e06b305eeaf25e25977bc9870749a9726 Changes
+SHA1 90f29be07c6cddf050a71929d36e1bcb7ec7de4d Changes
 SHA1 4d91c71e5dbb19ece1505ab75c36d00a744bb076 MANIFEST
 SHA1 22055b195f5cf15d7909e8a08468e617f46154e7 MANIFEST.SKIP
-SHA1 2b77565e5b0fe9718fca83ef87d18d980d6c0396 META.yml
-SHA1 210b672ad13c4fa2711b149ee3a74b1211f0ee1d Makefile.PL
+SHA1 71c0dc48f286f59906e459c30795d9f969acbedc META.yml
+SHA1 3c4812956beee4886d1e39b21be13f8de1ec1a9f Makefile.PL
 SHA1 c51356c52c139265e20a2ad33bc8d3ee04f6ff48 Pg.h
-SHA1 d8255a5a7d18ce5bae1c3868ca08b685bf63da51 Pg.pm
+SHA1 d9a6ac4dbecb254cf6f6e04e7b0e27c30a98d576 Pg.pm
 SHA1 06d991c871e5f2b3b900990fc71e6207c94ad8cf Pg.xs
-SHA1 84192b2ae7414f353d77cb437dd528144644eeb4 README
+SHA1 d45b30e0ba420d3173c67a2698625c01bd1caf93 README
 SHA1 283327a19b823faa386bcc85d5104baca40aaa35 README.dev
 SHA1 968d5fad61bce160b31a9cb1a21dd240b9df930f README.win32
 SHA1 0d189a3149a324fa78227f280d50eadc1377671f TODO
-SHA1 2ee3930895ededd7253a3f9ce3bd9f6ed5bdc224 dbdimp.c
+SHA1 4e2d86feb6a44f27e0ee61281c48167e29ad24a5 dbdimp.c
 SHA1 9a5244ebe27af6f18c5dc8713fe8aecaa334134e dbdimp.h
 SHA1 6c33bcf138e577722283bef02fceb8cbce4d100d dbivport.h
-SHA1 66bafb5d4988457f8534dfc09c447f50f45da7cf lib/Bundle/DBD/Pg.pm
+SHA1 2211bf77a00d0d92f1fa3c762957c8abfce79f84 lib/Bundle/DBD/Pg.pm
 SHA1 76a2c65c065a93775ceadf933a5d38bb25c8afa4 quote.c
 SHA1 0a1fdd0406c5c367a9aba366d1d35cfa8d5272ae quote.h
 SHA1 93aa7e8cae0a361d1e6163dea0281ebff41f3c5f t/00-signature.t
@@ -49,7 +49,7 @@
 SHA1 85b5df8ef0c78b1d2d0018d874c62af7ef01a28f t/20savepoints.t
 SHA1 9041f782c66a9248e777e7f9dc1c545cea0996e9 t/99_perlcritic.t
 SHA1 9f94e06ec6b6a27512f1f4c638635e4095ae6be7 t/99_pod.t
-SHA1 1bf0bd67e80e6936aca67244bb5a7a28c6cc6b5a t/99_spellcheck.t
+SHA1 75bff4c125dc7f69c9da165a8f3b86b50bf31db3 t/99_spellcheck.t
 SHA1 540fb0b335d5af08fcc322f18c4166671b50a89b t/99_yaml.t
 SHA1 09cbe5b43b6692d0779e0503790414b5fe758970 t/99cleanup.t
 SHA1 dcbbbbedd302ee77497b730ced93f1df42cde9c5 t/dbdpg_test_setup.pl
@@ -65,7 +65,7 @@
 SHA1 f07cd5ecaeb854c81ceb9206364979cf607e6546 win32.mak
 -----BEGIN PGP SIGNATURE-----
 
-iEYEAREDAAYFAkh2UioACgkQvJuQZxSWSsg7EQCggojHK7g5Y5b/sfDoeff4JNvC
-uYoAn14Dt8s5QKMx6XoQ+KxTuyQc5sRx
-=rBa1
+iEYEAREDAAYFAkh6EToACgkQvJuQZxSWSshW/wCgtD6GcZqkXwZnR8MY+2m/XLLV
+r2QAnilc4Wt4sgPLvzUix323NZSk0qLE
+=WbPk
 -----END PGP SIGNATURE-----

Modified: branches/upstream/libdbd-pg-perl/current/dbdimp.c
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-pg-perl/current/dbdimp.c?rev=23197&op=diff
==============================================================================
--- branches/upstream/libdbd-pg-perl/current/dbdimp.c (original)
+++ branches/upstream/libdbd-pg-perl/current/dbdimp.c Mon Jul 14 19:04:49 2008
@@ -1,6 +1,6 @@
 /*
 
-  $Id: dbdimp.c 11357 2008-06-01 02:32:53Z turnstep $
+  $Id: dbdimp.c 11526 2008-07-13 03:25:21Z turnstep $
 
   Copyright (c) 2002-2008 Greg Sabino Mullane and others: see the Changes file
   Portions Copyright (c) 2002 Jeffrey W. Baker
@@ -276,6 +276,22 @@
 static void pg_warn (void * arg, const char * message)
 {
 	dTHX;
+
+	/* This fun little bit is to prevent a core dump when the following occurs:
+	   client_min_messages is set to DEBUG3 or greater, and we exit without a disconnect.
+	   DBI issues a 'rollback' in this case, which causes some debugging messages 
+	   to be emitted from the server (such as "StartTransactionCommand"). However, we can't do 
+	   the D_imp_dbh call anymore, because the underlying dbh has lost some of its magic.
+	   Unfortunately, DBI then coredumps in dbh_getcom2. Hence, we make sure that the 
+	   object passed in is still 'valid', in that a certain level has a ROK flag.
+	   If it's not, we just return without issuing any warning, as we can't check things 
+	   like DBIc_WARN. There may be a better way of handling all this, and we may want to 
+	   default to always warn() - input welcome.
+	*/
+	if (!SvROK(SvMAGIC(SvRV(newRV((SV*)arg)))->mg_obj)) {
+		return;
+	}
+
 	D_imp_dbh( sv_2mortal(newRV((SV*)arg)) );
 
 	if (TSTART) TRC(DBILOGFP, "%sBegin pg_warn (message: %s DBIc_WARN: %d PrintWarn: %d)\n",

Modified: branches/upstream/libdbd-pg-perl/current/lib/Bundle/DBD/Pg.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-pg-perl/current/lib/Bundle/DBD/Pg.pm?rev=23197&op=diff
==============================================================================
--- branches/upstream/libdbd-pg-perl/current/lib/Bundle/DBD/Pg.pm (original)
+++ branches/upstream/libdbd-pg-perl/current/lib/Bundle/DBD/Pg.pm Mon Jul 14 19:04:49 2008
@@ -4,7 +4,7 @@
 use strict;
 use warnings;
 
-$VERSION = '2.8.4';
+$VERSION = '2.8.5';
 
 1;
 

Modified: branches/upstream/libdbd-pg-perl/current/t/99_spellcheck.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdbd-pg-perl/current/t/99_spellcheck.t?rev=23197&op=diff
==============================================================================
--- branches/upstream/libdbd-pg-perl/current/t/99_spellcheck.t (original)
+++ branches/upstream/libdbd-pg-perl/current/t/99_spellcheck.t Mon Jul 14 19:04:49 2008
@@ -608,6 +608,7 @@
 AvARRAY
 BegunWork
 COPYing
+DBIc
 Deallocate
 Deallocation
 ExecStatusType
@@ -615,12 +616,15 @@
 NULLs
 Oid
 PGRES
+ROK
+StartTransactionCommand
 backend's
 backslashed
 boolean
 cancelling
 copypv
 copystate
+coredumps
 currph
 currpos
 dashdash
@@ -632,6 +636,7 @@
 dollarquote
 dollarstring
 firstword
+getcom
 inerror
 login
 mortalize




More information about the Pkg-perl-cvs-commits mailing list