[exim] Using MySQL Stored Procedures in Exim

Pàgina inicial
Delete this message
Reply to this message
Autor: Mark Moseley
Data:  
A: EXIM mailing list
Assumptes nous: Re: [exim] Using MySQL Stored Procedures in Exim
Assumpte: [exim] Using MySQL Stored Procedures in Exim
Apologies if I missed a documented answer for this when I was looking from
the spec and google.

I'm curious if anyone has had any experience using MySQL stored procedures
with Exim? Specifically, is there any way to get to use the "CALL
ProcName()" syntax in lookups without having to change the last arg in
mysql_real_connect() in src/lookups/mysql.c? And if that is the only way
(the only way I've found so far), does anybody have any stability issues to
report that might be due to that hack?

If one changes the last arg in mysql_real_connect() call in
src/lookups/mysql.c from 0 to CLIENT_MULTI_STATEMENTS, the CALL syntax
works. Without that change, any attempt to call a stored procedure, gets the
"can't return a result set in the given context" response (if you've tried
using stored procs with perl and an old version of DBD::mysql, this will
look familiar).

With that change in place, mysql lookups in general seem to be working
normally. I've got pretty rudimentary C knowledge, so my fear is that
there's some other can of worms I might be opening by changing that last arg
that might not be readily apparent.

And, yes, I know PostgreSQL has stored procedures that probably work fine in
Exim ;) No need to preach to the choir, plus there's no chance of changing
the db backend any time soon.