A NOTE has been added to this issue. 
====================================================================== 
http://www.dbmail.org/mantis/view.php?id=1078 
====================================================================== 
Reported By:                px3
Assigned To:                
====================================================================== 
Project:                    DBMail
Issue ID:                   1078
Category:                   Database layer
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
target:                      
====================================================================== 
Date Submitted:             16-May-16 12:39 CEST
Last Modified:              07-Sep-16 11:41 CEST
====================================================================== 
Summary:                    DBMail stopped working after upgrading to mysql 5.7
Description: 
After upgrading mysql to 5.7.12 dbmail stopped working.
Inserts into the database are no longer possible.

Using mysql and executing the same statements from the mysql-client,
everything works fine.

All other applications on the machine are runnning fine, expect dbmail.

dbmail-util -a shows no errors.

Even trying to create a new user with dbmail-users ends up in:
 May 16 12:42:51 rdsroot dbmail/user[29631]: Debug:[user] do_add(+65):
Adding user px3 with password type crypt,0 bytes mailbox limit and clientid
0...
May 16 12:42:51 rdsroot dbmail/user[29631]: Database:[db] db_con_get(+263):
[0xe05ca0] connection from pool
May 16 12:42:51 rdsroot dbmail/user[29631]: Database:[db]
db_stmt_prepare(+419): [0xe05ca0] [SELECT user_idnr FROM dbmail_users WHERE
lower(userid) = lower(?)]
May 16 12:42:51 rdsroot dbmail/user[29631]: Database:[db]
db_stmt_set_str(+427): [0xdf5810] 1:[px3]
May 16 12:42:51 rdsroot dbmail/user[29631]: Database:[db]
db_con_close(+291): [0xe05ca0] connection to pool
May 16 12:42:51 rdsroot dbmail/user[29631]: Database:[db] db_con_get(+263):
[0xe05ca0] connection from pool
May 16 12:42:51 rdsroot dbmail/user[29631]: Database:[db]
db_stmt_prepare(+419): [0xe05ca0] [SELECT user_idnr FROM dbmail_users WHERE
lower(userid) = lower(?)]
May 16 12:42:51 rdsroot dbmail/user[29631]: Database:[db]
db_stmt_set_str(+427): [0xdf5aa0] 1:[px3]
May 16 12:42:51 rdsroot dbmail/user[29631]: Database:[db]
db_con_close(+291): [0xe05ca0] connection to pool
May 16 12:42:51 rdsroot dbmail/user[29631]: Database:[db] db_con_get(+263):
[0xe05ca0] connection from pool
May 16 12:42:51 rdsroot dbmail/user[29631]: Database:[db]
db_begin_transaction(+542): BEGIN
May 16 12:42:51 rdsroot dbmail/user[29631]: Database:[db]
db_stmt_prepare(+419): [0xe05ca0] [INSERT INTO dbmail_users
(userid,passwd,client_idnr,maxmail_size,encryption_type) VALUES (?,?,?,?,?)
]
May 16 12:42:51 rdsroot dbmail/user[29631]: Database:[db]
db_stmt_set_str(+427): [0xdf5d10] 1:[px3]
May 16 12:42:51 rdsroot dbmail/user[29631]: Database:[db]
db_stmt_set_str(+427): [0xdf5d10] 2:[fE3UF87llocO6]
May 16 12:42:51 rdsroot dbmail/user[29631]: Database:[db]
db_stmt_set_u64(+439): [0xdf5d10] 3:[0]
May 16 12:42:51 rdsroot dbmail/user[29631]: Database:[db]
db_stmt_set_u64(+439): [0xdf5d10] 4:[0]
May 16 12:42:51 rdsroot dbmail/user[29631]: Database:[db]
db_stmt_set_str(+427): [0xdf5d10] 5:[crypt]


And then nothing more happens.

Mysql shows no errors in the logfiles.

====================================================================== 

---------------------------------------------------------------------- 
 (0003734) px3 (reporter) - 16-May-16 13:08
 http://www.dbmail.org/mantis/view.php?id=1078#c3734 
---------------------------------------------------------------------- 
The severity is "block", but i can't change it :( 

---------------------------------------------------------------------- 
 (0003735) Wouter0100 (reporter) - 19-Jul-16 23:16
 http://www.dbmail.org/mantis/view.php?id=1078#c3735 
---------------------------------------------------------------------- 
I agree with you, this is a major blocker. The SQL files are also incorrect
(datetime default), but we're able to fix that manually. 

Although I'm not experienced with C, it seems to hang around here
https://github.com/pjstevns/dbmail/blob/f5b73b342b4a6cae1bb15340e5da7330e29319c1/src/dm_db.c#L3976
. Not sure why - yet. 

---------------------------------------------------------------------- 
 (0003736) Wouter0100 (reporter) - 19-Jul-16 23:28
 http://www.dbmail.org/mantis/view.php?id=1078#c3736 
---------------------------------------------------------------------- 
Now I'm pretty sure it has to do with the transactions. Removing aliases
works fine
(https://github.com/pjstevns/dbmail/blob/f5b73b342b4a6cae1bb15340e5da7330e29319c1/src/modules/authsql.c#L571-L589),
but it hangs on removing a user
(https://github.com/pjstevns/dbmail/blob/f5b73b342b4a6cae1bb15340e5da7330e29319c1/src/dm_db.c#L4006-L4024).


---------------------------------------------------------------------- 
 (0003737) Wouter0100 (reporter) - 19-Jul-16 23:52
 http://www.dbmail.org/mantis/view.php?id=1078#c3737 
---------------------------------------------------------------------- 
Tomorrow I'll try compiling dbmail so I'm able to test some code changes
(currently using from debian packages). Could also be a bug in libzdb,
because PreparedStatement_execute seems to hang when it's a transaction. 

---------------------------------------------------------------------- 
 (0003738) px3 (reporter) - 20-Jul-16 15:40
 http://www.dbmail.org/mantis/view.php?id=1078#c3738 
---------------------------------------------------------------------- 
This behaviour accours on every "insert"
Even new mails are no longer written to the DB 

---------------------------------------------------------------------- 
 (0003741) px3 (reporter) - 05-Sep-16 17:05
 http://www.dbmail.org/mantis/view.php?id=1078#c3741 
---------------------------------------------------------------------- 
close this ticket. i fixed it myself by patching a bunch of code :( 

---------------------------------------------------------------------- 
 (0003742) alan (reporter) - 07-Sep-16 11:41
 http://www.dbmail.org/mantis/view.php?id=1078#c3742 
---------------------------------------------------------------------- 
Please consider donating your patches so others can share in your success
and avoid issues that upgrading to mysql 5.7 brings. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
16-May-16 12:39  px3            New Issue                                    
16-May-16 13:06  px3            Issue Monitored: px3                         
16-May-16 13:08  px3            Note Added: 0003734                          
19-Jul-16 23:16  Wouter0100     Note Added: 0003735                          
19-Jul-16 23:16  Wouter0100     Issue Monitored: Wouter0100                    
19-Jul-16 23:28  Wouter0100     Note Added: 0003736                          
19-Jul-16 23:52  Wouter0100     Note Added: 0003737                          
20-Jul-16 15:40  px3            Note Added: 0003738                          
05-Sep-16 17:05  px3            Note Added: 0003741                          
07-Sep-16 11:41  alan           Note Added: 0003742                          
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

Reply via email to