You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by je...@apache.org on 2014/12/02 22:44:37 UTC
phoenix git commit: PHOENIX-1477: Phoenix 4.0 -> 4.2 upgrade doesn't
work
Repository: phoenix
Updated Branches:
refs/heads/4.0 f57eac18e -> 429acbab7
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/429acbab
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/429acbab
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/429acbab
Branch: refs/heads/4.0
Commit: 429acbab7d2e2aabb99a6b50d1bc113462009acc
Parents: f57eac1
Author: Jeffrey Zhong <je...@apache.org>
Authored: Tue Dec 2 13:42:26 2014 -0800
Committer: Jeffrey Zhong <je...@apache.org>
Committed: Tue Dec 2 13:42:26 2014 -0800
----------------------------------------------------------------------
.../org/apache/phoenix/query/ConnectionQueryServicesImpl.java | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/429acbab/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 299b367..d443c53 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
@@ -1678,6 +1678,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);