ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Frenkiel" <dfrenk...@shoptext.com>
Subject Unique Key Constraint Violations with MySQL
Date Thu, 01 Mar 2007 21:23:59 GMT
Hello, All.

 

I just started evaluating OfBiz (with MySQL) and overall things are
going well.

 

The only issue I'm having is with unique key constraints on various
tables.

 

For example, when I hit the submit button a couple times quickly when
logging into the catalog manager, I get the following error:

 

---------------------

 

SQL Exception while executing the following:

 

INSERT INTO USER_LOGIN_HISTORY (USER_LOGIN_ID, VISIT_ID, FROM_DATE,
THRU_DATE, PARTY_ID, PASSWORD_USED, SUCCESSFUL_LOGIN,
LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP,
CREATED_TX_STAMP)

VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

 

Duplicate key or integrity constraint violation message from server:
Duplicate entry 'admin-2007-03-01 15:35:00' for key 1. Rolling back
transaction.

 

---------------------

 

The key appears to be composed of the username and the timestamp. And
since the timestamp is only granular to the second, I get a violation
when two requests come in too quickly.

 

I assume this is only a problem on MySQL. Besides dropping the primary
key from the table (or switching to Postgres) is there something simple
I can do to resolve this?

 

Thanks very much.

 

David Frenkiel

ShopText, Inc.

 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message