hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1605143 - in /hive/trunk/metastore/scripts/upgrade/oracle: 019-HIVE-7118.oracle.sql hive-schema-0.13.0.oracle.sql hive-txn-schema-0.13.0.oracle.sql
Date Tue, 24 Jun 2014 17:32:04 GMT
Author: gates
Date: Tue Jun 24 17:32:04 2014
New Revision: 1605143

URL: http://svn.apache.org/r1605143
Log:
HIVE-7118 Oracle upgrade schema scripts do not map Java long datatype columns correctly for
transaction related tables (Deepesh Khandelwal via Alan Gates)

Added:
    hive/trunk/metastore/scripts/upgrade/oracle/019-HIVE-7118.oracle.sql
Modified:
    hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.13.0.oracle.sql
    hive/trunk/metastore/scripts/upgrade/oracle/hive-txn-schema-0.13.0.oracle.sql

Added: hive/trunk/metastore/scripts/upgrade/oracle/019-HIVE-7118.oracle.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/oracle/019-HIVE-7118.oracle.sql?rev=1605143&view=auto
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/oracle/019-HIVE-7118.oracle.sql (added)
+++ hive/trunk/metastore/scripts/upgrade/oracle/019-HIVE-7118.oracle.sql Tue Jun 24 17:32:04
2014
@@ -0,0 +1,38 @@
+ALTER TABLE TXNS MODIFY (
+  TXN_ID NUMBER(19),
+  TXN_STARTED NUMBER(19),
+  TXN_LAST_HEARTBEAT NUMBER(19)
+);
+
+ALTER TABLE TXN_COMPONENTS MODIFY (
+  TC_TXNID NUMBER(19)
+);
+
+ALTER TABLE COMPLETED_TXN_COMPONENTS MODIFY (
+  CTC_TXNID NUMBER(19)
+);
+
+ALTER TABLE NEXT_TXN_ID MODIFY (
+  NTXN_NEXT NUMBER(19)
+);
+
+ALTER TABLE HIVE_LOCKS MODIFY (
+  HL_LOCK_EXT_ID NUMBER(19),
+  HL_LOCK_INT_ID NUMBER(19),
+  HL_TXNID NUMBER(19),
+  HL_LAST_HEARTBEAT NUMBER(19),
+  HL_ACQUIRED_AT NUMBER(19)
+);
+
+ALTER TABLE NEXT_LOCK_ID MODIFY (
+  NL_NEXT NUMBER(19)
+);
+
+ALTER TABLE COMPACTION_QUEUE MODIFY (
+  CQ_ID NUMBER(19),
+  CQ_START NUMBER(19)
+);
+
+ALTER TABLE NEXT_COMPACTION_QUEUE_ID MODIFY (
+  NCQ_NEXT NUMBER(19)
+);

Modified: hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.13.0.oracle.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.13.0.oracle.sql?rev=1605143&r1=1605142&r2=1605143&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.13.0.oracle.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.13.0.oracle.sql Tue Jun 24 17:32:04
2014
@@ -760,44 +760,44 @@ CREATE INDEX FUNC_RU_N49 ON FUNC_RU (FUN
 -- -----------------------------------------------------------------------------------------------------------------------------------------------
 
 CREATE TABLE TXNS (
-  TXN_ID NUMBER(10) PRIMARY KEY,
+  TXN_ID NUMBER(19) PRIMARY KEY,
   TXN_STATE char(1) NOT NULL,
-  TXN_STARTED NUMBER(10) NOT NULL,
-  TXN_LAST_HEARTBEAT NUMBER(10) NOT NULL,
+  TXN_STARTED NUMBER(19) NOT NULL,
+  TXN_LAST_HEARTBEAT NUMBER(19) NOT NULL,
   TXN_USER varchar(128) NOT NULL,
   TXN_HOST varchar(128) NOT NULL
 );
 
 CREATE TABLE TXN_COMPONENTS (
-  TC_TXNID NUMBER(10) REFERENCES TXNS (TXN_ID),
+  TC_TXNID NUMBER(19) REFERENCES TXNS (TXN_ID),
   TC_DATABASE VARCHAR2(128) NOT NULL,
   TC_TABLE VARCHAR2(128),
   TC_PARTITION VARCHAR2(767) NULL
 );
 
 CREATE TABLE COMPLETED_TXN_COMPONENTS (
-  CTC_TXNID NUMBER(10),
+  CTC_TXNID NUMBER(19),
   CTC_DATABASE varchar(128) NOT NULL,
   CTC_TABLE varchar(128),
   CTC_PARTITION varchar(767)
 );
 
 CREATE TABLE NEXT_TXN_ID (
-  NTXN_NEXT NUMBER(10) NOT NULL
+  NTXN_NEXT NUMBER(19) NOT NULL
 );
 INSERT INTO NEXT_TXN_ID VALUES(1);
 
 CREATE TABLE HIVE_LOCKS (
-  HL_LOCK_EXT_ID NUMBER(10) NOT NULL,
-  HL_LOCK_INT_ID NUMBER(10) NOT NULL,
-  HL_TXNID NUMBER(10),
+  HL_LOCK_EXT_ID NUMBER(19) NOT NULL,
+  HL_LOCK_INT_ID NUMBER(19) NOT NULL,
+  HL_TXNID NUMBER(19),
   HL_DB VARCHAR2(128) NOT NULL,
   HL_TABLE VARCHAR2(128),
   HL_PARTITION VARCHAR2(767),
   HL_LOCK_STATE CHAR(1) NOT NULL,
   HL_LOCK_TYPE CHAR(1) NOT NULL,
-  HL_LAST_HEARTBEAT NUMBER(10) NOT NULL,
-  HL_ACQUIRED_AT NUMBER(10),
+  HL_LAST_HEARTBEAT NUMBER(19) NOT NULL,
+  HL_ACQUIRED_AT NUMBER(19),
   HL_USER varchar(128) NOT NULL,
   HL_HOST varchar(128) NOT NULL,
   PRIMARY KEY(HL_LOCK_EXT_ID, HL_LOCK_INT_ID)
@@ -806,24 +806,24 @@ CREATE TABLE HIVE_LOCKS (
 CREATE INDEX HL_TXNID_INDEX ON HIVE_LOCKS (HL_TXNID);
 
 CREATE TABLE NEXT_LOCK_ID (
-  NL_NEXT NUMBER(10) NOT NULL
+  NL_NEXT NUMBER(19) NOT NULL
 );
 INSERT INTO NEXT_LOCK_ID VALUES(1);
 
 CREATE TABLE COMPACTION_QUEUE (
-  CQ_ID NUMBER(10) PRIMARY KEY,
+  CQ_ID NUMBER(19) PRIMARY KEY,
   CQ_DATABASE varchar(128) NOT NULL,
   CQ_TABLE varchar(128) NOT NULL,
   CQ_PARTITION varchar(767),
   CQ_STATE char(1) NOT NULL,
   CQ_TYPE char(1) NOT NULL,
   CQ_WORKER_ID varchar(128),
-  CQ_START NUMBER(10),
+  CQ_START NUMBER(19),
   CQ_RUN_AS varchar(128)
 );
 
 CREATE TABLE NEXT_COMPACTION_QUEUE_ID (
-  NCQ_NEXT NUMBER(10) NOT NULL
+  NCQ_NEXT NUMBER(19) NOT NULL
 );
 INSERT INTO NEXT_COMPACTION_QUEUE_ID VALUES(1);
 

Modified: hive/trunk/metastore/scripts/upgrade/oracle/hive-txn-schema-0.13.0.oracle.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/oracle/hive-txn-schema-0.13.0.oracle.sql?rev=1605143&r1=1605142&r2=1605143&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/oracle/hive-txn-schema-0.13.0.oracle.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/oracle/hive-txn-schema-0.13.0.oracle.sql Tue Jun
24 17:32:04 2014
@@ -18,44 +18,44 @@
 -- 
 
 CREATE TABLE TXNS (
-  TXN_ID NUMBER(10) PRIMARY KEY,
+  TXN_ID NUMBER(19) PRIMARY KEY,
   TXN_STATE char(1) NOT NULL,
-  TXN_STARTED NUMBER(10) NOT NULL,
-  TXN_LAST_HEARTBEAT NUMBER(10) NOT NULL,
+  TXN_STARTED NUMBER(19) NOT NULL,
+  TXN_LAST_HEARTBEAT NUMBER(19) NOT NULL,
   TXN_USER varchar(128) NOT NULL,
   TXN_HOST varchar(128) NOT NULL
 );
 
 CREATE TABLE TXN_COMPONENTS (
-  TC_TXNID NUMBER(10) REFERENCES TXNS (TXN_ID),
+  TC_TXNID NUMBER(19) REFERENCES TXNS (TXN_ID),
   TC_DATABASE VARCHAR2(128) NOT NULL,
   TC_TABLE VARCHAR2(128),
   TC_PARTITION VARCHAR2(767) NULL
 );
 
 CREATE TABLE COMPLETED_TXN_COMPONENTS (
-  CTC_TXNID NUMBER(10),
+  CTC_TXNID NUMBER(19),
   CTC_DATABASE varchar(128) NOT NULL,
   CTC_TABLE varchar(128),
   CTC_PARTITION varchar(767)
 );
 
 CREATE TABLE NEXT_TXN_ID (
-  NTXN_NEXT NUMBER(10) NOT NULL
+  NTXN_NEXT NUMBER(19) NOT NULL
 );
 INSERT INTO NEXT_TXN_ID VALUES(1);
 
 CREATE TABLE HIVE_LOCKS (
-  HL_LOCK_EXT_ID NUMBER(10) NOT NULL,
-  HL_LOCK_INT_ID NUMBER(10) NOT NULL,
-  HL_TXNID NUMBER(10),
+  HL_LOCK_EXT_ID NUMBER(19) NOT NULL,
+  HL_LOCK_INT_ID NUMBER(19) NOT NULL,
+  HL_TXNID NUMBER(19),
   HL_DB VARCHAR2(128) NOT NULL,
   HL_TABLE VARCHAR2(128),
   HL_PARTITION VARCHAR2(767),
   HL_LOCK_STATE CHAR(1) NOT NULL,
   HL_LOCK_TYPE CHAR(1) NOT NULL,
-  HL_LAST_HEARTBEAT NUMBER(10) NOT NULL,
-  HL_ACQUIRED_AT NUMBER(10),
+  HL_LAST_HEARTBEAT NUMBER(19) NOT NULL,
+  HL_ACQUIRED_AT NUMBER(19),
   HL_USER varchar(128) NOT NULL,
   HL_HOST varchar(128) NOT NULL,
   PRIMARY KEY(HL_LOCK_EXT_ID, HL_LOCK_INT_ID)
@@ -64,24 +64,24 @@ CREATE TABLE HIVE_LOCKS (
 CREATE INDEX HL_TXNID_INDEX ON HIVE_LOCKS (HL_TXNID);
 
 CREATE TABLE NEXT_LOCK_ID (
-  NL_NEXT NUMBER(10) NOT NULL
+  NL_NEXT NUMBER(19) NOT NULL
 );
 INSERT INTO NEXT_LOCK_ID VALUES(1);
 
 CREATE TABLE COMPACTION_QUEUE (
-  CQ_ID NUMBER(10) PRIMARY KEY,
+  CQ_ID NUMBER(19) PRIMARY KEY,
   CQ_DATABASE varchar(128) NOT NULL,
   CQ_TABLE varchar(128) NOT NULL,
   CQ_PARTITION varchar(767),
   CQ_STATE char(1) NOT NULL,
   CQ_TYPE char(1) NOT NULL,
   CQ_WORKER_ID varchar(128),
-  CQ_START NUMBER(10),
+  CQ_START NUMBER(19),
   CQ_RUN_AS varchar(128)
 );
 
 CREATE TABLE NEXT_COMPACTION_QUEUE_ID (
-  NCQ_NEXT NUMBER(10) NOT NULL
+  NCQ_NEXT NUMBER(19) NOT NULL
 );
 INSERT INTO NEXT_COMPACTION_QUEUE_ID VALUES(1);
 



Mime
View raw message