Author Topic: MDB2 Error: constraint violation  (Read 9608 times)

Offline floeff

  • Newbie
  • *
  • Posts: 4
MDB2 Error: constraint violation
« on: January 08, 2009, 07:18:06 AM »
Hello,

I run RoundCube 0.2-stable on a Dovecot IMAP server, and every now and then I receive errors like these:

Code: [Select]
[07-Jan-2009 12:51:32 +0100] DB Error: MDB2 Error: constraint violation Query: _doQuery: [Error message: Could not execute statement] [Last exec
uted query: EXECUTE mdb2_statement_mysql_528670db03153d30e9e7a0ce2f9c5d458226c0344 USING @0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10] [Native co
de: 1062] [Native message: Doppelter Eintrag '29-INBOX.msg-57' f<FC>r Schl<FC>ssel 2]  in /var/www/roundcube/program/include/rcube_mdb2.php on l
ine 540 (GET /roundcube/?_task=mail&_action=get&_uid=57&_mbox=INBOX&_part=1.2.2)

[08-Jan-2009 09:51:48 +0100] DB Error: MDB2 Error: constraint violation Query: _doQuery: [Error message: Could not execute statement] [Last exec
uted query: EXECUTE mdb2_statement_mysql_538877e25f0655975d9c587963411154925db5ade USING @0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10] [Native co
de: 1062] [Native message: Doppelter Eintrag '17-INBOX.msg-2' f<FC>r Schl<FC>ssel 2]  in /var/www/roundcube/program/include/rcube_mdb2.php on li
ne 540 (GET /roundcube/?_task=mail&_action=get&_uid=2&_mbox=INBOX&_part=1.2.2)


Anyone knows what the problem might be?

Thanks!
floeff

Offline eagle1

  • Newbie
  • *
  • Posts: 2
MDB2 Error: constraint violation
« Reply #1 on: January 12, 2009, 08:18:00 AM »
The same here on Debian with Courier-IMAP....

Any hints?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
MDB2 Error: constraint violation
« Reply #2 on: January 12, 2009, 09:34:25 AM »
do you have caching enabled? it looks like one of your messages has something in the headers which is breaking the SQL statement. I suggest if you can find which message it is then open a ticket on trac and attach the message for the devs to look at.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline floeff

  • Newbie
  • *
  • Posts: 4
MDB2 Error: constraint violation
« Reply #3 on: January 12, 2009, 10:52:47 AM »
Hi John,

thanks for your reply. Do you mean the configuration directive

$rcmail_config['enable_caching'] = TRUE;

?

floeff

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
MDB2 Error: constraint violation
« Reply #4 on: January 12, 2009, 10:55:13 AM »
thats the one
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline floeff

  • Newbie
  • *
  • Posts: 4
MDB2 Error: constraint violation
« Reply #5 on: January 12, 2009, 01:04:31 PM »
Thanks! I will monitor it and try it out. I guess it's not a single message causing the issue, given the frequency the error occurs.

Offline eagle1

  • Newbie
  • *
  • Posts: 2
MDB2 Error: constraint violation
« Reply #6 on: January 14, 2009, 07:51:47 AM »
I've turned off the CACHE feature, now the errors goes away.

It's possible that is an issue caused by upgrading from older version?

I see this after the MDB2 error: [Native message: Duplicate entry 'INBOX.msg-256' for key 2]

Offline floeff

  • Newbie
  • *
  • Posts: 4
MDB2 Error: constraint violation
« Reply #7 on: January 14, 2009, 08:37:35 AM »
Quote from: eagle1;16358
I've turned off the CACHE feature, now the errors goes away.

It's possible that is an issue caused by upgrading from older version?


I upgraded from 0.2-trunk (beta) to 0.2-stable. Database scheme had the same version, but maybe the beta made some faulty entries. Can I simply empty the cache table, or is this a risk?

Florian

Offline d00s7w

  • Jr. Member
  • **
  • Posts: 13
MDB2 Error: constraint violation
« Reply #8 on: August 03, 2011, 12:21:26 PM »
i have the same issue but i have enable_cache = false.


[03-Aug-2011 17:06:55 +0100]: DB Error: MDB2 Error: constraint violation Query: _doQuery: [Error message: Could not execute statement] [Last executed query: INSERT INTO session (sess_id, vars, ip, created, changed) VALUES ('92114e1b1fd0efe3b6f847872a1c5261', 'bGFuZ3VhZ2V8czo1OiJlbl9HQiI7YXV0aF90aW1lfGk6MTMxMjM4NzYxNTt0ZW1wfGI6MTs=', '82.30.37.166', FROM_UNIXTIME(1312387615), FROM_UNIXTIME(1312387615))] [Native code: 1062] [Native message: Duplicate entry '92114e1b1fd0efe3b6f847872a1c5261' for key 'PRIMARY']  in C:\Inetwww\webmail\program\include\rcube_mdb2.php on line 650 (GET /?_task=mail&_remote=1&_action=list&_mbox=INBOX&_refresh=1&_=1312387611986&_unlock=loading1312387611984)

Offline d00s7w

  • Jr. Member
  • **
  • Posts: 13
MDB2 Error: constraint violation
« Reply #9 on: August 03, 2011, 12:22:47 PM »
i have the same issue but i have enable_cache = false.


[03-Aug-2011 17:06:55 +0100]: DB Error: MDB2 Error: constraint violation Query: _doQuery: [Error message: Could not execute statement] [Last executed query: INSERT INTO session (sess_id, vars, ip, created, changed) VALUES ('92114e1b1fd0efe3b6f847872a1c5261', 'bGFuZ3VhZ2V8czo1OiJlbl9HQiI7YXV0aF90aW1lfGk6MTMxMjM4NzYxNTt0ZW1wfGI6MTs=', '82.30.37.166', FROM_UNIXTIME(1312387615), FROM_UNIXTIME(1312387615))] [Native code: 1062] [Native message: Duplicate entry '92114e1b1fd0efe3b6f847872a1c5261' for key 'PRIMARY']  in C:\Inetwww\webmail\program\include\rcube_mdb2.php on line 650 (GET /?_task=mail&_remote=1&_action=list&_mbox=INBOX&_refresh=1&_=1312387611986&_unlock=loading1312387611984)