Repository: phoenix Updated Branches: refs/heads/txn a39b62793 -> e9b509dd8
Test fixes Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/e9b509dd Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/e9b509dd Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/e9b509dd Branch: refs/heads/txn Commit: e9b509dd88c25c7538e3b1af2d1a274362f45af2 Parents: a39b627 Author: Thomas <[email protected]> Authored: Tue Apr 7 21:21:59 2015 -0700 Committer: Thomas <[email protected]> Committed: Tue Apr 7 21:21:59 2015 -0700 ---------------------------------------------------------------------- .../org/apache/phoenix/index/IndexMetaDataCacheFactory.java | 2 +- .../apache/phoenix/query/ConnectionQueryServicesImpl.java | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/e9b509dd/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMetaDataCacheFactory.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMetaDataCacheFactory.java b/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMetaDataCacheFactory.java index 8b1ee18..50e9d94 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMetaDataCacheFactory.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMetaDataCacheFactory.java @@ -52,7 +52,7 @@ public class IndexMetaDataCacheFactory implements ServerCacheFactory { IndexMaintainer.deserialize(cachePtr, GenericKeyValueBuilder.INSTANCE); final Transaction txn; try { - txn = TransactionUtil.decodeTxnState(txState); + txn = txState.length!=0 ? TransactionUtil.decodeTxnState(txState) : null; } catch (IOException e) { throw new SQLException(e); } http://git-wip-us.apache.org/repos/asf/phoenix/blob/e9b509dd/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 c14aa60..dae7939 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 @@ -137,6 +137,7 @@ import org.apache.phoenix.schema.SequenceKey; import org.apache.phoenix.schema.TableAlreadyExistsException; import org.apache.phoenix.schema.TableNotFoundException; import org.apache.phoenix.schema.TableProperty; +import org.apache.phoenix.schema.TableRef; import org.apache.phoenix.schema.stats.PTableStats; import org.apache.phoenix.schema.stats.StatisticsUtil; import org.apache.phoenix.schema.types.PBoolean; @@ -1644,7 +1645,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement // invalid property - neither of HTableProp, HColumnProp or PhoenixTableProp // FIXME: This isn't getting triggered as currently a property gets evaluated // as HTableProp if its neither HColumnProp or PhoenixTableProp. - throw new SQLExceptionInfo.Builder(SQLExceptionCode.SET_UNSUPPORTED_PROP_ON_ALTER_TABLE) + throw new SQLExceptionInfo.Builder(SQLExceptionCode.CANNOT_ALTER_PROPERTY) .setMessage("Column Family: " + family + ", Property: " + propName).build() .buildException(); } @@ -2062,12 +2063,10 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement @Override public MutationState updateData(MutationPlan plan) throws SQLException { - PTable table = plan.getContext().getCurrentTable().getTable(); - HTableDescriptor desc = this.getTableDescriptor(table.getPhysicalName().getBytes()); - if (table.isTransactional()) { + TableRef currentTable = plan.getContext().getCurrentTable(); + if (currentTable!=null && currentTable.getTable().isTransactional()) { return new MutationState(1, plan.getConnection()); } - return plan.execute(); }
