Re: [Sqlrelay-discussion] Patch to fix MySQL auto-reconnect (MYSQL_OPT_RECONNECT option)
Brought to you by:
mused
|
From: David M. <dav...@fi...> - 2008-02-19 15:39:15
|
This patch appears to be more correct that the code I had before, so I'll apply it. Though even without this patch, I can't replicate the problem that several folks have reported. If I run an instance of mysql, run sqlrelay against it, run some queries through sqlrsh, stop the mysql server, run a query through sqlrsh, then restart the mysql server, sqlrelay successfully reconnects and the query goes through. I've tried several different versions of mysql and tried restart vs. stop/start, and other things, but I can't seem to reproduce the error. Could someone who's had trouble with this send me some more info. What version of mysql are you using, what platform, and exactly what steps are you using to reproduce the error? Thanks, David Muse dav...@fi... On Fri, 2008-02-15 at 00:17 -0500, David Muse wrote: > Cool. I'll give it a try and should be able to include it in the next > release. > > Thanks! > > Dave Muse > dav...@fi... > > > On Mon, 2008-02-11 at 18:05 -0800, Renaud Amar wrote: > > I wrote a small patch which fixes an issue I’ve noticed with the SQL > > Relay connection daemons for MySQL: > > > > the connection daemon doesn’t automatically reconnect to the MySQL > > database once it’s been disconnected (either when restarting mysqld or > > when the connection times out). I’ve also noticed that after being > > disconnected, the connection daemon usually gets stuck in a weird loop > > where it keeps trying to unsuccessfully send a query over and over. > > > > > > > > After looking through the mysql connection daemon code, I noticed that > > the code that is supposed to enable the MYSQL_OPT_RECONNECT option > > (in mysqlconnection.h and mysqlconnection.C) was ifdef’ed using a > > different #define symbol as the one used in the config.h file. > > > > Namely, it’s using “#ifdef MYSQL_OPT_RECONNECT” while config.h defines > > “HAVE_MYSQL_OPT_RECONNECT”. > > > > This patch simply modifies mysqlconnection.h and mysqlconnection.C to > > use HAVE_MYSQL_OPT_RECONNECT. > > > > > > > > This is probably the same issue Abraham Müller mentioned in a previous > > post (here: > > http://sourceforge.net/mailarchive/forum.php?thread_name=47739600.8090800%40gmx.de&forum_name=sqlrelay-discussion). > > > > Hopefully, this patch will fix this issue as well. > > > > > > > > > > > > > > > > Renaud. > > > > > > > > > > > > PS: when applying the patch in your spec file, in the %prep section, > > make sure you call it with the –p1 option, in order to strip one level > > of directories from the paths in the patch file. > > > > > > > > > > __________________________________________________ > > D O T E A S Y - "Join the web hosting revolution!" > > http://www.doteasy.com > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion __________________________________________________ D O T E A S Y - "Join the web hosting revolution!" http://www.doteasy.com |