Modified so that we only don't compare field types if the field number is one of our reserved fields.

git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@97 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
dsandersoremutah
2006-02-10 00:05:09 +00:00
parent d9e797d647
commit f168be6724

View File

@@ -2165,19 +2165,22 @@ RCODE IFlmTestImpl::compareRecords(
goto Exit;
}
// Data type is not guaranteed to be preserved if there is no data.
// Data type may not match for FLAIM's reserved field numbers. This is because
// FLAIM does not store the field type for these fields - it just assumes that
// they are FLM_TEXT_TYPE. However, we also have some code where FLAIM puts
// a FLM_CONTEXT_TYPE into the field when it is created inside a FlmRecord
// object. If that object remains cached, but the one we are comparing it to
// is not cached, we would have a mismatch. Hence, we simply ignore field
// type for these fields.
if (uiDataLength1)
if (uiDataType1 != uiDataType2 && uiFieldNum1 < FLM_DICT_FIELD_NUMS)
{
if (uiDataType1 != uiDataType2)
{
rc = RC_SET( FERR_FAILURE);
f_sprintf( m_szFailInfo, "Field Type mismatch in %s, Fld: %u, %s: %u, %s: %u",
pszWhat, (unsigned)uiFieldNum1,
pszDb1, (unsigned)uiDataType1,
pszDb2, (unsigned)uiDataType2);
goto Exit;
}
rc = RC_SET( FERR_FAILURE);
f_sprintf( m_szFailInfo, "Field Type mismatch in %s, Fld: %u, %s: %u, %s: %u",
pszWhat, (unsigned)uiFieldNum1,
pszDb1, (unsigned)uiDataType1,
pszDb2, (unsigned)uiDataType2);
goto Exit;
}
if (uiEncLength1 != uiEncLength2)
{