From: Warren Young Date: March 24 2009 4:20pm Subject: Re: Insertion of Infinity and Not-a-Number values using MySQL++ List-Archive: http://lists.mysql.com/plusplus/8503 Message-Id: <49C90854.2090907@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Ken Smith wrote: > > Sorry if this is in an FAQ somewhere, but I can't find anything... It seems there isn't much to find. The MySQL reference manual doesn't have much to say on this topic, either. Apparently one is meant to decide on a local standard. Since MySQL++ doesn't yet have one, and your proposal looks reasonable, I'm happy to go with it. I'm a little unsure how to handle types not declared as nullable. (For instance, sql_double instead of Null.) If the type is nullable, mapping infinity and NaN to SQL null is fine. I don't think we should do the same for a type not declared as nullable, however. The attached patch uses 0 in this case. Otherwise, I get "inf" on my system, as that's how my C++ standard library converts infinity to a string. I believe this was left unspecified in the Standard, so it can do whatever it likes. Please try the attached patch, or the current svn version, to see if it does what you want. (The svn version also includes changes to the examples to demonstrate the new feature, but has unrelated features in development, too.)