The bind_type of the column stored in the StatementData object was not copied over to the ColumnData object created for each row. This means that the ColumnData destructor will not free the allocated buffer used with SQLGetData.
Additionally, for SQL_C_BINARY columns, the data was never freed either since the destructor only checked for SQL_C_CHAR and SQL_C_WCHAR.
Finally, because long data allocations are created using malloc/realloc, we need to set a flag to use free instead of delete[] in the destructor. On platforms we support, this shouldn't actually make any difference, but it is mandated by the spec and reduces noise in valgrind.
The bind_type of the column stored in the StatementData object was not copied over to the ColumnData object created for each row. This means that the ColumnData destructor will not free the allocated buffer used with SQLGetData.
Additionally, for SQL_C_BINARY columns, the data was never freed either since the destructor only checked for SQL_C_CHAR and SQL_C_WCHAR.
Finally, because long data allocations are created using malloc/realloc, we need to set a flag to use free instead of delete[] in the destructor. On platforms we support, this shouldn't actually make any difference, but it is mandated by the spec and reduces noise in valgrind.
Signed-off-by: Kevin Adler kadler@us.ibm.com Fixes #304