From: John Napiorkowski Date: Thu, 5 Jun 2008 14:28:00 +0000 (+0000) Subject: Merge 'trunk' into 'replication_dedux' X-Git-Tag: v0.08240~402^2~23 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=915fffa87b41422a8d3911730a0b0cae502bbc72;hp=-c;p=dbsrgits%2FDBIx-Class.git Merge 'trunk' into 'replication_dedux' r13636@dev (orig r4470): blblack | 2008-06-05 01:57:09 -0500 _verify_pid mods _dbh, so we must call it again here r13637@dev (orig r4471): blblack | 2008-06-05 02:21:42 -0500 remove a line from the threads test that had the potential to mask bugs, and copy it to a new "threadtxn" test too, which uses a txn_do in each thread to do the same stuff --- 915fffa87b41422a8d3911730a0b0cae502bbc72 diff --combined lib/DBIx/Class/Storage/DBI.pm index cecd5e1,aeb0da1..d9063c7 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@@ -600,7 -600,7 +600,7 @@@ sub dbh_do eval { $self->_verify_pid if $dbh; - if( !$dbh ) { + if(!$self->_dbh) { $self->_populate_dbh; $dbh = $self->_dbh; } @@@ -1063,7 -1063,6 +1063,7 @@@ sub _query_start if ( $self->debug ) { @bind = $self->_fix_bind_params(@bind); + $self->debugobj->query_start( $sql, @bind ); } } @@@ -1296,16 -1295,6 +1296,16 @@@ sub select_single return @row; } +sub reload_row { + my ($self, $row) = @_; + + my $reload = $row->result_source->resultset->find( + map { $row->$_ } $row->primary_columns + ); + + return $reload; +} + =head2 sth =over 4 @@@ -1731,31 -1720,6 +1731,31 @@@ sub build_datetime_parser } } +=head2 is_replicating + +A boolean that reports if a particular L is set to +replicate from a master database. Default is undef, which is the result +returned by databases that don't support replication. + +=cut + +sub is_replicating { + return; + +} + +=head2 lag_behind_master + +Returns a number that represents a certain amount of lag behind a master db +when a given storage is replicating. The number is database dependent, but +starts at zero and increases with the amount of lag. Default in undef + +=cut + +sub lag_behind_master { + return; +} + sub DESTROY { my $self = shift; return if !$self->_dbh;