Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rrrlasse committed Jan 29, 2013
1 parent b801b67 commit 9d3efa5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions TightDB.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@
<ClCompile Include="src\tightdb\utf8.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="src\tightdb\utilities.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="src\tightdb\alloc_slab.cpp">
<Filter>src</Filter>
</ClCompile>
Expand Down Expand Up @@ -167,6 +164,9 @@
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="test\performance\timer.cpp" />
<ClCompile Include="src\tightdb\utilities.cpp">
<Filter>test</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\win32\pthread\pthread.h">
Expand Down
9 changes: 5 additions & 4 deletions src/tightdb/query_engine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ template <class TConditionValue, class TConditionFunction> class NODE: public Pa
m_condition_column = column;
m_leaf_end = 0;
m_value = value;
m_conds = 1;
m_conds = 0;
}

void Init(const Table& table)
Expand Down Expand Up @@ -607,6 +607,8 @@ template <class TConditionValue, class TConditionFunction> class NODE: public Pa
template <ACTION TAction, class TResult, class unused>
size_t aggregate_local(QueryStateParent* st, size_t start, size_t end, size_t local_limit,
SequentialGetterParent* source_column, size_t* matchcount) {


TConditionFunction f;
int c = f.condition();

Expand All @@ -630,8 +632,7 @@ template <class TConditionValue, class TConditionFunction> class NODE: public Pa
else
end2 = end - m_leaf_start;

if (m_conds <= 1 && source_column == NULL) {

if (m_conds <= 1 && source_column != NULL && SameType<TResult, int64_t>::value && static_cast<SequentialGetter<int64_t>*>(source_column)->m_column == m_condition_column) {
m_array.find(c, TAction, m_value, s - m_leaf_start, end2, m_leaf_start, (QueryState<int64_t>*)st);
}
else {
Expand Down Expand Up @@ -805,7 +806,7 @@ template <class TConditionValue, class TConditionFunction> class BASICNODE: publ
m_condition_column.m_column = (ColType*)column;
m_condition_column.m_leaf_end = 0;
m_value = value;
m_conds = 1;
m_conds = 0;
}

void Init(const Table& table)
Expand Down

0 comments on commit 9d3efa5

Please sign in to comment.