Clone
Roberta Marton <roberta.marton@hp.com>
committed
on 04 Oct 14
Fix for initialize authorization failure
and reenabled catman1 TEST133:

Initialize authorization creates a set of metadata tables and then … Show more
Fix for initialize authorization failure

and reenabled catman1 TEST133:

Initialize authorization creates a set of metadata tables and then loads

data into the OBJECT_PRIVILEGES table to specify object ownership values

It also loads data into the ROLE_USAGE table to specify role ownership

values.  Sometimes these insert..selects fail with an error 8102.  This

change does not fix the 8102 problem but fixes the code so the insert ..

select succeeds.  Bascially the insert was changed to an upsert and

sanity checks placed around calls to make sure the correct number of

rows were processed.

insertSelect code changes:

Added select count(*) from target table to make sure target table empty

Changed insert to an upsert command

After upsert added select count(*) on target table to get rows found

Compare rows in target table with expected rows -> return an error if

not equal.

This fixes the problem.  The upsert ignores duplicate rows so we

avoid the 8102 error.  The inserted versus expected number of rows make

sure the correct number of rows were processed.

Change-Id: Id701d031ab9b9c2ebdc0584b01a2b5af9fc02b26

Show less

default + 10 more