On Oct 5, 2006, at 4:39 PM, Tim Bunce wrote:
Let's try this and see how it works out:
Original state:
dbh1o -> dbh1i
sthAo -> sthAi(dbh1i)
dbh2o -> dbh2i
swap_inner_handle dbh1o with dbh2o:
dbh2o -> dbh1i
sthAo -> sthAi(dbh1i)
sthAo -> sthAi(dbh1i)
dbh2o -> dbh2i
swap_inner_handle dbh1o with dbh2o:
dbh2o -> dbh1i
sthAo -> sthAi(dbh1i)
dbh1o -> dbh2i
create new sth from dbh1o:
dbh2o -> dbh1i
sthAo -> sthAi(dbh1i)
dbh1o -> dbh2i
sthBo
s happening.]
>
> My thoughts exactly :)
Let's try this and see how it works out:
Original state:
dbh1o -> dbh1i
sthAo -> sthAi(dbh1i)
dbh2o -> dbh2i
swap_inner_handle dbh1o with dbh2o:
dbh2o -> dbh1i
sthAo -> sthAi(dbh1i)
On Oct 5, 2006, at 6:19 AM, Tim Bunce wrote:
On Wed, Oct 04, 2006 at 11:53:48AM -0700, Henri Asseily wrote:
I have an issue with proper usage of swap_inner_handle:
Say I have a dbh with an active sth.
I create a new dbh (new_dbh) and swap its inner handle with dbh.
Now is sth a child of dbh
On Wed, Oct 04, 2006 at 11:53:48AM -0700, Henri Asseily wrote:
> I have an issue with proper usage of swap_inner_handle:
>
> Say I have a dbh with an active sth.
> I create a new dbh (new_dbh) and swap its inner handle with dbh.
>
> Now is sth a child of dbh or new_dbh? i.e.
I have an issue with proper usage of swap_inner_handle:
Say I have a dbh with an active sth.
I create a new dbh (new_dbh) and swap its inner handle with dbh.
Now is sth a child of dbh or new_dbh? i.e., is sth linked to the
inner dbh, or not at all?
Then I create a new sth (new_sth) and swap
On Fri, Jan 27, 2006 at 07:12:12PM -0500, Steven Lembark wrote:
>
> >>> Umm, bind_columns is probably do-able if the DBI gave you a way to
> >>> access the current row array. Then you could just bind the new columns
> >>> to the old ones.
> >>
> >>Any real odds?
> >
> >Odds?
>
> "Probably do-able
Artistic Opinion: Would reconnecting the damaged handle
and keep it usable with an appropriate error then loosing
the transaction (and letting the caller deal with it
as an exception) seem reasonable?
Yes. That would possibly suffice is all code gets its statement handles
via prepare_cached().
> Umm, bind_columns is probably do-able if the DBI gave you a way to
> access the current row array. Then you could just bind the new columns
> to the old ones.
Any real odds?
Odds?
"Probably do-able"
Q1: How likely?
Q2: Any timeframe?
--
Steven Lembark
On Thu, Jan 26, 2006 at 02:33:21PM -0500, Steven Lembark wrote:
>
> >> The only thing this doesn't pull across that I can think
> >> of is the current row state of each handle
> >
> > You could use $sth->rows and fetch to the same row count
> > (but there's no guarantee you'll be getting the same
>> Q: If the cached kids are stored in $new_dbh, wouldn't I
>>overwrite the statement handles when I performed the
>>$old_dbh->swap_inner_handle( $new_dbh )?
>
> True. If you swap_inner_handle for all ChildHandles then you'll
> automatically dea
On Thu, Jan 26, 2006 at 02:04:28AM -0500, Steven Lembark wrote:
>
> > The inner handle carries all the DBI info, including CachedKids.
> > So swap_inner_handle is a simple and total brain transplant.
>
> Q: Any chance of getting "$sth->clone"?
Doubtful. Patche
# the reconnect worked, so the database is fine.
# get rid of the old database handle
warn "$prefix *** TIMEOUT! server busy: $sql ; dsn:
$dsn \n" if (DBIx_HA_DEBUG);
$dbh->swap_inner_handle($n
> The inner handle carries all the DBI info, including CachedKids.
> So swap_inner_handle is a simple and total brain transplant.
Q: Any chance of getting "$sth->clone"?
>From what I can see in the doc's, the clone method
is specific to database handles (the statemen
On Wed, Jan 25, 2006 at 02:42:18PM -0500, Steven Lembark wrote:
>
> I'm using swap_inner_handle in a HandleError sub to re-connect
> the existing database handle. The trick is to re-connect if
> the error warrants it, return false to the caller, which then
> allows the
I'm using swap_inner_handle in a HandleError sub to re-connect
the existing database handle. The trick is to re-connect if
the error warrants it, return false to the caller, which then
allows the caller to re-try the failed operation and keep
going.
Q: Do I need to use $if_active = 3
16 matches
Mail list logo