Skip to content

mysql 5.7 prepared insert hang workaround (#49)#50

Open
lewa wants to merge 1 commit intopjstevns:masterfrom
lewa:mysql-insert-workaround
Open

mysql 5.7 prepared insert hang workaround (#49)#50
lewa wants to merge 1 commit intopjstevns:masterfrom
lewa:mysql-insert-workaround

Conversation

@lewa
Copy link
Copy Markdown

@lewa lewa commented Jul 21, 2017

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

@EdoaLive
Copy link
Copy Markdown

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

@lewa
Copy link
Copy Markdown
Author

lewa commented Apr 10, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants