When comparing FlmRecords if a field is empty, we cannot compare the data type - because it is not guaranteed to be preserved.
git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@96 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
@@ -2155,15 +2155,6 @@ RCODE IFlmTestImpl::compareRecords(
|
||||
pszDb2, (unsigned)uiLevel2);
|
||||
goto Exit;
|
||||
}
|
||||
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;
|
||||
}
|
||||
if (uiDataLength1 != uiDataLength2)
|
||||
{
|
||||
rc = RC_SET( FERR_FAILURE);
|
||||
@@ -2173,6 +2164,21 @@ RCODE IFlmTestImpl::compareRecords(
|
||||
pszDb2, (unsigned)uiDataLength2);
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
// Data type is not guaranteed to be preserved if there is no data.
|
||||
|
||||
if (uiDataLength1)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
if (uiEncLength1 != uiEncLength2)
|
||||
{
|
||||
rc = RC_SET( FERR_FAILURE);
|
||||
|
||||
Reference in New Issue
Block a user