8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 00:03:03 +01:00

Use nod_sort to _copy_ correctly

This commit is contained in:
asfernandes 2010-01-20 13:24:26 +00:00
parent 47b05864d6
commit 6ec26b4285
2 changed files with 5 additions and 2 deletions

View File

@ -1795,6 +1795,9 @@ static void par_partition_by(thread_db* tdbb, CompilerScratch* csb, jrd_nod*& gr
// We have allocated groupNode with bigger length than expressions. This is to use in
// OPT_gen_sort. Now fill that info.
groupNode->nod_type = nod_sort;
for (unsigned i = 0; i < count; ++i)
{
groupNode->nod_arg[count + i * count + i] = (jrd_nod*)(IPTR) false; // ascending

View File

@ -208,8 +208,8 @@ namespace
m_outerKeys(outerKeys), m_innerKeys(innerKeys)
{
fb_assert(m_outer && m_inner && m_innerKeys->nod_count == m_outerKeys->nod_count);
fb_assert(m_outerKeys && m_outerKeys->nod_type == nod_list);
fb_assert(m_innerKeys && m_innerKeys->nod_type == nod_list);
fb_assert(m_outerKeys && (m_outerKeys->nod_type == nod_list || m_outerKeys->nod_type == nod_sort));
fb_assert(m_innerKeys && (m_innerKeys->nod_type == nod_list || m_innerKeys->nod_type == nod_sort));
m_impure = CMP_impure(csb, sizeof(Impure));
}