Bug #28619 ndbcluster transactional error in insert
Submitted: 23 May 2007 13:39 Modified: 25 May 2007 10:21
Reporter: Giulio Ferro Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:5.1.18 OS:FreeBSD (6.2 stable)
Assigned to: CPU Architecture:Any

[23 May 2007 13:39] Giulio Ferro
Description:
I'm using dbmail with ndbcluster. When a mail is injected into the db I get this error. I guess it has to do with transactions. On standalone mysql (same version) it works ok:

---
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error [Duplicate entry '' for key '*UNKNOWN*'] [INSERT INTO dbmail_headervalue (headername_id, physmessage_id,
 headervalue) VALUES (12,3,'from gferro.xxx.it (a-b-c-d.ip10.xxx.it [a.b.c.d]) by x.y.z (Postfix) with ES
MTP id 78A7633C5F for <gferro@xxx.it>; Wed, 23 May 2007 15:08:46 +0200 (CEST)')]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error insert headervalue failed
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error [Got error 4350 'Transaction already aborted' from NDBCLUSTER] [INSERT INTO dbmail_tofield (physmessage_
id, toname, toaddr) VALUES (3,'','gferro@xxx.it')]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error insert tofield failed [INSERT INTO dbmail_tofield (physmessage_id, toname, toaddr) VALUES (3,'','gferro@xxx.it')]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error [Got error 4350 'Transaction already aborted' from NDBCLUSTER] [INSERT INTO dbmail_fromfield (physmessag
e_id, fromname, fromaddr) VALUES (3,'Giulio Ferro','gferro@yyy.it')]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error insert fromfield failed [INSERT INTO dbmail_fromfield (physmessage_id, fromname, fromaddr) VALUES (3,'Gi
ulio Ferro','gferro@yyy.it')]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error [Got error 4350 'Transaction already aborted' from NDBCLUSTER] [INSERT INTO dbmail_datefield (physmessag
e_id, datefield) VALUES (3,'2007-05-23 13:08:57')]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error insert datefield failed [INSERT INTO dbmail_datefield (physmessage_id, datefield) VALUES (3,'2007-05-23
13:08:57')]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error [Got error 4350 'Transaction already aborted' from NDBCLUSTER] [INSERT INTO dbmail_subjectfield (physmes
sage_id, subjectfield) VALUES (3,'prova')]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error insert subjectfield failed [INSERT INTO dbmail_subjectfield (physmessage_id, subjectfield) VALUES (3,'pr
ova')]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error [Got error 4350 'Transaction already aborted' from NDBCLUSTER] [INSERT INTO dbmail_envelope (physmessage
_id, envelope) VALUES (3,'(\"Wed, 23 May 2007 15:08:57 +0200\" \"prova\" ((\"Giulio Ferro\" NIL \"gferro\" \"yyy.it\")) ((\"Giulio Ferro\" NIL \"gferro
\" \"yyy.it\")) ((\"Giulio Ferro\" NIL \"gferro\" \"yyy.it\")) ((NIL NIL \"gferro\" \"xxx.it\")) NIL NIL NIL \"<20070523130857.8
54BE2E07A@a.b.it>\")')]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error insert envelope failed [INSERT INTO dbmail_envelope (physmessage_id, envelope) VALUES (3,'(\"Wed, 23 May
 2007 15:08:57 +0200\" \"prova\" ((\"Giulio Ferro\" NIL \"gferro\" \"yyy.it\")) ((\"Giulio Ferro\" NIL \"gferro\" \"yyy.it\")) ((\"Giulio Ferro\" N
IL \"gferro\" \"yyy.it\")) ((NIL NIL \"gferro\" \"ccc.it\")) NIL NIL NIL \"<20070523130857.854BE2E07A@aaa.bbb.it>\")')]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error [Got error 4350 'Transaction already aborted' from NDBCLUSTER] [INSERT INTO dbmail_mailboxes (name, owne
r_idnr,seen_flag, answered_flag, deleted_flag, flagged_flag, recent_flag, draft_flag, permission) VALUES ('INBOX', 4, 1, 1, 1, 1, 1, 1, 2)]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error could not create mailbox
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error could not create mailbox [INBOX] because [Database error while creating]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error mailbox [INBOX] not found
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error permanent failure sort_and_deliver for useridnr [4]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error [Got error 4350 'Transaction already aborted' from NDBCLUSTER] [SELECT physmessage_id FROM dbmail_messag
es WHERE message_idnr = 3]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error error getting physmessage_id
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error failed to delete temporary message [3]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error [Got error 4350 'Transaction already aborted' from NDBCLUSTER] [COMMIT]
May 23 15:08:46 dcspct1 dbmail/lmtpd[35859]: Error error committing transaction.Because we do not want to leave the database in an inconsistent state, we w
ill perform a rollback now
---

How to repeat:
freebsd 6.2 stable (updated to 2007/05/23
dbmail 2.4.4 + postfix + amavisd-new + clamd

just try to send a mail to an existing users in db
[25 May 2007 10:21] Giulio Ferro
I found a bug in the script generating the sql. Not an issue of ndbcluster. Sorry.
[2 Oct 2007 14:51] Tony Shadwick
This may not be an ndbcluster issue, but I'm running into the exact same issue, on the exact same OS, running dbmail.  I would like to know what you changed to fix it!