Github user robertamarton commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/203#discussion_r49617157
--- Diff: core/sql/lib_mgmt/src/main/resources/init_libmgmt.sh ---
@@ -0,0 +1,196 @@
+#!/bin/bash
+# @@@ START COPYRIGHT @@@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# @@@ END COPYRIGHT @@@
+
+SERVER_JAR=${MY_SQROOT}/export/lib/lib_mgmt.jar
+CI=sqlci
+CATALOG_NAME=TRAFODION
+LIB_SCHEMA="DB_LIBMGR"
+DB__LIBMGRROLE=DB_LIBMGRROLE
+LIB_NAME=LIBMGMTNAME
+
+function dropAndCreateSchema {
+ echo "Creating Schema for ${LIB_SCHEMA}"
+ ${CI} << sqlciEOF
+
+ cqd CAT_IGNORE_ALREADY_EXISTS_ERROR 'on';
+ cqd CAT_IGNORE_DOES_NOT_EXIST_ERROR 'on';
+
+ DROP SCHEMA $CATALOG_NAME.$LIB_SCHEMA CLEANUP CASCADE;
+ CREATE SCHEMA $CATALOG_NAME.$LIB_SCHEMA;
+ set schema $CATALOG_NAME.$LIB_SCHEMA;
+ DROP LIBRARY ${LIB_NAME} CASCADE;
+ CREATE LIBRARY ${LIB_NAME} FILE '${SERVER_JAR}';
+ CREATE ROLE ${DB__LIBMGRROLE};
+
+ cqd CAT_IGNORE_ALREADY_EXISTS_ERROR 'off';
+ cqd CAT_IGNORE_DOES_NOT_EXIST_ERROR 'off';
+
+ exit;
--- End diff --
This does not concern your code change but if you want initialize/upgrade
trafodion to create the the DB_LIBMGR schema, let me know. It looks like we
may be supporting an upgrade. Also, if you want initialize/upgrade
authorization to create the DB_LIBMGRROLE, I can add it also. I have been
asked to add another system role so it would be simple enough to do.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---