TRAFODION  Initialize authorization cannot be run in a DDL transaction As part of DDL transaction work, there is a goal to run all DDL…
TRAFODION  Initialize authorization cannot be run in a DDL transactionAs part of DDL transaction work, there is a goal to run all DDL and DDL likeoperations in a single DDL transaction. This delivery changes initializetrafodion and initialize authorization to make this happen.Prior to DDL transactions, initialize authorization would either add or dropauthorization support. Part of this required that all compiler processesassociated with the master process be killed to clear out information storedin memory. When DDL transactions were added, killing the compiler processescaused the DDL transaction to abort. This means that initialize authorizationcould not be run in DDL transation. Initialize trafodion calls initializeauthorization when security is enabled, so initialize trafodion was not ableto run in DDL transactions.A change was made to send a CmpMessageDatabaseUser request to the child arkcmpprocesses after authorization was initialized or dropped. This request isreponsible for setting appropriate memory attributes so we no longer requirearkcmps to be terminated. Changes were piggy backed on current support thatsends usernames and IDs to child arkcmps.A new method called ContextCli::updateMxcmpSession is called during initializeand drop requests. This calls send a message to associated arkcmp process toupdate session attributes for user information. It then propagates the messageto other child arkcmp processes.To make this work, the following code was changed to generate and recognize thenew message format: CmpStatement.cpp (process - CmpMessageDatabaseUser) Context.cpp (createMxcmpSession & updateMxcmpSession) ExSqlComp.cpp (resendControls)The following was changed to support DDL transactions: CmpSeabaseDDLcommon.cpp (initSeabaseAuthorization & dropSeabaseAuthorization) GenPreCode.cpp (allow DDL transaction for initialize trafodion) SqlciErrors.txt (allow initialize authorization to succeed with warnings)This also includes a change on how Trafodion processes alter user operationsthat allow predefined users to be modified by someone with the correctprivileges.