phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeffr...@apache.org
Subject phoenix git commit: PHOENIX-1477: Phoenix 4.0 -> 4.2 upgrade doesn't work
Date Tue, 02 Dec 2014 21:49:33 GMT
Repository: phoenix
Updated Branches:
  refs/heads/4.2 bdb724d34 -> 5580da441


PHOENIX-1477: Phoenix 4.0 -> 4.2 upgrade doesn't work


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/5580da44
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/5580da44
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/5580da44

Branch: refs/heads/4.2
Commit: 5580da441f3b8cb568df694ced104c247698c618
Parents: bdb724d
Author: Jeffrey Zhong <jeffreyz@apache.org>
Authored: Tue Dec 2 13:42:26 2014 -0800
Committer: Jeffrey Zhong <jeffreyz@apache.org>
Committed: Tue Dec 2 13:46:42 2014 -0800

----------------------------------------------------------------------
 .../org/apache/phoenix/query/ConnectionQueryServicesImpl.java | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/5580da44/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 8bd99b3..63fa07a 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -1553,6 +1553,13 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices
implement
                                 // Ignore, as this will happen if the SYSTEM.CATALOG already
exists at this fixed timestamp.
                                 // A TableAlreadyExistsException is not thrown, since the
table only exists *after* this fixed timestamp.
                             } catch (TableAlreadyExistsException ignore) {
+                                // This will occur if we have an older SYSTEM.CATALOG and
we need to update it to include
+                                // any new columns we've added.
+                                metaConnection = addColumnsIfNotExists(metaConnection,
+                                  PhoenixDatabaseMetaData.SYSTEM_CATALOG,
+                                  MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP,
+                                  PhoenixDatabaseMetaData.INDEX_TYPE + " " + PDataType.UNSIGNED_TINYINT.getSqlTypeName()
+
+                                  ", " + PhoenixDatabaseMetaData.INDEX_DISABLE_TIMESTAMP
+ " " + PDataType.LONG.getSqlTypeName());
                             }
                             int nSaltBuckets = ConnectionQueryServicesImpl.this.props.getInt(QueryServices.SEQUENCE_SALT_BUCKETS_ATTRIB,
                                     QueryServicesOptions.DEFAULT_SEQUENCE_TABLE_SALT_BUCKETS);


Mime
View raw message