Releases: FreeTDS/freetds
FreeTDS 1.5.10 minor release
Added commits
odbc: Re-prepare a prepared query if it never returned a handle
Fix ABI breakage for tdsdump_open under Windows
tdsdump_open is exported by our DB-Library implementation.
Before version 1.5 tdsdump_open always accepted a const char* string, however in 1.5 this was changed to const wchar_t* for Windows to support Unicode.
This broke ABI for Windows.
Provide tdsdump_open with old ABI and a new tdsdump_wopen (Windows only).
odbc: Fix for SQL_COPT_SS_OLDPWD attribute
This attribute allows to change the password while logging to the server.
Code was wrongly taking the length of the attribute in characters instead of bytes causing a failure using wide function.
Caution
Do not use Source code links below, they are auto generated and broken.
FreeTDS 1.5.7 minor release
Added commits
ctlib: Remove leak freeing command
Release cursor while freeing command.
tsql: Avoid possible invalid type formatting a message
Specifically:
tsql.c: In function ‘do_query’:
tsql.c:292:80: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘__suseconds64_t’ {aka ‘long long int’} [-Wformat=]
292 | sprintf(message, "Total time for processing %d rows: %ld msecs\n",
| ~~^
| |
| long int
| %lld
tds: Fix bound check conversion (float -> uint)
Converting from floating point to unsigned int the bound check was incorrect resulting in invalid conversions if the input value was not in range.
Fix conversion bound checks, tsql message formatting
tds: Fix bulk copy in for Microsoft XML type
As documented, and tested, the protocol requires the usage of NVARCHAR type, not XML, which is refused causing an error.
Better test for vasprintf on VMS
Recentish CRTLs do have it, but the test I added 23 years ago was not correctly detecting it.
VMS has had vsnprintf for a long time
And this allows for a better vasprintf fallback for systems where vasprintf is not available.
Use CORK flag correctly, do not delay partial packets
Resetting TCP_CORK flag in Linux causes the partial packets to be flushed however if the queue is full partial packets are not moved to the queue.
Partial packets are then processed when space is available.
However FreeTDS used to set again the flag causing partial packets to be delayed.
Remove that delay reducing latency.
dblib: Expand buffers to hold converted floating point
Make sure there's enough space for converting the numbers.
This fixes fisql command printing real/float values.
ci: Update win-iconv version
Pick up more recent master version, already including my fix.
odbc: Accept any variable data type using DATA_AT_EXEC length
Reported in #667.
The behavior is consistent with Microsoft driver.
This caused an issue using PHP ODBC PDO driver.
odbc: Fix inserting too much data with SQLPutData
An error is returned if column is truncate.
Caution
Do not use Source code links below, they are auto generated and broken.
FreeTDS 1.5 Release
Summary of Changes in release 1.5
User visible (not in a particular order):
- Generic:
- Do not write to stdout/stderr;
- (*) Fix certificate check for hostnames with wildcards;
- (*) Update to Autoconf 2.71;
- (*) Fix conversions of "-0" numeric;
- (*) Minor compatibility for 32 bit for bulk copy;
- Distribute OpenSSL libraries with Appveyour artifacts;
- Use Unicode and wide characters for file paths for Windows;
- Remove ANSI encoding code from SSPI code, always full Unicode;
- (*) Set control method for final OpenSSL BIO to avoid some errors;
- (*) Get Windows code page using Windows API for compatibility;
- (*) Do not try to use
pthread_cond_timedwait_relative_npon newer Android; - Fix compatibility connecting to some old MSSQL 2000 server;
- (*) Support Sybase server not configured with UTF-8 charset;
- (*) Change some file license from GPL to LGPL;
- (*) Support very old Sybase ASE versions;
- (*) Ignore query errors during connection initial setup increase
compatibility with different servers like OpenServer; - Support
strictencryption for naked TLS (TDS 8.0); - (*) Don't leak allocations on syntax errors converting to binary;
- Accommodate FreeBSD/Citrus iconv;
- Fall back on unsupported address families locking for host address;
- Avoid potential hangs on short replies reading TDS packets;
- Add support for TDS 8.0;
- Reject invalid NULL data in
tds7_send_record(bulk transfer); - Allows
freetds.confto be stored in~/.config(Unix).
- ODBC:
- Fixed some attribute size for 64 bit platforms (now more compatible
with MS driver); - (*) Prevent setting some wrong type in internal decriptors;
- (*) Fix leak in
odbc_parse_connect_string; - Fix an issue compiling bcp test on 32 systems with unixODBC;
- (*) Fix getting
SQL_ATTR_METADATA_IDattribute; - Check for maximum value for
SQL_ATTR_QUERY_TIMEOUT; - (*) Return better error for invalid character set;
- Check errors from
SQLInstallDriverExWandSQLRemoveDriver; - Update some driver registration field for Windows;
- (*) Remove minor leak parsing connection string;
- Add
EncryptandHostNameInCertificatesettings; - (*) Fix bug cancelling not active statements;
- Fix
SQLGetInfoSQL_DRIVER_HSTMTandSQL_DRIVER_HDESC; - Avoid shared object version for ODBC driver;
- Allows
SERVERto overrideDSNorSERVERNAMEsettings; - Allows to set version to
AUTOfrom Windows dialog; - (*) Fix handling of
SQL_C_STINYINT; - Fix return value when bulk operation not using status array fails;
- Implement
SQLDescribeParamusingsp_describe_undeclared_parameters.
- Fixed some attribute size for 64 bit platforms (now more compatible
- Applications:
- datacopy:
- Allows copy when
dest_collen>src_collen; - Increase CREATE TABLE command buffer to accommodate larger queries.
- Allows copy when
- defncopy:
- (*) Use memory instead of temporary file;
- (*) Fix MS column length for N(VAR)CHAR types;
- (*) Quote strings and identifiers;
- (*) Handle correctly order of index recordset;
- (*) Quote key index names.
- datacopy:
- CT-Library:
- Error reporting more compatible with Sybase;
- Return CT-Library type values, not TDS ones;
- Fix
*resultlenfor conversions to SYBIMAGE fromcs_convert; - Populate
datafmt->formatto avoid not initialized values; - More debugging on not implemented
bcp_colfmt_ps; - Makes sure we don't use a negative number as string length;
- Use client type, not propagate TDS one;
- (*) Fix crash using
ct_commandwithCS_MOREoption; - (*)
_blk_get_col_data: Consistently returnTDS_FAILon failure; - (*) Formally define
BLK_VERSION_{155,157,160}; - (*) Cap binary/image copying to the destination length;
- (*) Conditionally distinguish NULL and empty results;
- (*) Issue an error for unsupported server types from
ct_describe; - Add support for setting hints for bulk copy using
blk_props; - Support getting
CS_ENDPOINT(socket file descriptor) usingct_con_props; - Support getting
CS_PRODUCT_NAMEusingct_con_props; - Introduce
CS_INTERRUPT_CBand corresponding return values:CS_INT_*; - Better support new date/time types (DATETIME2, etc.) in bulk copy;
- Report system errors' descriptions.
- DB-library:
- Improve error reporting;
- Allows to set port number with
DBSETLPORT; - Allows encryption option;
- Fix
dbreadtextcrash on NULL values; - Allows to pass NULL to
dbsetifile.
- pool:
- Disable Nagle algorithm on user socket for performance;
- (*) Ignore extension in login packet for compatibility.
- server:
- Reply correct version for TDS 7.4;
- Avoid leaks in
tds_get_query_head; - Set
SO_REUSEADDRoption; - Better support for string conversion and UTF-8;
- Improve sending data, fix sending metadata;
- Update prelogin reply allowing TDS 7.2;
- Fix
tds_send_login_ackproduct name length; - Support no-ASCII characters in environment names;
- Return 0 rows during login;
- Pass correct packet size environment in test server;
- Do not overwrite error before displaying it;
- Improve message writing functions;
- Set
TCP_NODELAYafter accepting connected sockets.
(*) Feature backported in stable 1.4 branch.
Implementation:
- Remove various minor leaks;
- Remove some potential
NULLdereference; - (*) Add support for
SYBSINT1type conversion; - Improve GNU compatibility in CMake using
GNUInstallDirs; - Remove many warnings compiling code with stricter options;
- Optimize numeric precision change;
- Use more
booltype for boolean instead of integer; - Minor compatibility with tests and Sybase/SAP libraries;
- Avoid some warnings from CMake;
- Various improvements to bounce utility:
- Allows multiple connections;
- Allows to specify a server name;
- Allows to write dumps.
- Use 64 bit constants, add
(U)INT64_Cmacros; - Move
tds_newmacros toinclude/freetds/macros.h; - Move
tds_strndupto utils; - Add GitHub actions to CI;
- Allows
FREETDS_SRCDIRoverrides for tests; - Avoid potential zero-byte allocations (whose behavior is undefined)
in libTDS; - Unify header guards definitions;
- Unify tests includes in ctlib;
- Accommodate Windows static builds;
- Inform CMake of some accidentally Autotools-only tests;
- Add Visual Studio 2022 to Appveyor test matrix;
- Add
tds_socket_set_nodelayutility; - Change
TDSCOLUMN::column_bindlenfield to signed type; - Use
TDS serverinstead ofAdaptive Serverin error messages; - Add and reuse
TDS_END_LEN_STRINGutility; - Acknowledge non-exhaustive
TDS_SERVER_TYPEswitch statements; - Use replacement
getoptin tests for more compatibility; - Include
stdint.hin Visual Studio if available.
Caution
Do not use Source code links below, they are auto generated and broken.
FreeTDS 1.5 release candidate 2
This release candidate changes:
- Fix some compatibility with
iODBC; - Fix linker issue if GNU iconv is used (
OpenIndiana); - Update build tools (
autoconf,automake,libtool).
Caution
Do not use Source code links below, they are auto generated and broken.
FreeTDS 1.5 release candidate 1
User visible (not in a particular order):
- Generic:
- Do not write to stdout/stderr;
- (*) Fix certificate check for hostnames with wildcards;
- (*) Update to Autoconf 2.71;
- (*) Fix conversions of "-0" numeric;
- (*) Minor compatibility for 32 bit for bulk copy;
- Distribute OpenSSL libraries with Appveyour artifacts;
- Use Unicode and wide characters for file paths for Windows;
- Remove ANSI encoding code from SSPI code, always full Unicode;
- (*) Set control method for final OpenSSL BIO to avoid some errors;
- (*) Get Windows code page using Windows API for compatibility;
- (*) Do not try to use
pthread_cond_timedwait_relative_npon newer Android; - Fix compatibility connecting to some old MSSQL 2000 server;
- (*) Support Sybase server not configured with UTF-8 charset;
- (*) Change some file license from GPL to LGPL;
- (*) Support very old Sybase ASE versions;
- (*) Ignore query errors during connection initial setup increase
compatibility with different servers like OpenServer; - Support
strictencryption for naked TLS (TDS 8.0); - (*) Don't leak allocations on syntax errors converting to binary;
- Accommodate FreeBSD/Citrus iconv;
- Fall back on unsupported address families locking for host address;
- Avoid potential hangs on short replies reading TDS packets;
- Add support for TDS 8.0;
- Reject invalid NULL data in
tds7_send_record(bulk transfer); - Allows
freetds.confto be stored in~/.config(Unix).
- ODBC:
- Fixed some attribute size for 64 bit platforms (now more compatible
with MS driver); - (*) Prevent setting some wrong type in internal decriptors;
- (*) Fix leak in
odbc_parse_connect_string; - Fix an issue compiling bcp test on 32 systems with unixODBC;
- (*) Fix getting
SQL_ATTR_METADATA_IDattribute; - Check for maximum value for
SQL_ATTR_QUERY_TIMEOUT; - (*) Return better error for invalid character set;
- Check errors from
SQLInstallDriverExWandSQLRemoveDriver; - Update some driver registration field for Windows;
- (*) Remove minor leak parsing connection string;
- Add
EncryptandHostNameInCertificatesettings; - (*) Fix bug cancelling not active statements;
- Fix
SQLGetInfoSQL_DRIVER_HSTMTandSQL_DRIVER_HDESC; - Avoid shared object version for ODBC driver;
- Allows
SERVERto overrideDSNorSERVERNAMEsettings; - Allows to set version to
AUTOfrom Windows dialog; - (*) Fix handling of
SQL_C_STINYINT; - Fix return value when bulk operation not using status array fails;
- Implement
SQLDescribeParamusingsp_describe_undeclared_parameters.
- Fixed some attribute size for 64 bit platforms (now more compatible
- Applications:
- datacopy:
- Allows copy when
dest_collen>src_collen; - Increase CREATE TABLE command buffer to accommodate larger queries.
- Allows copy when
- defncopy:
- (*) Use memory instead of temporary file;
- (*) Fix MS column length for N(VAR)CHAR types;
- (*) Quote strings and identifiers;
- (*) Handle correctly order of index recordset;
- (*) Quote key index names.
- datacopy:
- CT-Library:
- Error reporting more compatible with Sybase;
- Return CT-Library type values, not TDS ones;
- Fix
*resultlenfor conversions to SYBIMAGE fromcs_convert; - Populate
datafmt->formatto avoid not initialized values; - More debugging on not implemented
bcp_colfmt_ps; - Makes sure we don't use a negative number as string length;
- Use client type, not propagate TDS one;
- (*) Fix crash using
ct_commandwithCS_MOREoption; - (*)
_blk_get_col_data: Consistently returnTDS_FAILon failure; - (*) Formally define
BLK_VERSION_{155,157,160}; - (*) Cap binary/image copying to the destination length;
- (*) Conditionally distinguish NULL and empty results;
- (*) Issue an error for unsupported server types from
ct_describe; - Add support for setting hints for bulk copy using
blk_props; - Support getting
CS_ENDPOINT(socket file descriptor) usingct_con_props; - Support getting
CS_PRODUCT_NAMEusingct_con_props; - Introduce
CS_INTERRUPT_CBand corresponding return values:CS_INT_*; - Better support new date/time types (DATETIME2, etc.) in bulk copy;
- Report system errors' descriptions.
- DB-library:
- Improve error reporting;
- Allows to set port number with
DBSETLPORT; - Allows encryption option.
- pool:
- Disable Nagle algorithm on user socket for performance;
- (*) Ignore extension in login packet for compatibility.
- server:
- Reply correct version for TDS 7.4;
- Avoid leaks in
tds_get_query_head; - Set
SO_REUSEADDRoption; - Better support for string conversion and UTF-8;
- Improve sending data, fix sending metadata;
- Update prelogin reply allowing TDS 7.2;
- Fix
tds_send_login_ackproduct name length; - Support no-ASCII characters in environment names;
- Return 0 rows during login;
- Pass correct packet size environment in test server;
- Do not overwrite error before displaying it;
- Improve message writing functions;
- Set
TCP_NODELAYafter accepting connected sockets.
(*) Feature backported in stable 1.4 branch.
Implementation:
- Remove various minor leaks;
- Remove some potential
NULLdereference; - (*) Add support for
SYBSINT1type conversion; - Improve GNU compatibility in CMake using
GNUInstallDirs; - Remove many warnings compiling code with stricter options;
- Optimize numeric precision change;
- Use more
booltype for boolean instead of integer; - Minor compatibility with tests and Sybase/SAP libraries;
- Avoid some warnings from CMake;
- Various improvements to bounce utility:
- Allows multiple connections;
- Allows to specify a server name;
- Allows to write dumps.
- Use 64 bit constants, add
(U)INT64_Cmacros; - Move
tds_newmacros toinclude/freetds/macros.h; - Move
tds_strndupto utils; - Add GitHub actions to CI;
- Allows
FREETDS_SRCDIRoverrides for tests; - Avoid potential zero-byte allocations (whose behavior is undefined)
in libTDS; - Unify header guards definitions;
- Unify tests includes in ctlib;
- Accommodate Windows static builds;
- Inform CMake of some accidentally Autotools-only tests;
- Add Visual Studio 2022 to Appveyor test matrix;
- Add
tds_socket_set_nodelayutility; - Change
TDSCOLUMN::column_bindlenfield to signed type; - Use
TDS serverinstead ofAdaptive Serverin error messages; - Add and reuse
TDS_END_LEN_STRINGutility; - Acknowledge non-exhaustive
TDS_SERVER_TYPEswitch statements; - Use replacement
getoptin tests for more compatibility; - Include
stdint.hin Visual Studio if available.
Caution
Do not use Source code links below, they are auto generated and broken.
FreeTDS 1.4.12 minor release
Improved defncopy utility, mainly fixing quoting.
Added commits
defncopy: Use memory instead of temporary file
Index script is not that huge, just allocate in memory.
defncopy: Fix MS column length for N(VAR)CHAR types
The length from sp_help is in bytes, not in code units.
defncopy: Quote strings and identifiers
Allows to handle weird characters (like spaces) in strings and identifiers.
Handle memory marking in a list to easily free. I plan to move that part of code to common code.
defncopy: Trim spaces around nullable flags
This fix detection of nullable columns for Sybase.
defncopy: Fix for order of index recordset
The order of columns is different between MS and Sybase.
Also separate code in a function, it was too long.
defncopy: Quote key index names
Split index keys considering current column names.
This is more complicated than just split considering separator (command and space, ", ") however it supports weird cases where we have the separator in the middle of a column name.
defncopy: Add test for the applications
Use commands calling programs.
Mainly use tsql to create some table, output definition with defncopy and check definition is as expected.
Caution
Do not use Source code links below, they are auto generated and broken.
FreeTDS 1.4.11 minor release
Added commits
ctlib: Fix crash using ct_command with CS_MORE option
The tds_realloc call was wrong passing the wrong pointer.
Caution
Do not use Source code links below, they are auto generated and broken.
FreeTDS 1.4.10 minor release
Added commits
Do not try to use pthread_cond_timedwait_relative_np on newer Android
API was deprecated, do not use (still available on Apple).
Rename USE_CLOCK_IN_COND to USE_CLOCK_GETTIME_IN_COND to make more clear.
Put check for pthread_cond_timedwait_relative_np in a single place defining a new USE_COND_TIMEDWAIT_RELATIVE if we can use it.
Declare tv variable near gettimeofday to reduce conditional compilation.
Get Windows code page using Windows API
Instead of using setlocale call use GetLocaleInfoA.
This fixes getting Windows code page.
setlocale should return the code page number as first item but it depends on too many settings and sometimes the string does not start with the code page number.
Updated ODBC test to avoid not convertible character; note that now the behaviour is more coherent to Windows driver for this test.
odbc: Return better error for invalid character set
Do not return memory error which is pretty misleading.
tds: Set control method for final OpenSSL BIO
OpenSSL sometimes calls this callback failing if not present.
This fixes #513.
odbc: Fix getting SQL_ATTR_METADATA_ID attribute
Returned wrong field due to typo.
tds: Fix possible issue with 32 bit machines using BCP
The -2 constant should be signed extended to 64 bit and passed to tds_put_int8. This potentially does not happen on 32 bit as the ?: operator would return a size_t (unsigned 32 bit on 32 bit systems).
Force the type to get the correct value.
odbc: Fix type setting
The code was falling through the cases potentially setting wrong types.
tds: Fix conversion from NUMERIC -0 number to integers
The weird number encoding failed to be converted to integers and was detected as overflow.
tls: Fix certificate hostname check for OpenSSL
Update Autoconf to 2.71
Add some compatibility for MacOS.
FreeTDS 1.4 Release
Summary of Changes in release 1.4
User visible (not in a particular order):
- Fix some numeric conversion checks;
- Always use Unicode for SSPI allowing not ASCII to work;
- Improve BCP copy, especially for Sybase;
- Better error reporting for ICONV failures;
- Disable TLSv1 by default;
- ODBC: partial TVP support (missing data at execution);
- ODBC: support for quoted string in connection string;
- CT-Library: support large identifiers;
- CT-Library: report appropriate severity values;
- apps: datacopy report errors on standard error;
- pool: use poll instead of select to support more connections.
Implementation:
- Use more bool type for boolean instead of integer;
- more macros for ODBC tests to encapsulate some ODBC API.