Bug 453174 - Foreign Key Constraint Needed for users and group_users Tables
Foreign Key Constraint Needed for users and group_users Tables
Product: JBoss Customer Support Portal
Classification: Retired
Component: Web-General (Show other bugs)
All All
low Severity low
: ---
: ---
Assigned To: Nathan Lugert
David Spalding
Depends On:
  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:
Last Closed: 2011-01-05 13:34:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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:
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
2008-06-27 10:22:58,402 ERROR [STDERR]  at
2008-06-27 10:22:58,402 ERROR [STDERR]  at
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.