[Serusers] Patch for MySQL 5.0.19 and above in SER 0.9.x

sip sip at arcdiv.com
Mon Feb 12 13:39:58 CET 2007


I've attached a patch file for people to use (it really only adds 3 lines) to
patch the my_con.c file in the mysql module for SER 0.9.x

I've tested it for a week with inactivity, restarts of mysql, etc, and it
holds up rather well, but of course I would be remiss if I didn't add a 'use
at your own risk' disclaimer. ;) 

The basic problem is that, 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. 

SO... if you're using mysql 5.0.19 or above with SER 0.9.x (there may only be
3 of us doing this ;) ), here's a patch file for you to apply to my_con.c in
your modules/mysql directory. 

I'd recommend backing up your my_con.c file before patching. 


N.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mysql5conpatch
Type: application/octet-stream
Size: 596 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20070212/9f674863/attachment.obj>


More information about the sr-users mailing list