[Monetdb-developers] Mapilib example

Sjoerd Mullender sjoerd at acm.org
Thu Jul 2 16:51:57 CEST 2009


Fabian Groffen wrote:
> Hi all,
> 
> Triggered by a request from a user I changed the mapilib example
> somewhat.  In particular, I tried to make the example more "school
> style", e.g. don't use a define for something which could have been a
> function.  More important, I added code to walk multi-resultset handles
> in case there is an error, such that it eventually gets printed.  I also
> closed the handle in the die function as proper cleanup example.  I
> removed some mapi_error checks that I thought were redundant, but I'm
> not sure.  Hence, please review the attached diff and comment before I
> commit this.
> 
> The example compiles without warnings for me now, and also works for as
> far as I can see.

The problem with your patch (as I see it) is that if you try to execute
a multi query batch of which one part fails, your error handling code
doesn't show the results that you get from the part(s) that succeed.

How bad this is is a matter of opinion.  In the cases where your code is
used, there are no batches of multiple queries, so the situation does
not occur.

-- 
Sjoerd Mullender

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 369 bytes
Desc: OpenPGP digital signature
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20090702/a9a75c3a/attachment.sig>


More information about the developers-list mailing list