Summary | IMAP Client issues / Wrong SQL statement? |
Queue | Horde Framework Packages |
Queue Version | Git master |
Type | Bug |
State | No Feedback |
Priority | 2. Medium |
Owners | jan (at) horde (dot) org |
Requester | markus (at) mwagner (dot) info |
Created | 02/18/2014 (4154 days ago) |
Due | |
Updated | 04/28/2014 (4085 days ago) |
Assigned | 02/19/2014 (4153 days ago) |
Resolved | 03/21/2014 (4123 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
i got the same problem, after upgrade horde 2 weeks ago by pear.
Here is my database structure (there is no autoincremet option i
messageid column):
mysql> DESCRIBE horde_imap_client_data;
+-----------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+------------------+------+-----+---------+-------+
| messageid | int(10) unsigned | NO | PRI | 0 | |
| hostspec | varchar(255) | NO | MUL | NULL | |
| mailbox | varchar(255) | NO | | NULL | |
| modified | bigint(20) | YES | | NULL | |
| port | int(11) | NO | | NULL | |
| username | varchar(255) | NO | | NULL | |
+-----------+------------------+------+-----+---------+-------+
6 rows in set (0.00 sec)
New users can't log to webmail.
He is error from my log file
Apr 28 09:26:18 hostname HORDE: [imp] SQL QUERY FAILED:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
'0' for key 'PRIMARY'
#012#011INSERT INTO horde_imap_client_data(hostspec, mailbox, port, username)#012#011 VALUES ('host', 'INBOX',
'143', 'username@domain') [pid 9236 on line 204 of
"/usr/share/pear/Horde/Db/Adapter/Pdo/Base.php"]
How can i fix the problem?
(I used to have a PEAR installation way before...)
apt/dpkg and then upgraded via PEAR?
Do you remember the versions of that library before and after the upgrade?
It starts to sound like a botched upgrade rather than a design issue
of the migration scripts.
Version ⇒ Git master
apt/dpkg and then upgraded via PEAR?
Do you remember the versions of that library before and after the upgrade?
It starts to sound like a botched upgrade rather than a design issue
of the migration scripts.
the auto_increment feature.
I tried to do so manually and it caused a hick-up due to an entry with
'0' as messageid, thus setting the auto-increment sequence to 1 and
having a PRIMARY violation. Setting this record to anything > 0 will
make the table alteration successful.
"5.1.5".
Unfortunately, checking for newer versions under adminstration does
not work anymore... (but this ought to be another story)
Thanks!
earlier version. (I am using Debian sid/experimental packages and at
some point imap_client came into the game)
--
-- Table structure for table `horde_imap_client_data`
--
CREATE TABLE IF NOT EXISTS `horde_imap_client_data` (
`messageid` int(10) unsigned NOT NULL DEFAULT '0',
`hostspec` varchar(255) NOT NULL,
`mailbox` varchar(255) NOT NULL,
`modified` bigint(20) DEFAULT NULL,
`port` int(11) NOT NULL,
`username` varchar(255) NOT NULL,
PRIMARY KEY (`messageid`),
KEY
`index_horde_imap_client_data_on_hostspec_and_mailbox_and_port_an`
(`hostspec`,`mailbox`,`port`,`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
So I assume, the autoincrement got lost at some point...
(anymore?). What database do you use, and has this been migrated
from an earlier version of the Horde_Imap_Client database schema?
State ⇒ Feedback
(anymore?). What database do you use, and has this been migrated from
an earlier version of the Horde_Imap_Client database schema?
'horde_imap_client_data' !?
Also, my running codebase shows in file
1_horde_imap_client_base_tables.php 'messageid' as autoincrementKey.
BTW: I can move messages to older folders. But when creating a folder,
it seems that the appropriate enrtry cannot be made into table
'horde_imap_client_data'.
Further ideas to investigate on this one?
State ⇒ Assigned
Assigned to Jan Schneider
commit f47da21798ffc4d1664e167a620ca846c2808ff6
Author: Jan Schneider <jan@horde.org>
Date: Tue Feb 11 23:06:14 2014 +0100
Rename uid column to messageid.
uid is a reserved word on Oracle databases.
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
New Attachment: horde5-imp-sql-error.png
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Due ⇒ 02/28/2014
Summary ⇒ IMAP Client issues / Wrong SQL statement?
Type ⇒ Bug
Folder.Subfolder I receive the following error (attachment) and also
the following log entry is issued.
2014-02-18T13:16:23+01:00 ERR: HORDE [imp] SQL QUERY FAILED:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
'0' for key 'PRIMARY'
INSERT INTO horde_imap_client_data (hostspec, mailbox, port, username)
VALUES ('localhost', 'Folder.Subfolder', '143',
'user@domain.com') [pid 16977 on line 553 of
"/usr/share/php/Horde/Db/Adapter/Base.php"
There is a messageid field in the horde_imap_client_data table which
is set to 0 already for "Folder". Other folders have other numbers.
Also, when looking at the folder (e.g. click to show content), I just
see nothing/empty folder.
However, for other (older) IMAP-Folders everything works perfectely.
What could be the reason for this?! DB out of date/not properly updated?
Thanks for any pointers/fixes.