[Devel] [Fwd: [Serdev] [Tracker] Updated: (SER-226) Patch for MySQL 5.0.19 and above]

Dan Pascu dan at ag-projects.com
Thu Feb 15 18:39:45 CET 2007


This problem is fixed in openser since 1.0.0

On Thursday 15 February 2007 18:14, Klaus Darilion wrote:
> might be interesting for openser too
>
> I do not know if openser also has the problem because I'm a postgres
> user :-)
>
> -------- Original Message --------
> Subject: [Serdev] [Tracker] Updated: (SER-226) Patch for MySQL 5.0.19
> and	above
> Date: Thu, 15 Feb 2007 13:32:39 +0100 (CET)
> From: Jan Janak (JIRA) <tracker at iptel.org>
> To: serdev at iptel.org
>
>       [ http://tracker.iptel.org/browse/SER-226?page=all ]
>
> Jan Janak updated SER-226:
> --------------------------
>
>          Fix Version/s: Ottendorf
>                         Ipteldorf
>      Affects Version/s:     (was: 0.9.6)
>                             (was: 0.9.5)
>                             (was: 0.9.4)
>                             (was: 0.9.0)
>
> > Patch for MySQL 5.0.19 and above
> > --------------------------------
> >
> >                 Key: SER-226
> >                 URL: http://tracker.iptel.org/browse/SER-226
> >             Project: SER
> >          Issue Type: Improvement
> >          Components: MySQL
> >    Affects Versions: 0.9.3
> >             Fix For: Ottendorf, Ipteldorf
> >
> >
> > After MySQL 5.0.3, they changed the default behaviour of the mysql
> > connection socket to NOT reconnect in the case of a timeout or a
> > restart of the server. If you had SER up and running for a while, or
> > if there were a glitch with your mysql, the connection would time
> > out/disconnect, and SER would no longer be able to hit the database
> > (requiring a restart of SER). The MySQL coders added an option to
> > enable the reconnect ability of the mysql connection, but it didn't
> > work until 5.0.19. This is a patch for the modules/mysql/my_con.c
> > file.
> > --- my_con.c	2004-08-03 13:22:06.000000000 -0400
> > +++ my_con.c.patched	2007-02-12 09:19:31.000000000 -0500
> > @@ -41,6 +41,8 @@
> >  struct my_con* new_connection(struct my_id* id)
> >  {
> >  	struct my_con* ptr;
> > +	my_bool my_true;
> > +	my_true=1;
> >
> >  	if (!id) {
> >  		LOG(L_ERR, "new_connection(): Invalid parameter value\n");
> > @@ -63,6 +65,7 @@
> >  	}
> >
> >  	mysql_init(ptr->con);
> > +	mysql_options(ptr->con, MYSQL_OPT_RECONNECT, &my_true);
> >
> >  	if (!mysql_real_connect(ptr->con, id->host.s, id->username.s,
> > id->password.s, id->database.s, id->port, 0, 0)) { LOG(L_ERR,
> > "new_connection(): %s\n", mysql_error(ptr->con));
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://tracker.iptel.org/secure/Administrators.jspa
> -
> For more information on JIRA, see:
> http://www.atlassian.com/software/jira
>
>
> _______________________________________________
> Serdev mailing list
> Serdev at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serdev

-- 
Dan



More information about the Devel mailing list