hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prasan...@apache.org
Subject hive git commit: HIVE-17828: Metastore: mysql upgrade scripts to 3.0.0 is broken (Prasanth Jayachandran reviewd by Sergey Shelukhin)
Date Sat, 21 Oct 2017 05:27:15 GMT
Repository: hive
Updated Branches:
  refs/heads/master a7e344554 -> 4d98fc7b5


HIVE-17828: Metastore: mysql upgrade scripts to 3.0.0 is broken (Prasanth Jayachandran reviewd
by Sergey Shelukhin)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/4d98fc7b
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/4d98fc7b
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/4d98fc7b

Branch: refs/heads/master
Commit: 4d98fc7b51c9adab82ee05e50f96fbbeb419c17c
Parents: a7e3445
Author: Prasanth Jayachandran <prasanthj@apache.org>
Authored: Fri Oct 20 22:26:36 2017 -0700
Committer: Prasanth Jayachandran <prasanthj@apache.org>
Committed: Fri Oct 20 22:26:36 2017 -0700

----------------------------------------------------------------------
 .../scripts/upgrade/mysql/046-HIVE-17566.mysql.sql  | 16 ++++++++--------
 .../upgrade/mysql/hive-schema-3.0.0.mysql.sql       | 16 ++++++++--------
 2 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/4d98fc7b/metastore/scripts/upgrade/mysql/046-HIVE-17566.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/046-HIVE-17566.mysql.sql b/metastore/scripts/upgrade/mysql/046-HIVE-17566.mysql.sql
index 25dfbe9..1affa7a 100644
--- a/metastore/scripts/upgrade/mysql/046-HIVE-17566.mysql.sql
+++ b/metastore/scripts/upgrade/mysql/046-HIVE-17566.mysql.sql
@@ -1,17 +1,17 @@
-CREATE TABLE WM_RESOURCEPLAN (
+CREATE TABLE IF NOT EXISTS WM_RESOURCEPLAN (
     `RP_ID` bigint(20) NOT NULL,
     `NAME` varchar(128) NOT NULL,
     `QUERY_PARALLELISM` int(11),
     `STATUS` varchar(20) NOT NULL,
     PRIMARY KEY (`RP_ID`),
-    KEY `UNIQUE_WM_RESOURCEPLAN` (`NAME`),
+    KEY `UNIQUE_WM_RESOURCEPLAN` (`NAME`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-CREATE TABLE WM_POOL
+CREATE TABLE IF NOT EXISTS WM_POOL
 (
     `POOL_ID` bigint(20) NOT NULL,
     `RP_ID` bigint(20) NOT NULL,
-    `PATH` varchar(1024) NOT NULL,
+    `PATH` varchar(767) NOT NULL,
     `PARENT_POOL_ID` bigint(20),
     `ALLOC_FRACTION` DOUBLE,
     `QUERY_PARALLELISM` int(11),
@@ -21,7 +21,7 @@ CREATE TABLE WM_POOL
     CONSTRAINT `WM_POOL_FK2` FOREIGN KEY (`PARENT_POOL_ID`) REFERENCES `WM_POOL` (`POOL_ID`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-CREATE TABLE WM_TRIGGER
+CREATE TABLE IF NOT EXISTS WM_TRIGGER
 (
     `TRIGGER_ID` bigint(20) NOT NULL,
     `RP_ID` bigint(20) NOT NULL,
@@ -33,7 +33,7 @@ CREATE TABLE WM_TRIGGER
     CONSTRAINT `WM_TRIGGER_FK1` FOREIGN KEY (`RP_ID`) REFERENCES `WM_RESOURCEPLAN` (`RP_ID`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-CREATE TABLE WM_POOL_TO_TRIGGER
+CREATE TABLE IF NOT EXISTS WM_POOL_TO_TRIGGER
 (
     `POOL_ID` bigint(20) NOT NULL,
     `TRIGGER_ID` bigint(20) NOT NULL,
@@ -42,14 +42,14 @@ CREATE TABLE WM_POOL_TO_TRIGGER
     CONSTRAINT `WM_POOL_TO_TRIGGER_FK2` FOREIGN KEY (`TRIGGER_ID`) REFERENCES `WM_TRIGGER`
(`TRIGGER_ID`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-CREATE TABLE WM_MAPPING
+CREATE TABLE IF NOT EXISTS WM_MAPPING
 (
     `MAPPING_ID` bigint(20) NOT NULL,
     `RP_ID` bigint(20) NOT NULL,
     `ENTITY_TYPE` varchar(10) NOT NULL,
     `ENTITY_NAME` varchar(128) NOT NULL,
     `POOL_ID` bigint(20) NOT NULL,
-    `ORDERING int,
+    `ORDERING` int,
     PRIMARY KEY (`MAPPING_ID`),
     KEY `UNIQUE_WM_MAPPING` (`RP_ID`, `ENTITY_TYPE`, `ENTITY_NAME`),
     CONSTRAINT `WM_MAPPING_FK1` FOREIGN KEY (`RP_ID`) REFERENCES `WM_RESOURCEPLAN` (`RP_ID`),

http://git-wip-us.apache.org/repos/asf/hive/blob/4d98fc7b/metastore/scripts/upgrade/mysql/hive-schema-3.0.0.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/hive-schema-3.0.0.mysql.sql b/metastore/scripts/upgrade/mysql/hive-schema-3.0.0.mysql.sql
index 0a02630..2453bb9 100644
--- a/metastore/scripts/upgrade/mysql/hive-schema-3.0.0.mysql.sql
+++ b/metastore/scripts/upgrade/mysql/hive-schema-3.0.0.mysql.sql
@@ -849,20 +849,20 @@ CREATE TABLE IF NOT EXISTS `METASTORE_DB_PROPERTIES` (
 -- ---------------------
 -- Resource plan tables.
 -- ---------------------
-CREATE TABLE WM_RESOURCEPLAN (
+CREATE TABLE IF NOT EXISTS WM_RESOURCEPLAN (
     `RP_ID` bigint(20) NOT NULL,
     `NAME` varchar(128) NOT NULL,
     `QUERY_PARALLELISM` int(11),
     `STATUS` varchar(20) NOT NULL,
     PRIMARY KEY (`RP_ID`),
-    KEY `UNIQUE_WM_RESOURCEPLAN` (`NAME`),
+    KEY `UNIQUE_WM_RESOURCEPLAN` (`NAME`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-CREATE TABLE WM_POOL
+CREATE TABLE IF NOT EXISTS WM_POOL
 (
     `POOL_ID` bigint(20) NOT NULL,
     `RP_ID` bigint(20) NOT NULL,
-    `PATH` varchar(1024) NOT NULL,
+    `PATH` varchar(767) NOT NULL,
     `PARENT_POOL_ID` bigint(20),
     `ALLOC_FRACTION` DOUBLE,
     `QUERY_PARALLELISM` int(11),
@@ -872,7 +872,7 @@ CREATE TABLE WM_POOL
     CONSTRAINT `WM_POOL_FK2` FOREIGN KEY (`PARENT_POOL_ID`) REFERENCES `WM_POOL` (`POOL_ID`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-CREATE TABLE WM_TRIGGER
+CREATE TABLE IF NOT EXISTS WM_TRIGGER
 (
     `TRIGGER_ID` bigint(20) NOT NULL,
     `RP_ID` bigint(20) NOT NULL,
@@ -884,7 +884,7 @@ CREATE TABLE WM_TRIGGER
     CONSTRAINT `WM_TRIGGER_FK1` FOREIGN KEY (`RP_ID`) REFERENCES `WM_RESOURCEPLAN` (`RP_ID`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-CREATE TABLE WM_POOL_TO_TRIGGER
+CREATE TABLE IF NOT EXISTS WM_POOL_TO_TRIGGER
 (
     `POOL_ID` bigint(20) NOT NULL,
     `TRIGGER_ID` bigint(20) NOT NULL,
@@ -893,14 +893,14 @@ CREATE TABLE WM_POOL_TO_TRIGGER
     CONSTRAINT `WM_POOL_TO_TRIGGER_FK2` FOREIGN KEY (`TRIGGER_ID`) REFERENCES `WM_TRIGGER`
(`TRIGGER_ID`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-CREATE TABLE WM_MAPPING
+CREATE TABLE IF NOT EXISTS WM_MAPPING
 (
     `MAPPING_ID` bigint(20) NOT NULL,
     `RP_ID` bigint(20) NOT NULL,
     `ENTITY_TYPE` varchar(10) NOT NULL,
     `ENTITY_NAME` varchar(128) NOT NULL,
     `POOL_ID` bigint(20) NOT NULL,
-    `ORDERING int,
+    `ORDERING` int,
     PRIMARY KEY (`MAPPING_ID`),
     KEY `UNIQUE_WM_MAPPING` (`RP_ID`, `ENTITY_TYPE`, `ENTITY_NAME`),
     CONSTRAINT `WM_MAPPING_FK1` FOREIGN KEY (`RP_ID`) REFERENCES `WM_RESOURCEPLAN` (`RP_ID`),


Mime
View raw message