This is an automated email from the ASF dual-hosted git repository.
anishek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 4238608 HIVE-24102: Add ENGINE=InnoDB for replication mysql schema
changes and not exists clause for the table creation Export (Aasha Medhi,
reviewed by Pravin Kumar Sinha)
4238608 is described below
commit 42386088256c260d5abff1db0cd1149ac3a956a0
Author: Anishek Agarwal <[email protected]>
AuthorDate: Wed Sep 2 12:23:48 2020 +0530
HIVE-24102: Add ENGINE=InnoDB for replication mysql schema changes and not
exists clause for the table creation
Export (Aasha Medhi, reviewed by Pravin Kumar Sinha)
---
.../metastore-server/src/main/sql/mysql/hive-schema-4.0.0.mysql.sql | 4 ++--
.../src/main/sql/mysql/upgrade-3.2.0-to-4.0.0.mysql.sql | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git
a/standalone-metastore/metastore-server/src/main/sql/mysql/hive-schema-4.0.0.mysql.sql
b/standalone-metastore/metastore-server/src/main/sql/mysql/hive-schema-4.0.0.mysql.sql
index 0d0374c..bce7938 100644
---
a/standalone-metastore/metastore-server/src/main/sql/mysql/hive-schema-4.0.0.mysql.sql
+++
b/standalone-metastore/metastore-server/src/main/sql/mysql/hive-schema-4.0.0.mysql.sql
@@ -1245,7 +1245,7 @@ CREATE INDEX IDX_SCHEDULED_EXECUTIONS_SCHEDULED_QUERY_ID
ON SCHEDULED_EXECUTIONS
CREATE UNIQUE INDEX UNIQUE_SCHEDULED_EXECUTIONS_ID ON SCHEDULED_EXECUTIONS
(SCHEDULED_EXECUTION_ID);
-- Create table replication metrics
-CREATE TABLE REPLICATION_METRICS (
+CREATE TABLE IF NOT EXISTS REPLICATION_METRICS (
RM_SCHEDULED_EXECUTION_ID bigint NOT NULL,
RM_POLICY varchar(256) NOT NULL,
RM_DUMP_EXECUTION_ID bigint NOT NULL,
@@ -1253,7 +1253,7 @@ CREATE TABLE REPLICATION_METRICS (
RM_PROGRESS varchar(4000),
RM_START_TIME integer NOT NULL,
PRIMARY KEY(RM_SCHEDULED_EXECUTION_ID)
-);
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Create indexes for the replication metrics table
CREATE INDEX POLICY_IDX ON REPLICATION_METRICS (RM_POLICY);
diff --git
a/standalone-metastore/metastore-server/src/main/sql/mysql/upgrade-3.2.0-to-4.0.0.mysql.sql
b/standalone-metastore/metastore-server/src/main/sql/mysql/upgrade-3.2.0-to-4.0.0.mysql.sql
index acf09c1..938ed17 100644
---
a/standalone-metastore/metastore-server/src/main/sql/mysql/upgrade-3.2.0-to-4.0.0.mysql.sql
+++
b/standalone-metastore/metastore-server/src/main/sql/mysql/upgrade-3.2.0-to-4.0.0.mysql.sql
@@ -95,7 +95,7 @@ RENAME TABLE NEXT_TXN_ID TO TXN_LOCK_TBL;
ALTER TABLE TXN_LOCK_TBL CHANGE NTXN_NEXT TXN_LOCK bigint;
-- Create table replication metrics
-CREATE TABLE REPLICATION_METRICS (
+CREATE TABLE IF NOT EXISTS REPLICATION_METRICS (
RM_SCHEDULED_EXECUTION_ID bigint NOT NULL,
RM_POLICY varchar(256) NOT NULL,
RM_DUMP_EXECUTION_ID bigint NOT NULL,
@@ -103,7 +103,7 @@ CREATE TABLE REPLICATION_METRICS (
RM_PROGRESS varchar(4000),
RM_START_TIME integer NOT NULL,
PRIMARY KEY(RM_SCHEDULED_EXECUTION_ID)
-);
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Create indexes for the replication metrics table
CREATE INDEX POLICY_IDX ON REPLICATION_METRICS (RM_POLICY);