Product Documentation

c-treeACE V10.3 Release Notes

Previous Topic

Next Topic

CTDB - SetFieldAsBigint may fail with OVERFLOW error when setting CT_INT4U fields

An overflow error was seen when importing a table with a 4-byte unsigned field into SQL and promoting the unsigned fields BIGINTs in SQL. This error may have been seen when inserting or updating values which are beyond the upper limit of a 4-byte signed field.

The ctdbSetFieldAsBigint() function called when the actual field in the table is a CT_INT4U, calls ctdbBigIntToLong() which returns a signed 4-byte integer.

This situation has been corrected by implementing a new c-treeDB function, ctdbBigIntToULong, which returns an unsigned long (4-byte integer):

ctdbBigIntToULong(value)

  • value [IN]
  • pLong [OUT]
  • Returns CTDBRET_OK on success)

This function is now used in ctdbSetFieldAsBigint() to return an unsigned long when converting a 4-byte unsigned field.

TOCIndex