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
> 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.