Bug 113128 - Hierarchy Denormalization fails when adding a subgroup to a group in certain cases
Hierarchy Denormalization fails when adding a subgroup to a group in certain ...
Status: CLOSED RAWHIDE
Product: Red Hat Web Application Framework
Classification: Retired
Component: other (Show other bugs)
nightly
All Linux
high Severity high
: ---
: ---
Assigned To: Archit Shah
Jon Orris
:
Depends On:
Blocks: 106481
  Show dependency treegraph
 
Reported: 2004-01-08 13:39 EST by Brett Prucha
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-28 14:29:27 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)
Package Hierarchy Denormalization Fix (5.93 KB, patch)
2004-01-08 13:41 EST, Brett Prucha
no flags Details | Diff

  None (edit)
Description Brett Prucha 2004-01-08 13:39:04 EST
Description of problem:

Hierarchy Denormalization fails when adding a subgroup to a group 
when that group is a subgroup to another group with more than one 
path.

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


How reproducible:

Every time


Steps to Reproduce/Actual results/Expected results:

1. create group1, group2, group3, and group4

2. create a group subgroup map like so

 |- group1
 |  |- group2
 |  |  |- group3
 |  |- group3
 |- group4

group_subgroup_trans_index looks like the following:

group_id    subgroup_id    n_paths
^^^^^^^^    ^^^^^^^^^^^    ^^^^^^^
group1      group1         0
group1      group2         1
group1      group3         2

3. place group4 under group3

 |- group1
 |  |- group2
 |  |  |- group3
 |  |     |- group4
 |  |- group3
 |  |  |- group4

group_subgroup_trans_index looks like the following:

group_id    subgroup_id    n_paths
^^^^^^^^    ^^^^^^^^^^^    ^^^^^^^
group1      group1         0
group1      group2         1
group1      group3         2
group1      group4         1 <--- note: should be 2

4. remove group3 as a subgroup of group2

 |- group1
 |  |- group2
 |  |- group3
 |  |  |- group4

group_subgroup_trans_index looks like the following:

group_id    subgroup_id    n_paths
^^^^^^^^    ^^^^^^^^^^^    ^^^^^^^
group1      group1         0
group1      group2         1
group1      group3         1

Note: group4 is not a subgroup of group1 according to 
group_subgroup_trans_index but it should be!


Additional info:

I am attaching a fix.  I am running MS SQL Server 2000 so have only 
tested it with that database.  I just translated the MS SQL Server 
logic into PL/SQL and don't even know if it complies but if not you 
should get the idea.
Comment 1 Brett Prucha 2004-01-08 13:41:41 EST
Created attachment 96835 [details]
Package Hierarchy Denormalization Fix
Comment 2 Richard Li 2004-01-08 13:59:07 EST
When did you port the code?

A similar problem was identified in Sept, and fixed on the tip @36509
(Sept 30) for Oracle. This fix was then accidentally lost on Oct 23,
and then re-fixed on Nov 3. It was ported to the Postgres
denormalization on 
November 3.

Assigning to ashah to verify.
Comment 3 Brett Prucha 2004-01-08 14:25:35 EST
I ported it from the 5.3.0 nightly builds 08.11.2003 however I 
compared it to 6.1.0 nightly build 12.13.2003 and it was the same.
Comment 4 Archit Shah 2004-01-26 18:26:09 EST
Fixed (@39777). I modified the patch slightly (for aesthetics) and
applied to both oracle and postgres.

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