[Rt-commit] rt branch, 4.0/no-prev-handle-side-effects, created. rt-4.0.11rc1-6-ga20251c
Ruslan Zakirov
ruz at bestpractical.com
Fri Mar 29 05:30:10 EDT 2013
The branch, 4.0/no-prev-handle-side-effects has been created
at a20251c5e8f6f59d9007df0902d60b6f949dcda4 (commit)
- Log -----------------------------------------------------------------
commit a20251c5e8f6f59d9007df0902d60b6f949dcda4
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Fri Mar 29 13:22:11 2013 +0400
override _Handle in RT::SearchBuilder
Like in RT::Record - just return $RT::Handle.
This avoids storing $RT::Handle in $sb->{'DBIxHandle'},
so it is never serialized in $session{'tickets'}. Such
serialization may lead to disconnection of active handle.
It happens when $DBIx::SearchBuilder::Handle::PrevHandle
is set to active handle and $session{'tickets'} gets
destroyed. It's hard to get triggered in a test.
diff --git a/lib/RT/SearchBuilder.pm b/lib/RT/SearchBuilder.pm
index 1df5ac1..00501ab 100644
--- a/lib/RT/SearchBuilder.pm
+++ b/lib/RT/SearchBuilder.pm
@@ -86,6 +86,8 @@ sub _Init {
$self->SUPER::_Init( 'Handle' => $RT::Handle);
}
+sub _Handle { return $RT::Handle }
+
sub CleanSlate {
my $self = shift;
$self->{'_sql_aliases'} = {};
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list