r58332 - in /trunk/librose-db-perl: Changes META.yml debian/changelog lib/Rose/DB.pm lib/Rose/DB/Informix.pm lib/Rose/DB/MySQL.pm lib/Rose/DB/Oracle.pm lib/Rose/DB/SQLite.pm t/list-tables.t t/subclass-list-tables.t
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Sun May 23 15:51:54 UTC 2010
Author: gregoa
Date: Sun May 23 15:51:46 2010
New Revision: 58332
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=58332
Log:
* New upstream release 0.761.
Modified:
trunk/librose-db-perl/Changes
trunk/librose-db-perl/META.yml
trunk/librose-db-perl/debian/changelog
trunk/librose-db-perl/lib/Rose/DB.pm
trunk/librose-db-perl/lib/Rose/DB/Informix.pm
trunk/librose-db-perl/lib/Rose/DB/MySQL.pm
trunk/librose-db-perl/lib/Rose/DB/Oracle.pm
trunk/librose-db-perl/lib/Rose/DB/SQLite.pm
trunk/librose-db-perl/t/list-tables.t
trunk/librose-db-perl/t/subclass-list-tables.t
Modified: trunk/librose-db-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/Changes?rev=58332&op=diff
==============================================================================
--- trunk/librose-db-perl/Changes (original)
+++ trunk/librose-db-perl/Changes Sun May 23 15:51:46 2010
@@ -1,3 +1,11 @@
+0.761 (05.22.2010) - John Siracusa <siracusa at gmail.com>
+
+ * Support for Rose::DB::Object 0.788.
+ * Detect and report problems caused by DBD::mysql versions that fail to
+ set the Active database handle attribute back to a true value when
+ mysql_auto_reconnect is set. (Reported by Matt S. Trout and Kostas
+ Chatzikokolakis)
+
0.760 (04.28.2010) - John Siracusa <siracusa at gmail.com>
* Moved version number back to three places after the decimal in order to
Modified: trunk/librose-db-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/META.yml?rev=58332&op=diff
==============================================================================
--- trunk/librose-db-perl/META.yml (original)
+++ trunk/librose-db-perl/META.yml Sun May 23 15:51:46 2010
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Rose-DB
-version: 0.760
+version: 0.761
abstract: ~
author: []
license: perl
Modified: trunk/librose-db-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/debian/changelog?rev=58332&op=diff
==============================================================================
--- trunk/librose-db-perl/debian/changelog (original)
+++ trunk/librose-db-perl/debian/changelog Sun May 23 15:51:46 2010
@@ -1,11 +1,15 @@
-librose-db-perl (0.760-1) UNRELEASED; urgency=low
+librose-db-perl (0.761-1) UNRELEASED; urgency=low
+ [ Krzysztof Krzyżaniak (eloy) ]
WAITS-FOR DateTime::Format::Oracle or patch for disabling tests
- * New upstream release
+ * New upstream release 0.760
* Switch to dpkg-source 3.0 (quilt) format
- -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Thu, 29 Apr 2010 16:33:20 +0200
+ [ gregor herrmann ]
+ * New upstream release 0.761.
+
+ -- gregor herrmann <gregoa at debian.org> Sun, 23 May 2010 17:50:35 +0200
librose-db-perl (0.758-1) unstable; urgency=low
Modified: trunk/librose-db-perl/lib/Rose/DB.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/lib/Rose/DB.pm?rev=58332&op=diff
==============================================================================
--- trunk/librose-db-perl/lib/Rose/DB.pm (original)
+++ trunk/librose-db-perl/lib/Rose/DB.pm Sun May 23 15:51:46 2010
@@ -20,7 +20,7 @@
our $Error;
-our $VERSION = '0.760';
+our $VERSION = '0.761';
our $Debug = 0;
@@ -1105,6 +1105,24 @@
eval
{
local $dbh->{'RaiseError'} = 1;
+
+ # XXX: Detect DBD::mysql bug (in some versions before 4.012) that
+ # XXX: fails to set Active back to 1 when mysql_auto_reconnect
+ # XXX: is in use.
+ unless($dbh->{'Active'})
+ {
+ if($dbh->{'Driver'}{'Name'} eq 'mysql' && $dbh->{'Driver'}{'Version'} < 4.012)
+ {
+ die 'Database handle does not have Active set to a true value. DBD::mysql ',
+ 'versions before 4.012 may fail to set Active back to 1 when the ',
+ 'mysql_auto_reconnect is set. Try upgrading to DBD::mysql 4.012 or later';
+ }
+ else
+ {
+ die "Cannot start transaction on inactive database handle ($dbh)";
+ }
+ }
+
$ret = $dbh->begin_work
};
@@ -1140,7 +1158,13 @@
{
my($self) = shift;
- return 0 unless(defined $self->{'dbh'} && $self->{'dbh'}{'Active'});
+ my $is_active = (defined $self->{'dbh'} && $self->{'dbh'}{'Active'}) ? 1 : 0;
+
+ unless(defined $self->{'dbh'})
+ {
+ $self->error("Could not commit transaction: database handle is undefined");
+ return 0;
+ }
my $dbh = $self->dbh or return undef;
@@ -1169,6 +1193,20 @@
{
no warnings 'uninitialized';
$self->error("commit() $error - " . $dbh->errstr);
+
+ unless($is_active)
+ {
+ if($dbh->{'Driver'}{'Name'} eq 'mysql' && $dbh->{'Driver'}{'Version'} < 4.012)
+ {
+ $self->error($self->error . '; Also, the database handle did not ' .
+ 'have Active set to a true value. DBD::mysql versions before 4.012 ' .
+ 'may fail to set Active back to 1 when the mysql_auto_reconnect is ' .
+ 'set. Try upgrading to DBD::mysql 4.012 or later');
+ }
+
+ return 0;
+ }
+
return undef;
}
@@ -1191,7 +1229,13 @@
{
my($self) = shift;
- return 0 unless(defined $self->{'dbh'} && $self->{'dbh'}{'Active'});
+ my $is_active = (defined $self->{'dbh'} && $self->{'dbh'}{'Active'}) ? 1 : 0;
+
+ unless(defined $self->{'dbh'})
+ {
+ $self->error("Could not roll back transaction: database handle is undefined");
+ return 0;
+ }
my $dbh = $self->dbh or return undef;
@@ -1220,6 +1264,20 @@
{
no warnings 'uninitialized';
$self->error("rollback() - $error " . $dbh->errstr);
+
+ unless($is_active)
+ {
+ if($dbh->{'Driver'}{'Name'} eq 'mysql' && $dbh->{'Driver'}{'Version'} < 4.012)
+ {
+ $self->error($self->error . '; Also, the database handle did not ' .
+ 'have Active set to a true value. DBD::mysql versions before 4.012 ' .
+ 'may fail to set Active back to 1 when the mysql_auto_reconnect is ' .
+ 'set. Try upgrading to DBD::mysql 4.012 or later');
+ }
+
+ return 0;
+ }
+
return undef;
}
@@ -1249,7 +1307,6 @@
eval
{
- local $dbh->{'RaiseError'} = 1;
$self->begin_work or die $self->error;
$code->(@_);
$self->commit or die $self->error;
@@ -2179,25 +2236,34 @@
sub validate_boolean_keyword
{
- no warnings;
+ no warnings 'uninitialized';
$_[1] =~ /^(?:TRUE|FALSE)$/;
}
-sub should_inline_integer_keywords { 0 }
-sub should_inline_float_keywords { 0 }
-sub should_inline_decimal_keywords { 0 }
-sub should_inline_numeric_keywords { 0 }
-sub should_inline_double_precision_keywords { 0 }
-sub should_inline_bigint_keywords { 0 }
-sub should_inline_date_keywords { 0 }
-sub should_inline_datetime_keywords { 0 }
-sub should_inline_time_keywords { 0 }
-sub should_inline_timestamp_keywords { 0 }
-sub should_inline_interval_keywords { 0 }
-sub should_inline_set_keywords { 0 }
-sub should_inline_array_keywords { 0 }
-sub should_inline_boolean_keywords { 0 }
-sub should_inline_bitfield_values { 0 }
+sub should_inline_keyword
+{
+ no warnings 'uninitialized';
+ ($_[1] =~ /^\w+\(.*\)$/) ? 1 : 0;
+}
+
+BEGIN
+{
+ *should_inline_integer_keyword = \&should_inline_keyword;
+ *should_inline_float_keyword = \&should_inline_keyword;
+ *should_inline_decimal_keyword = \&should_inline_keyword;
+ *should_inline_numeric_keyword = \&should_inline_keyword;
+ *should_inline_double_precision_keyword = \&should_inline_keyword;
+ *should_inline_bigint_keyword = \&should_inline_keyword;
+ *should_inline_date_keyword = \&should_inline_keyword;
+ *should_inline_datetime_keyword = \&should_inline_keyword;
+ *should_inline_time_keyword = \&should_inline_keyword;
+ *should_inline_timestamp_keyword = \&should_inline_keyword;
+ *should_inline_interval_keyword = \&should_inline_keyword;
+ *should_inline_set_keyword = \&should_inline_keyword;
+ *should_inline_array_keyword = \&should_inline_keyword;
+ *should_inline_boolean_keyword = \&should_inline_keyword;
+ *should_inline_bitfield_value = \&should_inline_keyword;
+}
sub next_value_in_sequence
{
Modified: trunk/librose-db-perl/lib/Rose/DB/Informix.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/lib/Rose/DB/Informix.pm?rev=58332&op=diff
==============================================================================
--- trunk/librose-db-perl/lib/Rose/DB/Informix.pm (original)
+++ trunk/librose-db-perl/lib/Rose/DB/Informix.pm Sun May 23 15:51:46 2010
@@ -428,10 +428,10 @@
($_[0]->keyword_function_calls && $_[1] =~ /^\w+\(.*\)$/);
}
-sub should_inline_date_keywords { 1 }
-sub should_inline_datetime_keywords { 1 }
-sub should_inline_time_keywords { 1 }
-sub should_inline_timestamp_keywords { 1 }
+sub should_inline_date_keyword { 1 }
+sub should_inline_datetime_keyword { 1 }
+sub should_inline_time_keyword { 1 }
+sub should_inline_timestamp_keyword { 1 }
sub parse_set
{
Modified: trunk/librose-db-perl/lib/Rose/DB/MySQL.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/lib/Rose/DB/MySQL.pm?rev=58332&op=diff
==============================================================================
--- trunk/librose-db-perl/lib/Rose/DB/MySQL.pm (original)
+++ trunk/librose-db-perl/lib/Rose/DB/MySQL.pm Sun May 23 15:51:46 2010
@@ -315,10 +315,10 @@
sub validate_bitfield_keyword { defined $_[1] ? 1 : 0 }
-sub should_inline_bitfield_values
+sub should_inline_bitfield_value
{
# MySQL 5.0.3 or later requires this crap...
- return $_[0]->{'should_inline_bitfield_values'} ||=
+ return $_[0]->{'should_inline_bitfield_value'} ||=
(shift->database_version >= 5_000_003) ? 1 : 0;
}
Modified: trunk/librose-db-perl/lib/Rose/DB/Oracle.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/lib/Rose/DB/Oracle.pm?rev=58332&op=diff
==============================================================================
--- trunk/librose-db-perl/lib/Rose/DB/Oracle.pm (original)
+++ trunk/librose-db-perl/lib/Rose/DB/Oracle.pm Sun May 23 15:51:46 2010
@@ -9,7 +9,7 @@
our $Debug = 0;
-our $VERSION = '0.759';
+our $VERSION = '0.761';
use Rose::Class::MakeMethods::Generic
(
@@ -388,6 +388,7 @@
my $schema = $args{'schema'} || $self->schema;
my $catalog = $args{'catalog'} || $self->catalog;
+ no warnings 'uninitialized';
$table = uc $table;
$schema = uc $schema;
$catalog = uc $catalog;
@@ -477,10 +478,10 @@
*validate_timestamp_keyword = \&validate_date_keyword;
*validate_datetime_keyword = \&validate_date_keyword;
-sub should_inline_date_keywords { 1 }
-sub should_inline_datetime_keywords { 1 }
-sub should_inline_time_keywords { 1 }
-sub should_inline_timestamp_keywords { 1 }
+sub should_inline_date_keyword { 1 }
+sub should_inline_datetime_keyword { 1 }
+sub should_inline_time_keyword { 1 }
+sub should_inline_timestamp_keyword { 1 }
package Rose::DB::Oracle::DateHandler;
Modified: trunk/librose-db-perl/lib/Rose/DB/SQLite.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/lib/Rose/DB/SQLite.pm?rev=58332&op=diff
==============================================================================
--- trunk/librose-db-perl/lib/Rose/DB/SQLite.pm (original)
+++ trunk/librose-db-perl/lib/Rose/DB/SQLite.pm Sun May 23 15:51:46 2010
@@ -80,10 +80,10 @@
($_[0]->keyword_function_calls && $_[1] =~ /^\w+\(.*\)$/));
}
-sub should_inline_date_keywords { 1 }
-sub should_inline_datetime_keywords { 1 }
-sub should_inline_time_keywords { 1 }
-sub should_inline_timestamp_keywords { 1 }
+sub should_inline_date_keyword { 1 }
+sub should_inline_datetime_keyword { 1 }
+sub should_inline_time_keyword { 1 }
+sub should_inline_timestamp_keyword { 1 }
sub parse_date
{
Modified: trunk/librose-db-perl/t/list-tables.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/t/list-tables.t?rev=58332&op=diff
==============================================================================
--- trunk/librose-db-perl/t/list-tables.t (original)
+++ trunk/librose-db-perl/t/list-tables.t Sun May 23 15:51:46 2010
@@ -399,6 +399,7 @@
$sth->execute('rdbo_test_vendors');
my $info = $sth->fetchrow_hashref;
+ no warnings 'uninitialized';
unless(lc $info->{'Type'} eq 'innodb' || lc $info->{'Engine'} eq 'innodb')
{
die "Missing InnoDB support";
Modified: trunk/librose-db-perl/t/subclass-list-tables.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/librose-db-perl/t/subclass-list-tables.t?rev=58332&op=diff
==============================================================================
--- trunk/librose-db-perl/t/subclass-list-tables.t (original)
+++ trunk/librose-db-perl/t/subclass-list-tables.t Sun May 23 15:51:46 2010
@@ -399,6 +399,7 @@
$sth->execute('rdbo_test_vendors');
my $info = $sth->fetchrow_hashref;
+ no warnings 'uninitialized';
unless(lc $info->{'Type'} eq 'innodb' || lc $info->{'Engine'} eq 'innodb')
{
die "Missing InnoDB support";
More information about the Pkg-perl-cvs-commits
mailing list