You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ng...@apache.org on 2020/03/20 18:39:48 UTC
[hive] branch branch-3 updated: HIVE-23033:MSSQL metastore schema
init script doesn't initialize NOTIFICATION_SEQUENCE (David Lavati via
Naveen Gangam)
This is an automated email from the ASF dual-hosted git repository.
ngangam pushed a commit to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/branch-3 by this push:
new 5ed2ec0 HIVE-23033:MSSQL metastore schema init script doesn't initialize NOTIFICATION_SEQUENCE (David Lavati via Naveen Gangam)
5ed2ec0 is described below
commit 5ed2ec060665a86b7de310f86814495644cbcaa3
Author: Naveen Gangam <ng...@cloudera.com>
AuthorDate: Fri Mar 20 14:39:32 2020 -0400
HIVE-23033:MSSQL metastore schema init script doesn't initialize NOTIFICATION_SEQUENCE (David Lavati via Naveen Gangam)
---
standalone-metastore/src/main/sql/mssql/hive-schema-3.2.0.mssql.sql | 2 ++
.../src/main/sql/mssql/upgrade-3.1.0-to-3.2.0.mssql.sql | 2 ++
2 files changed, 4 insertions(+)
diff --git a/standalone-metastore/src/main/sql/mssql/hive-schema-3.2.0.mssql.sql b/standalone-metastore/src/main/sql/mssql/hive-schema-3.2.0.mssql.sql
index cd04b4c..4543fa1 100644
--- a/standalone-metastore/src/main/sql/mssql/hive-schema-3.2.0.mssql.sql
+++ b/standalone-metastore/src/main/sql/mssql/hive-schema-3.2.0.mssql.sql
@@ -637,6 +637,8 @@ CREATE TABLE NOTIFICATION_SEQUENCE
ALTER TABLE NOTIFICATION_SEQUENCE ADD CONSTRAINT NOTIFICATION_SEQUENCE_PK PRIMARY KEY (NNI_ID);
+INSERT INTO NOTIFICATION_SEQUENCE (NNI_ID, NEXT_EVENT_ID) SELECT 1,1 WHERE NOT EXISTS (SELECT NEXT_EVENT_ID FROM NOTIFICATION_SEQUENCE);
+
-- Tables to manage resource plans.
CREATE TABLE WM_RESOURCEPLAN
diff --git a/standalone-metastore/src/main/sql/mssql/upgrade-3.1.0-to-3.2.0.mssql.sql b/standalone-metastore/src/main/sql/mssql/upgrade-3.1.0-to-3.2.0.mssql.sql
index cc3f263..5c8135a 100644
--- a/standalone-metastore/src/main/sql/mssql/upgrade-3.1.0-to-3.2.0.mssql.sql
+++ b/standalone-metastore/src/main/sql/mssql/upgrade-3.1.0-to-3.2.0.mssql.sql
@@ -61,6 +61,8 @@ END;
EXEC #DROP_DEFAULT_CONSTRAINT "PARTITION_PARAMS", "PARAM_VALUE";
ALTER TABLE "PARTITION_PARAMS" ALTER COLUMN "PARAM_VALUE" varchar(max);
+-- HIVE-23033
+INSERT INTO NOTIFICATION_SEQUENCE (NNI_ID, NEXT_EVENT_ID) SELECT 1,1 WHERE NOT EXISTS (SELECT NEXT_EVENT_ID FROM NOTIFICATION_SEQUENCE);
-- These lines need to be last. Insert any changes above.
UPDATE VERSION SET SCHEMA_VERSION='3.2.0', VERSION_COMMENT='Hive release version 3.2.0' where VER_ID=1;