Project

General

Profile

Actions

Bug #537

closed

SQL error when first insert a new record into xml_replication table

Added by Jing Tao almost 22 years ago. Updated almost 22 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
metacat
Target version:
Start date:
06/17/2002
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
537

Description

When we first time to insert a server into xml_replication table from web
browser by sneding a get command line
(http://pine.nceas.ucsb.edu/servlet/replication?action=servercontrol&server=devx%x%
subaction=add&replicate=1
it always get a error in metacat:
java.sql.SQLException: ERROR: Cannot insert a duplicate key into unique index
xml_replication_pk

But if you try again, the error will not happen. So It always happend in the
first time to insert a new xml_replication table.

Actions #1

Updated by Jing Tao almost 22 years ago

In xmltables.sql, When creating xml_replication table, a entry for local host
was added. the line looks like:
INSERT INTO xml_replication (serverid, server, replicate, datareplicate, hub)
VALUES ('1', 'localhost', '0', '0', '0');
But serverid is primary key and it is auto sequence number. I though if we
force to add 1 for serverid will cause problem.
When I remove it, the error is gone.

Actions #2

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 537

Actions

Also available in: Atom PDF