@ -587,6 +587,8 @@ void CCDBSynchronised::pushDelta( CBitMemStream& s, CCDBStructNodeLeaf *node, ui
uint64 isNull = 1 ;
s . serialAndLog2 ( isNull , 1 ) ;
bitsize + = 1 ;
if ( VerboseDatabase )
nldebug ( " CDB: Pushing permanent value NULL for index %d prop %s " , index , node - > buildTextId ( ) . toString ( ) . c_str ( ) ) ;
}
else
{
@ -639,6 +641,23 @@ void CCDBSynchronised::pushDeltaPermanent( NLMISC::CBitMemStream& s, CCDBStructN
uint64 value ;
value = ( uint64 ) _DataContainer . getValue64 ( index ) ; // "delta from 0"
if ( node - > nullable ( ) & & value = = 0 )
{
uint64 isNull = 1 ;
s . serialAndLog2 ( isNull , 1 ) ;
bitsize + = 1 ;
if ( VerboseDatabase )
nldebug ( " CDB: Pushing permanent value NULL for index %d prop %s " , index , node - > buildTextId ( ) . toString ( ) . c_str ( ) ) ;
}
else
{
if ( node - > nullable ( ) )
{
uint64 isNull = 0 ;
s . serialAndLog2 ( isNull , 1 ) ;
bitsize + = 1 ;
}
if ( node - > type ( ) = = ICDBStructNode : : TEXT )
{
s . serialAndLog2 ( value , 32 ) ;
@ -661,6 +680,7 @@ void CCDBSynchronised::pushDeltaPermanent( NLMISC::CBitMemStream& s, CCDBStructN
nldebug ( " CDB: Pushing permanent value % " NL_I64 " d (%u bits) for index %d prop %s " , ( sint64 ) value , ( uint32 ) node - > type ( ) , index , node - > buildTextId ( ) . toString ( ) . c_str ( ) ) ;
}
}
}
else
nlwarning ( " CCDBStructNodeLeaf::writeDeltaPermanent : Property Type Unknown ('%d') -> not serialized. " , ( uint ) node - > type ( ) ) ;
}