Bug 453174 - Foreign Key Constraint Needed for users and group_users Tables
Summary: Foreign Key Constraint Needed for users and group_users Tables
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Customer Support Portal
Classification: Retired
Component: Web-General
Version: 1.3.9
Hardware: All
OS: All
low
low
Target Milestone: ---
: ---
Assignee: Nathan Lugert
QA Contact: David Spalding
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-27 17:42 UTC by John Sanda
Modified: 2015-01-20 00:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-05 18:34:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description John Sanda 2008-06-27 17:42:07 UTC
Description of problem:
The userid column in the group_users table is/should be a FK to the users table.
There is no FK key constraint however. This can lead to data anomalies in which
we have a userid in group_users and no corresponding user in the users table. We
already have this situation in QA (cspserver1.db.dev.redhat.com), and it has
resulted in NPEs in GateKeeper code. The following query will return the bad data:

select G.userid 
from group_users G
where G.userid not in (
    select U.userid
    from users U
) 


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 John Sanda 2008-06-27 17:43:49 UTC
Here is the GateKeeper exception I found in the logs on cspserver2:

2008-06-27 10:22:58,402 ERROR [STDERR] java.lang.NullPointerException
2008-06-27 10:22:58,402 ERROR [STDERR]  at
com.jboss.gatekeeper.workflow.action.batch.ActiveEntitlementRuleAction.processActiveUserEntitlementsUpdate(ActiveEntitlementRuleAction.java:57)
2008-06-27 10:22:58,402 ERROR [STDERR]  at
com.jboss.gatekeeper.workflow.action.batch.ActiveEntitlementRuleAction.process(ActiveEntitlementRuleAction.java:43)
2008-06-27 10:22:58,402 ERROR [STDERR]  at
com.jboss.gatekeeper.workflow.action.batch.BaseProcessAction.execute(BaseProcessAction.java:34)


Comment 2 David Spalding 2011-01-05 18:34:28 UTC
Superceded by Avalon. This component is no longer valid.


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