apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45407] auto reconnect in apr_dbd_mysql disturb normal work with prepared statements
Date Mon, 21 Jul 2008 11:57:09 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45407





--- Comment #5 from Marko Kevac <mkevac@gmail.com>  2008-07-21 04:57:08 PST ---
It is obvious if you know about this. But if someone sees error 'connection
lost' and he does not that this can possibly be error with prepared statement,
his first step will be to reconnect or invalidate reslist element.

Anyway, that's not the point. Let's say that we know that if pselect() returns
'connection lost' error, we should prepare statements one more time.

There are two types of prepared statements.
First, ones from DBDPrepare (mod_dbd). Second, statements that were prepared
with apr library in modules that use mod_dbd or in modules that don't use
mod_dbd at all.

mod_dbd does not know anything about statements that were prepared in other
modules. So feature 'if pselect gives error, prepare one more time' should be
implemented in mod_dbd and in all modules, that use apr_dbd_mysql.

This 'lot of coding in a lot of places' can be avoided with just turning off
reconnect. Maybe not by default, but there should be option.

In this case, after connection lost, mysql_ping will not reconnect and it will
return error. apr_reslist element will be invalidated and new connection will
be created and statements will be prepared (in dbd_construct). It is not large
overhead, becaule mysql_ping reconnects anyway.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message