7 messages in com.mysql.lists.plusplusopt_reconnect patch
FromSent OnAttachments
Jalon, Arnon09 Dec 2005 10:11 
Jalon, Arnon14 Dec 2005 14:22.zip
Warren Young15 Dec 2005 06:24 
Jalon, Arnon15 Dec 2005 07:05.zip
Jalon, Arnon19 Dec 2005 06:39 
Warren Young19 Dec 2005 23:49 
Jalon, Arnon20 Dec 2005 06:27 
Subject:opt_reconnect patch
From:Jalon, Arnon (Arno@247RealMedia.com)
Date:12/09/2005 10:11:36 AM
List:com.mysql.lists.plusplus

Submitted for your approval.

mysql 5.0.13 introduced a flag that will allow the connection to automatically reconnect if it lost its connection to the server for some reason. I added a opt_reconnect flag to the Connection class to allow for this flag to be set.

I've tested it by setting the option in my Connection object before connecting, and verified that it works. I was slightly confused because I noticed that the Connection object will only apply the options while it is connecting or if it is connected, meaning that it will only apply any options after real_connect has been called. Looking at the MySql 5 documentation for mysql_options, it says "mysql_options() should be called after mysql_init() and before mysql_connect() or mysql_real_connect()." Seeing as the behaviour associated with the flag I'm setting is working, I assume that that "should" is really just a "should"?

--Arnon

Arnon Jalon / Software Engineer T: +1.212.231.7159 / F: +1.212.760.1774 arno@247realmedia.com

24/7 Real Media, Inc. (NASDAQ: TFSM) 132 West 31st Street, 9th floor New York, NY 10001

WWW.247REALMEDIA.COM

DELIVERING TODAY >DEFINING TOMORROW