dbmail icon indicating copy to clipboard operation
dbmail copied to clipboard

dbmail + libzdb + mysql 5.7 = hang

Open lewa opened this issue 8 years ago • 0 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()".

To reproduce:

# dbmail-users -a user -w passwd

libzdb 2.11.3 MySQL 5.7.18 Ubuntu 16.04.2

lewa avatar Jul 21 '17 17:07 lewa