From 84b1d9da4bbbedac7a0e1d70f3e62596e99191b7 Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Wed, 31 Jul 2013 03:28:03 +0000 Subject: [PATCH] merge branch jackcess-1.2.14 changes through r764 git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@765 f203690c-595d-4dc9-a70b-905162fa7fd2 --- pom.xml | 5 +++++ src/changes/changes.xml | 6 ++++++ .../jackcess/impl/query/QueryFormat.java | 3 +++ .../healthmarketscience/jackcess/impl/query/QueryImpl.java | 6 ++++-- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 3f46735..79515ba 100644 --- a/pom.xml +++ b/pom.xml @@ -242,6 +242,11 @@ maven-changes-plugin + + + http://sourceforge.net/p/jackcess/feature-requests/%ISSUE% + + diff --git a/src/changes/changes.xml b/src/changes/changes.xml index e4887ca..5f6d758 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -4,6 +4,12 @@ Tim McCune + + + Remove extra object flags before checking query type. + + Implement handling of usagemaps for long value (MEMO/OLE) columns. diff --git a/src/java/com/healthmarketscience/jackcess/impl/query/QueryFormat.java b/src/java/com/healthmarketscience/jackcess/impl/query/QueryFormat.java index 83064c0..2da4275 100644 --- a/src/java/com/healthmarketscience/jackcess/impl/query/QueryFormat.java +++ b/src/java/com/healthmarketscience/jackcess/impl/query/QueryFormat.java @@ -58,6 +58,9 @@ public class QueryFormat // dbQProcedure = 224 // dbQAction = 240 + // mask which removes superfluous flags from object flags + static final int OBJECT_FLAG_MASK = 0XF0; + public static final String COL_ATTRIBUTE = "Attribute"; public static final String COL_EXPRESSION = "Expression"; public static final String COL_FLAG = "Flag"; diff --git a/src/java/com/healthmarketscience/jackcess/impl/query/QueryImpl.java b/src/java/com/healthmarketscience/jackcess/impl/query/QueryImpl.java index 114933a..354a276 100644 --- a/src/java/com/healthmarketscience/jackcess/impl/query/QueryImpl.java +++ b/src/java/com/healthmarketscience/jackcess/impl/query/QueryImpl.java @@ -384,8 +384,10 @@ public abstract class QueryImpl implements Query public static QueryImpl create(int objectFlag, String name, List rows, int objectId) { + // remove other object flags before testing for query type + int typeFlag = objectFlag & OBJECT_FLAG_MASK; try { - switch(objectFlag) { + switch(typeFlag) { case SELECT_QUERY_OBJECT_FLAG: return new SelectQueryImpl(name, rows, objectId); case MAKE_TABLE_QUERY_OBJECT_FLAG: @@ -407,7 +409,7 @@ public abstract class QueryImpl implements Query default: // unknown querytype throw new IllegalStateException( - "unknown query object flag " + objectFlag); + "unknown query object flag " + typeFlag); } } catch(IllegalStateException e) { LOG.warn("Failed parsing query", e); -- 2.39.5