Authorization checks for DDL & utilities Fixed issues from code comments.
LOAD/UNLOAD authorization checks:
Code was added during code generation to make sure user has privileges, if the user had necessary privileges, then the EXEUTIL parser flag is turned on to avoid further privilege checks. When load/unload completes, the parser flag is reset.
Update/showstats Statistics authorization checks:
Added a new error message Changed hs_globals to support a new isAuthorized method and store parser flags when class is instantiated and reset them when done Changed hs_cli.cpp to use new IF NOT EXISTS syntax when creating histogram tables, make owner of histogram tables DB__ROOT (will need to adjust when schema privileges happen), and clean up CreateHistTables method to remove old authorization mechanism Changed hs_update.cpp which controls the update and showstats operation to add authorization checks
Purgedata and populate index changes:
Changed CmpSeabaseDDLcommon.cpp to check privileges for purgedata Changed CmpSeabaseDDLindex.cpp to check privileges for popindex
Additional component privileges and checks:
Added support for new component privileges in PrivMgrMD.h/.cpp Added support for MANAGE_COMPONENTS Added support for CREATE_INDEX and DROP_INDEX component privs
Fixes from last delivery that were postponed:
Context.cpp - fix for previous code review CmpSeabaseDDLtable - added calls to deallocEHI PrivMgrMD - fixed wording in a comment
ComUser - added new convenience method - isRootUserID() NATable.cpp (setupPrivInfo) to always set up privInfo_ and to call the embedded compiler while extracting privileges Privilege adjustments to take advantage of privInfo stored in NATable: Added code to mark and rewind errors in diags.
Estmate NHase row count when stats not available When statistics are not available for a table, give the optimizer a better estimate of its cardinaly than the default value by reading summary information from the trailer block of the table's HFiles.