<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Constraint violation in imp_sentmail</title> 
  <pubDate>Fri, 10 Apr 2026 09:35:52 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/9049</link> 
  <atom:link rel="self" type="application/rss+xml" title="Constraint violation in imp_sentmail" href="https://bugs.horde.org/ticket/9049/rss" /> 
  <description>Constraint violation in imp_sentmail</description> 
 
   
   
  <item> 
   <title>SQLSTATE[23000]: Integrity constraint violation: 1062 Duplic</title> 
   <description>SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry &#039;0&#039; for key 1

[Zeile 496 von /home/jan/sapo/horde/framework/Db/lib/Horde/Db/Adapter/Base.php]
Details:
The full error message is logged in Horde&#039;s log file, and is shown below only to administrators. Non-administrative users will not see error details.

Horde_Db_Exception Object
(
    [message:protected] =&gt; SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry &#039;0&#039; for key 1
    [string:Exception:private] =&gt; 
    [code:protected] =&gt; 23000
    [file:protected] =&gt; /home/jan/sapo/horde/framework/Db/lib/Horde/Db/Adapter/Base.php
    [line:protected] =&gt; 496
    [trace:Exception:private] =&gt; Array
        (
            [0] =&gt; Array
                (
                    [file] =&gt; /home/jan/sapo/horde/framework/Db/lib/Horde/Db/Adapter/Base.php
                    [line] =&gt; 527
                    [function] =&gt; execute
                    [class] =&gt; Horde_Db_Adapter_Base
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; INSERT INTO imp_sentmail (sentmail_who, sentmail_ts, sentmail_messageid, sentmail_action, sentmail_recipient, sentmail_success) VALUES (?, ?, ?, ?, ?, ?)
                            [1] =&gt; Array
                                (
                                    [0] =&gt; jan
                                    [1] =&gt; 1274344637
                                    [2] =&gt; &lt;20100520103717.Horde.ey9kh8ss6o00owo80owkk8o8@php5.wg.de&gt;
                                    [3] =&gt; 1
                                    [4] =&gt; xxx@co.sapo.pt
                                    [5] =&gt; 1
                                )

                            [2] =&gt; 
                        )

                )

            [1] =&gt; Array
                (
                    [file] =&gt; /home/jan/sapo/horde/imp/lib/Sentmail/Sql.php
                    [line] =&gt; 78
                    [function] =&gt; insert
                    [class] =&gt; Horde_Db_Adapter_Base
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; INSERT INTO imp_sentmail (sentmail_who, sentmail_ts, sentmail_messageid, sentmail_action, sentmail_recipient, sentmail_success) VALUES (?, ?, ?, ?, ?, ?)
                            [1] =&gt; Array
                                (
                                    [0] =&gt; jan
                                    [1] =&gt; 1274344637
                                    [2] =&gt; &lt;20100520103717.Horde.ey9kh8ss6o00owo80owkk8o8@php5.wg.de&gt;
                                    [3] =&gt; 1
                                    [4] =&gt; xxx@co.sapo.pt
                                    [5] =&gt; 1
                                )

                        )

                )

            [2] =&gt; Array
                (
                    [file] =&gt; /home/jan/sapo/horde/imp/lib/Sentmail/Driver.php
                    [line] =&gt; 53
                    [function] =&gt; _log
                    [class] =&gt; IMP_Sentmail_Sql
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; 1
                            [1] =&gt; &lt;20100520103717.Horde.ey9kh8ss6o00owo80owkk8o8@php5.wg.de&gt;
                            [2] =&gt; xxx@co.sapo.pt
                            [3] =&gt; 1
                        )

                )

            [3] =&gt; Array
                (
                    [file] =&gt; /home/jan/sapo/horde/imp/lib/Compose.php
                    [line] =&gt; 593
                    [function] =&gt; log
                    [class] =&gt; IMP_Sentmail_Driver
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; 1
                            [1] =&gt; &lt;20100520103717.Horde.ey9kh8ss6o00owo80owkk8o8@php5.wg.de&gt;
                            [2] =&gt; Array
                                (
                                    [0] =&gt; João Machado &lt;xxx@co.sapo.pt&gt;
                                    [1] =&gt; Carlos Pires &lt;xxx@sapo.pt&gt;
                                    [2] =&gt; João Machado &lt;xxx@telecom.pt&gt;
                                    [3] =&gt; João Paulo Alberto Martins Carvalho &lt;xxx@co.sapo.pt&gt;
                                    [4] =&gt; Joana Torrado Mendes &lt;xxx@telecom.pt&gt;
                                )

                            [3] =&gt; 1
                        )

                )

</description> 
   <pubDate>Thu, 20 May 2010 08:40:30 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9049#t58920</link> 
  </item> 
   
  <item> 
   <title>The issue is that Horde_Db_Adapter_Base does not have a next</title> 
   <description>The issue is that Horde_Db_Adapter_Base does not have a nextId() function like PEAR DB.

A related question: why is the imp_sentmail table not using AUTO_INCREMENT for that key?</description> 
   <pubDate>Thu, 20 May 2010 17:12:57 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9049#t58925</link> 
  </item> 
   
  <item> 
   <title>It probably wasn&#039;t using auto_increment because PEAR Db basi</title> 
   <description>It probably wasn&#039;t using auto_increment because PEAR Db basically presumed the use of separate sequence tables; Horde_Db presumes that you use the database&#039;s built-in sequencing.</description> 
   <pubDate>Thu, 20 May 2010 17:26:04 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9049#t58928</link> 
  </item> 
   
  <item> 
   <title>&gt; It probably wasn&#039;t using auto_increment because PEAR Db ba</title> 
   <description>&gt; It probably wasn&#039;t using auto_increment because PEAR Db basically 
&gt; presumed the use of separate sequence tables; Horde_Db presumes that 
&gt; you use the database&#039;s built-in sequencing.

Hmmm... unfortunately it doesn&#039;t look like Horde_Db supports altering an existing table to include an auto_increment column.  Or am I missing something?</description> 
   <pubDate>Thu, 20 May 2010 18:36:18 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9049#t58932</link> 
  </item> 
   
  <item> 
   <title>This should have been fixed with the recent db migration cha</title> 
   <description>This should have been fixed with the recent db migration changes to imp.  Need to figure out some things re: migration usage, but the topic of this ticket has been resolved.</description> 
   <pubDate>Wed, 26 May 2010 04:15:10 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9049#t58969</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
