Bug 458224 - Duplicate key entry database error for table cc
Summary: Duplicate key entry database error for table cc
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Database
Version: 3.2
Hardware: All
OS: Linux
medium
urgent
Target Milestone: ---
Assignee: Noura El hawary
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-07 03:39 UTC by Noura El hawary
Modified: 2025-10-16 23:18 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-08-07 19:36:27 UTC
Embargoed:


Attachments (Terms of Use)
v1 patch to removed duplicate ccid entries to the cc table. (1.44 KB, patch)
2008-08-07 18:03 UTC, Noura El hawary
dkl: review+
Details | Diff

Description Noura El hawary 2008-08-07 03:39:53 UTC
As Reported by Matt,

From irc:
DBD::mysql::st execute failed: Duplicate entry '458101-164808' for key 1
[for Statement "INSERT INTO cc (bug_id, who) VALUES (?,?)" with Par
amValues: 1='164808', 0='458101'] at Bugzilla/Bug.pm line 426


Noura

Comment 1 Kevin Baker 2008-08-07 15:56:58 UTC
reported by Mark Cox

--

I think this is a regression calling bugzilla.createBug with

$VAR1 = {
           'priority' => 'medium',
           'version' => '420',
           'bug_file_loc' => '',
           'keywords' => 'Security',
           'comment' => 'rhn_satellite_4.2 tracking bug for Other: see 
blocks bug list for full details of the security issue(s).

This bug is never intended to be made public, please put any public notes 
in the \'blocks\' bugs.

[bug automatically created by: add-tracking-bugs]',
           'component' => 'Server',
           'bit-71' => '1',
           'rep_platform' => 'All',
           'bit-22' => '1',
           'blocked' => 'CVE-2008-1232,CVE-2008-2370,CVE-2008-1947,rhnse',
           'product' => 'Red Hat Network Satellite',
           'bit-38' => '1',
           'short_desc' => 'CVE-2008-1232 CVE-2008-2370 CVE-2008-1947 Other 
various flaws [rhn_satellite_4.2]',
           'op_sys' => 'Linux',
           'bug_severity' => 'medium'
         };

Error below:

Thanks, Mark
--
Mark J Cox / Red Hat Security Response Team

---------- Forwarded message ----------
Date: Thu, 07 Aug 2008 15:18:36 +0200
From: Marc Schoenefeld <mschoene>
To: Mark J Cox <mjc>
Subject: Trouble with tracking bugs

Hi Mark,

still have the problem with bugzilla tracking bugs
for satellite. It tells me that the insert failed
due to duplicate key.

Cheers
Marc

[mschoene@mschoene status-tools]$ perl add-tracking-bugs
--username=mschoene --password=xyz
--bugs=CVE-2008-1232,CVE-2008-2370,CVE-2008-1947
--products=rhn_satellite_4.2 --component=Other
Looking up bug #CVE-2008-1232... done
Looking up bug #CVE-2008-2370... done
Looking up bug #CVE-2008-1947... done


CVE-2008-1232 CVE-2008-2370 CVE-2008-1947 Other various flaws
Affected: rhn_satellite_4.2
Creating tracking bug for rhn_satellite_4.2... **** FAILED ****

DBD::mysql::st execute failed: Duplicate entry '458274-164808' for key 1
[for Statement "INSERT INTO cc (bug_id, who) VALUES (?,?)" with
ParamValues: 1='164808', 0='458274'] at Bugzilla/Bug.pm line 426
         Bugzilla::Bug::create('Bugzilla::Bug', 'HASH(0x17c03140)')
called at ./extensions/compat_xmlrpc/code/webservice.pl line 480
         bugzilla::createBug('bugzilla', 'HASH(0x17f66da0)',
'mschoene', 'xyz') called at
/usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 2559
         eval {...} called at
/usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 2547
         eval {...} called at
/usr/lib/perl5/vendor_perl/5.8.8/SOAP/Lite.pm line 2516

SOAP::Server::handle('Bugzilla::WebService::XMLRPC::Transport::HTTP::CGI=HASH(0x17e...',
'<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName...')
called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Transport/HTTP.pm line 327

SOAP::Transport::HTTP::Server::handle('Bugzilla::WebService::XMLRPC::Transport::HTTP::CGI=HASH(0x17e...')
called at /usr/lib/perl5/vendor_perl/5.8.8/SOAP/Transport/HTTP.pm line 423

SOAP::Transport::HTTP::CGI::handle('Bugzilla::WebService::XMLRPC::Transport::HTTP::CGI=HASH(0x17e...')
called at /var/www/html/bugzilla/xmlrpc.cgi line 56




--
Marc Schoenefeld / Red Hat Security Response Team

Comment 2 Kevin Baker 2008-08-07 15:58:11 UTC
From "Gideon Naim" <gideon.naim>

--
Hi,
 
Tried to open a bug and got the following error.
 
Thanks,
Gideon Naim
 
Software error:
DBD::mysql::st execute failed: Duplicate entry '458316-154848' for key 1 [for Statement "INSERT INTO cc (bug_id, who) VALUES (?,?)" with ParamValues: 1='154848', 0='458316'] at Bugzilla/Bug.pm line 426
        Bugzilla::Bug::create('Bugzilla::Bug', 'HASH(0xccc26c0)') called at /var/www/html/bugzilla/post_bug.cgi line 184

Comment 3 Noura El hawary 2008-08-07 18:03:36 UTC
Created attachment 313727 [details]
v1 patch to removed duplicate ccid entries to the cc table.

Bascially the array @tempccids was causing duplicate ccid entries into the array @$cc_ids ,, so i replaced the array @tempccids with the hash %tempccids to prevent  duplicates into the @$cc_ids.

patch is applied to bz-web2 if you would like to test it there.

Noura

Comment 4 David Lawrence 2008-08-07 19:13:39 UTC
Comment on attachment 313727 [details]
v1 patch to removed duplicate ccid entries to the cc table.

Looks good Noura. I am going to go ahead and check this in so we can push it out today.

Thanks!
Dave


Note You need to log in before you can comment on or make changes to this bug.