dbmail icon indicating copy to clipboard operation
dbmail copied to clipboard

mysql 5.7 prepared insert hang workaround (#49)

Open lewa opened this issue 8 years ago • 2 comments

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()".

lewa avatar Jul 21 '17 18:07 lewa

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

EdoaLive avatar Dec 19 '19 17:12 EdoaLive

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

lewa avatar Apr 10 '20 11:04 lewa