Bug 453174 - Foreign Key Constraint Needed for users and group_users Tables
Foreign Key Constraint Needed for users and group_users Tables
Status: CLOSED WONTFIX
Product: JBoss Customer Support Portal
Classification: Retired
Component: Web-General (Show other bugs)
1.3.9
All All
low Severity low
: ---
: ---
Assigned To: Nathan Lugert
David Spalding
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-27 13:42 EDT by John Sanda
Modified: 2015-01-19 19:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-01-05 13:34:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Sanda 2008-06-27 13:42:07 EDT
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 13:43:49 EDT
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 13:34:28 EST
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.