[Bast-commits] r8426 - in DBIx-Class/0.08/trunk: .
lib/DBIx/Class/Storage
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Tue Jan 26 09:10:12 GMT 2010
Author: ribasushi
Date: 2010-01-26 09:10:11 +0000 (Tue, 26 Jan 2010)
New Revision: 8426
Modified:
DBIx-Class/0.08/trunk/Changes
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
Log:
Fix txn_begin on external non-AC coderef regression
Modified: DBIx-Class/0.08/trunk/Changes
===================================================================
--- DBIx-Class/0.08/trunk/Changes 2010-01-26 08:48:30 UTC (rev 8425)
+++ DBIx-Class/0.08/trunk/Changes 2010-01-26 09:10:11 UTC (rev 8426)
@@ -1,18 +1,15 @@
Revision history for DBIx::Class
- - FAQ "Custom methods in Result classes"
- Perl 5.8.1 is now the minimum supported version
- Subqueries no longer marked experimental
- might_have/has_one now warn if applied calling class's column
has is_nullable set to true.
- Fixed regression in deploy() with a {sources} table limit applied
(RT#52812)
- - Cookbook POD fix for add_drop_table instead of add_drop_tables
- Views without a view_definition will throw an exception when
parsed by SQL::Translator::Parser::DBIx::Class
- Stop the SQLT parser from auto-adding indexes identical to the
Primary Key
- - Schema POD improvement for dclone
- Fix ResultSetColumn improperly selecting more than the requested
column when +columns/+select is present
- Fix regression in context sensitiveness of deployment_statements
@@ -27,6 +24,10 @@
- New MSSQL specific resultset attribute to allow hacky ordered
subquery support
- Fix nasty schema/dbhandle leak due to SQL::Translator
+ - Fix regression on externally supplied $dbh with AutoCommit=0
+ - FAQ "Custom methods in Result classes"
+ - Cookbook POD fix for add_drop_table instead of add_drop_tables
+ - Schema POD improvement for dclone
0.08115 2009-12-10 09:02:00 (CST)
- Real limit/offset support for MSSQL server (via Row_Number)
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm 2010-01-26 08:48:30 UTC (rev 8425)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm 2010-01-26 09:10:11 UTC (rev 8426)
@@ -493,7 +493,7 @@
sub _normalize_connect_info {
my ($self, $info_arg) = @_;
my %info;
-
+
my @args = @$info_arg; # take a shallow copy for further mutilation
# combine/pre-parse arguments depending on invocation style
@@ -1050,7 +1050,7 @@
eval {
if(ref $info[0] eq 'CODE') {
- $dbh = &{$info[0]}
+ $dbh = $info[0]->();
}
else {
$dbh = DBI->connect(@info);
@@ -1172,6 +1172,11 @@
sub txn_begin {
my $self = shift;
+
+ # this means we have not yet connected and do not know the AC status
+ # (e.g. coderef $dbh)
+ $self->ensure_connected if (! defined $self->_dbh_autocommit);
+
if($self->{transaction_depth} == 0) {
$self->debugobj->txn_begin()
if $self->debug;
More information about the Bast-commits
mailing list