mysql 5.7 prepared insert hang workaround (#49)
The issue is related to mysql bug 85105 and libzdb issue 21.
Basically, libzdb's MysqlPreparedStatement_executeQuery() is setting the cursor type to read-only, which mysql 5.7 does not particularly enjoy when combined with INSERT statements. As a result, every call to dbmail's db_stmt_query() leads to a hang if the prepared statement is an INSERT one.
libzdb's MysqlPreparedStatement_execute() is not affected and hence dbmail's db_stmt_exec() can be used as a workaround, followed up with "SELECT LAST_INSERT_ID()".
Hi Iewa,
I tried your pull request as a patch, it works but not 100%.
It still hangs when creating or editing a mail from the imap daemon. (Maybe also for lmtpd daemon?)
Is there a new version for this? Could you give it a look?
P.S. I'm testing on mariaDB 10.2
Ciao Edoardo, Notification ended up in the spam folder hence I didn't notice your comment. Apparently DBMail got a new life at https://github.com/dbmail/dbmail