Rich:
> "Stored procedures do not work in Postfix without code changes because
> the |CLIENT_MULTI_RESULTS connect flag, for MySQL API, is not turned on."

As a general rule, Postfix does not implement a (database) feature
unless the Postfix code is in accordance with the documentation of
the underlying database API.  Unfortunately, when this came up a
few years ago, the MySQL database API was too incomplete to make
that determination.

There are two posts by John Fawcett to move things forward:

1) In http://osdir.com/ml/mail.postfix.devel/2008-02/msg00040.html
is a test program that explores the under-documented database API.

2) In http://lists.mysql.com/mysqldoc/175 is confirmation about how
the under-documented database API is meant to be used, plus a promise
that the API documentation will be updated.

Given this, someone with enough time on their hands can add support
for multiple result sets to the Postfix MySQL client.

I would be grateful if that support came with test cases for single
and multi-result queries, including non-error and error results so
that we can run the test whenever something in the code is changed.

> http://errorval.livejournal.com/37425.html

This patch silently throws away the second and later result sets
from a MySQL query. That is wrong even if a stored procedure query
produces only one single result set. The last result set from the
query is followed by an dummy result set that indicates whether the
query was successful or not. It would be a mistake to silently
throw away that error indication.

        Wietse

Reply via email to