From: Warren Young Date: March 1 2005 5:32am Subject: Re: potential bugs? List-Archive: http://lists.mysql.com/plusplus/4010 Message-Id: <4223FE84.3090707@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Rongjun Mu wrote: > These may be or may be not bug, just my points of views. Thanks for your comments. I'll reply to each one inline below. > 1. the return value of 'mysql_init' is not checked. Maybe a "out of > memory" exception? You'd have to check the C API source to be sure, but from the docs, it looks like you only get OOM when you ask the C API to allocate the MYSQL object. We don't do that in the Connection class; we provide the MYSQL object. > 2. when some operation fails because of lock(), throw BadQuery(error()) > may throw a null string because this is not a real MySQL error. I guess you're saying that this: > throw BadQuery(error()); should be something like this: throw BadQuery("lock failed") ? > 3. where is Query::lock() ? What do you think it should do? Maybe you should send a patch instead of describing it. > 4. return ResUse(mysql_use_result(&mysql), this); in Connection::use. > If mysql_use_result(&mysql) fails, successive call ResUse::fetch_row > will throw a "Results not fetched" but actually it was fetched, but failed. I'm not sure what you mean here. It would be clearer if you just provided a patch.