Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 09d9eddbb -> 341d846ca


PHOENIX-2918 Fix backward compat for APPEND_ONLY_SCHEMA and AUTO_PARTITION_SEQ 
features


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 341d846ca6eef8295b1490c564900b545dd181e6
Parents: 09d9edd
Author: James Taylor <[email protected]>
Authored: Thu May 19 13:48:32 2016 -0700
Committer: James Taylor <[email protected]>
Committed: Thu May 19 13:54:05 2016 -0700

----------------------------------------------------------------------
 .../apache/phoenix/coprocessor/MetaDataProtocol.java   |  2 +-
 .../phoenix/query/ConnectionQueryServicesImpl.java     | 13 ++++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/341d846c/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
index f847b97..df00f8f 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
@@ -79,7 +79,7 @@ public abstract class MetaDataProtocol extends 
MetaDataService {
     public static final long MIN_SYSTEM_TABLE_TIMESTAMP_4_5_0 = 
MIN_TABLE_TIMESTAMP + 8;
     public static final long MIN_SYSTEM_TABLE_TIMESTAMP_4_6_0 = 
MIN_TABLE_TIMESTAMP + 9;
     public static final long MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0 = 
MIN_TABLE_TIMESTAMP + 15;
-    public static final long MIN_SYSTEM_TABLE_TIMESTAMP_4_8_0 = 
MIN_TABLE_TIMESTAMP + 16;
+    public static final long MIN_SYSTEM_TABLE_TIMESTAMP_4_8_0 = 
MIN_TABLE_TIMESTAMP + 18;
     // MIN_SYSTEM_TABLE_TIMESTAMP needs to be set to the max of all the 
MIN_SYSTEM_TABLE_TIMESTAMP_* constants
     public static final long MIN_SYSTEM_TABLE_TIMESTAMP = 
MIN_SYSTEM_TABLE_TIMESTAMP_4_8_0;
     // TODO: pare this down to minimum, as we don't need duplicates for both 
table and column errors, nor should we need

http://git-wip-us.apache.org/repos/asf/phoenix/blob/341d846c/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 bd38894..cf0bdbb 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
@@ -175,6 +175,7 @@ import org.apache.phoenix.schema.types.PDataType;
 import org.apache.phoenix.schema.types.PInteger;
 import org.apache.phoenix.schema.types.PLong;
 import org.apache.phoenix.schema.types.PUnsignedTinyint;
+import org.apache.phoenix.schema.types.PVarchar;
 import org.apache.phoenix.util.ByteUtil;
 import org.apache.phoenix.util.Closeables;
 import org.apache.phoenix.util.ConfigUtil;
@@ -2476,9 +2477,19 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
                                 if (currentServerSideTableTimeStamp < 
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_8_0) {
                                     metaConnection = 
addColumnsIfNotExists(metaConnection,
                                             
PhoenixDatabaseMetaData.SYSTEM_CATALOG,
-                                            
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_8_0,
+                                            
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_8_0 - 2,
                                             
PhoenixDatabaseMetaData.IS_NAMESPACE_MAPPED + " "
                                                     + 
PBoolean.INSTANCE.getSqlTypeName());
+                                    metaConnection = 
addColumnsIfNotExists(metaConnection,
+                                            
PhoenixDatabaseMetaData.SYSTEM_CATALOG,
+                                            
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_8_0 - 1,
+                                            
PhoenixDatabaseMetaData.AUTO_PARTITION_SEQ + " "
+                                                    + 
PVarchar.INSTANCE.getSqlTypeName());
+                                    metaConnection = 
addColumnsIfNotExists(metaConnection,
+                                            
PhoenixDatabaseMetaData.SYSTEM_CATALOG,
+                                            
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_8_0,
+                                            
PhoenixDatabaseMetaData.APPEND_ONLY_SCHEMA + " "
+                                                    + 
PBoolean.INSTANCE.getSqlTypeName());
                                     
ConnectionQueryServicesImpl.this.removeTable(null,
                                             
PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME, null,
                                             
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_8_0);

Reply via email to