Github user robertamarton commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1721#discussion_r225014889
--- Diff: core/sql/sqlcomp/CmpSeabaseDDLinitraf.cpp ---
@@ -692,7 +675,62 @@ short CmpSeabaseDDL::initTrafMD(CmpDDLwithStatusInfo
*dws)
} // switch
}
break;
+ case IT_CREATE_LIBRARIES:
+ {
+ switch (dws->subStep())
+ {
+ case 0:
+ {
+ setValuesInDWS(dws, IT_NO_CHANGE,
+ "Create Libraries Tables: Started", 1,
FALSE,
+ TRUE, FALSE, FALSE);
+
+ return 0;
+ }
+ break;
+
+ case 1:
+ {
+ ExeCliInterface cliInterface(STMTHEAP, 0, NULL,
+
CmpCommon::context()->sqlSession()->getParentQid());
+ if (createLibrariesObject(&cliInterface))
+ {
+ setValuesInDWS(dws, IT_STEP_FAILED,
+ "Create Libraries Tables: Failed", 0,
TRUE,
+ FALSE, TRUE, TRUE);
+ return 0;
+ }
+ // update SPJ info
+ // Note that this is not an existing jar file, the class
+ // loader will attempt to load the class from the
CLASSPATH if
+ // it can't find this jar
+ NAString installJar(getenv("TRAF_HOME"));
+ installJar +=
"/export/lib/trafodion-sql-currversion.jar";
+ const char* sysCat =
+
ActiveSchemaDB()->getDefaults().getValue(SEABASE_CATALOG);
+ if (updateSeabaseMDSPJ(&cliInterface, sysCat,
SEABASE_MD_SCHEMA,
+ SEABASE_VALIDATE_LIBRARY,
+
installJar.data(),SUPER_USER,SUPER_USER,
+ &seabaseMDValidateRoutineInfo,
+
sizeof(seabaseMDValidateRoutineColInfo) / sizeof(ComTdbVirtTableColumnInfo),
+ seabaseMDValidateRoutineColInfo))
+ {
+ setValuesInDWS(dws, IT_STEP_FAILED,
+ "Update MDSPJ : Failed", 0, TRUE,
+ FALSE, TRUE, TRUE);
+
+ return 0;
+ }
+ setValuesInDWS(dws, IT_CREATE_PRIVMGR_REPOS,
+ "Create Libraries Tables: Completed", 0,
TRUE,
+ FALSE, TRUE, TRUE);
--- End diff --
Note to myself, since libraries are upgraded before privmgr, I may be able
to make privmgr upgrade faster since it doesn't have to deal with library privs
- to check
---