Jalon, Arnon wrote:
> Hi, I've created a patch for the ability to handle multi statement
> queries that return multiple result sets.
Thanks! I'm going to apply it to v2.0, with some changes. See attached
Some of the differences are style differences, but for a lot of it I
felt that the patch just didn't go far enough.
For instance, your example disabled exceptions, where it should have
paid attention to them as warnings that the internals of the library
were confused about what was going on.
Another example is your extension of connect_to_db() to add the
necessary connection flag, instead of adding a mysql_set_server_option()
wrapper to Connection to allow this flag to be set at any time.
> I'm attaching that, as well
> as multiquery.cpp, which is intended to go in the examples directory.
FYI, with a suitable diff statement, the example could have been part of
the patch. Also, it would have been nice if you'd provided patches for
> I also modified the copy method of the ResUse class to make sure that a
> ResUse object gets properly purged if an un-initialized ResUse object-
> one with a null result_- gets assigned to it.
Can you explain why this change was needed, though:
- fields_ = other.fields_;
+ fields_ = Fields(this);
Attachment: [application/gzip] multiquery2.diff.gz