Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 15 17:55:59 2026 +0000

    ctlib: Additional tests and fixes for cs_convert and numeric types

    Fix value in error message.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Mar 7 11:01:32 2026 +0000

    tds: Move specific libTDS headers in include/freetds/tds directory

    Mainly style change.
    It makes easier to understand that these utilities are
    implemented in libTDS.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 8 17:10:35 2026 +0000

    vms: Update list of files to distribute

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 8 15:08:06 2026 +0000

    Use parenthesis for "sizeof" operator

    Just style.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Mar 7 17:15:21 2026 +0000

    Avoid C++ style comment

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Feb 27 21:42:03 2026 +0000

    odbc: Avoid different configuration for utf8 tests

    This test is quite particular, requiring different compiler
    settings.
    This as this specific test is testing UTF-8 input to the driver.
    For this reason is uses no-wide functions so UNICODE and _UNICODE
    macros should not be defined for this test.
    Trying using UNICODE/_UNICODE would lead to not testing what the
    test is written for.
    So make sure these flags are not defined undefining them at the
    beginning of source file.
    Taking into account there are currently 3 kind of project files
    (Autoconf, CMake, OpenVMS ones) this simplify project files.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Mar 7 09:37:28 2026 +0000

    tds: Separate definitions for "all_types" tests

    libTDS unittests code share some code with other libraries in
    order to be able to test add types supported by libTDS.
    Instead of having to include all src/tds/unittests/common.h files
    create a include/freetds/tds/all_types.h file avoiding some
    hacky import in other libraries.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Mar 2 18:07:50 2026 -0500

    VMS build: link non-wide ODBC shared library correctly

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Sun Mar 1 16:56:10 2026 -0500

    VMS build: Recheck failed tests

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Thu Feb 26 04:42:59 2026 -0500

    VMS build: ODBC Unicode tests

            Enable UTF8 test
            Correct build of non-ODBC kit
            Option to run ODBC tests vs. wide or narrow API
            Comment on how to enable build flags

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Thu Feb 26 03:45:33 2026 -0500

    VMS build: refresh list of tests

            Also add custom build rules for static-link ODBC tests

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Feb 24 23:50:25 2026 -0500

    VMS build: make OpenSSL Static be a user-defined option

            Also, don't need to link all the tests statically.

    sq

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Feb 24 20:17:43 2026 -0500

    VMS build: Greatly reduce repetition in descrip.mms

            Using more MMK features, but we already did use some.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Feb 23 20:45:35 2026 -0500

    VMS build: Correct dependencies for apps and tests

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Feb 23 17:45:48 2026 -0500

    VMS build: generate staging script

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Feb 23 17:02:37 2026 -0500

    VMS build: user options file

            This obviates the need for custom build script

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Feb 24 23:08:57 2026 -0500

    VMS build: Avoid hack with readline logical

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Feb 23 16:48:20 2026 -0500

    VMS build: mms clean

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Sun Feb 22 22:56:11 2026 -0500

    VMS build: Use a configuration options file instead of regenerating descrip

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Thu Feb 12 18:40:06 2026 -0500

    VMS has fseeko

Author: Matt McNabb <Matthew.mcnabb@vmssoftware.com>
Date:   Fri Feb 13 18:41:10 2026 +1300

    bcp in: Move TDSFILESTREAM to streams header and encapsulate its configuration

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Sun Jan 25 21:53:32 2026 -0500

    tds: Add NCHAR/NVARCHAR to dataread test

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Feb 3 17:18:51 2026 +1300

    freebcp: also report if rows failed to copy to server

    However, does not yet report on rows silently dropped from
    hostfile.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Feb 16 16:19:26 2026 +1300

    t0016_6: also test full precision datetime2

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Feb 16 13:39:57 2026 +1300

    t0016_18: correct comment

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Feb 3 12:27:21 2026 +1300

    t0016: Readability improvements

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Dec 9 10:41:12 2025 +1300

    Whitespace fixups in dump logging

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Sun Feb 22 22:06:54 2026 -0500

    VMS does have malloc.h

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Feb 24 22:53:28 2026 -0500

    VMS: missing includes in tests

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Thu Feb 26 01:34:25 2026 -0500

    Remove bogus semicolon from ODBC test connection_string_parse

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Mar 2 00:49:13 2026 +0000

    cmake: Fix order linking "tokens" test on MingW

    MingW linker look for additional symbols only on libraries
    listed after library missing those symbols.
    This adds a requirement on the order of libraries.
    Put tdssrv and tds libraries before others to fix linking.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Mar 2 06:23:16 2026 +0000

    cmake: Build version.rc if missing

    This can happen if Autoconf was not used to generate it (this can
    happen for instance if Autoconf was used out-of-tree).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Mar 2 06:18:58 2026 +0000

    tds: Format autogenerated tds_types.h file better

    Reduce some line length splitting them.
    Minor spaces changes.
    Just style

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 1 13:32:36 2026 +0000

    Improve char -> binary conversion

    Both dblib and ctlib ignore tabs and spaces at the beginning of
    the string (odbc behave differently for this type of conversion).
    Add some tests for char -> binary tests and some checks
    for diagnostics.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 1 13:33:18 2026 +0000

    tds: Use type descriptions to check for types having TEXTPTR

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 1 05:01:30 2026 +0000

    ctlib: Move error check code to be reused

    "errors" test is good to test some diagnostic however to trigger
    some messages some heavy setup is required so put code in common
    files to be reused.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Feb 28 19:22:24 2026 +0000

    tds: Improve log message converting char to binary

    Remove some additional space.
    Message is an error, not just informative.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Feb 28 14:41:16 2026 +0000

    tds: Rename misleading "is_blob_type" macro

    This macro check if the type has a TEXTPTR.
    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Feb 28 14:36:01 2026 +0000

    tds: Improve some TDSCOLUMN field documentation

    In particular the meaning of column_varint_size is not easy
    to grasp.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Feb 25 14:33:29 2026 +0000

    tds: Better code to check string copies in tds_parse_conf_section

    The usage of "dstr_copied" pointer was pretty misleading.
    This commit use a pointer to possible output string to
    set. This allows code reuse and makes code more readable.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Feb 28 13:22:49 2026 +0000

    dblib: Avoid possible overflows formatting dates

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Thu Feb 19 13:52:12 2026 +1300

    Optimize the default bcp datetime formatting.

    MSVC profiler showed 35% in tds_strftime for a test case.
    Now 2.7% spent in _bcp_strftime.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Wed Feb 18 15:08:33 2026 +1300

    Optimize int32 and 0-100 to string

    MSVC profiler shows 5% gain in bcp -c from this change

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Feb 18 22:59:55 2026 +0000

    dblib: Update bcp_options documentation

    bcp_options is provided by Sybase, it's not a FreeTDS extension.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Feb 28 01:31:49 2026 +0000

    odbc: Simplify linker flags for tests

    Remove GLOBAL_LD_ADD usage, all tests use common LDADD
    and add additional flags using specific LDFLAGS.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Feb 28 01:26:30 2026 +0000

    odbc: Do not use different CPPFLAGS for connection_string_parse test

    Useless, also it's coherent with CMake.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Feb 28 00:43:09 2026 +0000

    odbc: Define strings inside functions for connection_string_parse test

    Style change. Reduce macro complexity.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Feb 14 17:16:58 2026 +0000

    utils: Fix compatibility with Nettle 4 library

    Hash length parameter was removed from nettle_md5_digest.

    Method suggested by Satadru Pramanik.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Feb 27 19:24:14 2026 +0000

    tds: Add some test converting zeroes to string

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Wed Feb 18 15:59:47 2026 +1300

    Default to not fflush the log file

    Increase log performance by factor of 3.
    Set TDSDUMP_FFLUSH to anything, to flush after each line.
    Should only be needed when debugging segfaults.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Thu Feb 19 14:20:11 2026 +1300

    bcp out: Tune block size for file buffer.

    Gain of about 1% from baseline.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Feb 17 18:25:39 2026 +1300

    Implement a TDSFILEOUTSTREAM and use it for bcp out

    MSVC profiler: reduce time spent in fwrite
    from 41% to 17.3% for a test case of 400MB of data.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Wed Jan 28 15:01:49 2026 +1300

    bcp out: correct precision for variable precision datetime types

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 15 17:55:17 2026 +0000

    ctlib: Improve conversion between types

    _cs_convert function was too complicated, doing too much stuff
    and not being very optimal.
    Split into a function that convert to TDS type then fix for
    client library types handling CS_VARCHAR_TYPE and CS_VARBINARY_TYPE
    types and handling formatting the data (destfmt->format field).
    In the meantime reduce memory allocations and copies using
    TDS_CONVERT_CHAR/TDS_CONVERT_BINARY.
    Add and fix checking precision/scale for numeric types.
    Bulk copy code is simplified not having to pass two types,
    variable type values are not copied but the buffer returned
    by tds_convert is used directly; this also allows large data.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 22 16:42:10 2026 +0000

    ci: Fix date format for nightly tests

    Use ":" as separator between hours and minutes.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 22 16:05:08 2026 +0000

    ctlib: Check and fix error reporting if format is invalid

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 22 16:04:26 2026 +0000

    ctlib: Add some missing constant for datatype format

    Not currently supported but define them.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 22 13:26:45 2026 +0000

    tds: Allows to pass simple value types to tds_convert

    Make sure we don't overflow the variable if we use "cr" parameter
    to pass it.
    This is useful for optimisation purposed to avoid a copy.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 22 13:24:17 2026 +0000

    ctlib: Remove minor potential buffer overflows in tests

    In cs_convert "test" variable is 5 characters.
    Destination type is a DATETIME, not a SMALLINT anymore.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Feb 5 03:19:55 2026 +0000

    dblib: Check for overflow converting data for BCP copy in

    Avoids truncation of data inserting with BCP.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Feb 21 00:50:21 2026 +0000

    odbc: Minor indentation fix

    Just style.
    Use tabs, not spaces.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Feb 21 00:48:15 2026 +0000

    odbc: Improve TDS version detection for tests

    If driver is Microsoft TDS version is detected doing some queries
    and checking the result.
    This allows tests to work also using Microsoft driver with old
    servers.
    Specifically try to distinguish between TDS 7.3 and TDS 7.4
    checking for UTF-8 support. Not 100% correct (MSSQL versions from
    2012 to 2017 support TDS 7.4 but not UTF-8), but enough for testing.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Feb 20 19:54:02 2026 +0000

    odbc: Different implementation for mycmp in getdata test

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Feb 20 05:26:20 2026 +0000

    odbc: New check in getdata test

    Check splitting UTF-8 string from MSSQL.
    From MSSQL 2019 UTF-8 encoding is supported. Check how strings
    are spli using SQLGetData.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Feb 20 05:26:10 2026 +0000

    odbc: Compute "lc" in getdata test

    Avoid having to set every time we set "type".

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Feb 20 05:25:53 2026 +0000

    odbc: Improve comments for getdata test

    Add comments for 2 functions.
    Remove a TODO (implemented below in the same function).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Feb 19 04:48:16 2026 +0000

    odbc: Fix leak in SQLDriverConnect if string is invalid

    Login structure was not freed if odbc_parse_connect_string
    returned false, which can simply happen if the string has
    an invalid syntax.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Feb 19 00:11:43 2026 +0000

    odbc: Tell DM we support server side cursors

    The usage of SQL_CUR_USE_IF_NEEDED was deprecated, newer DMs
    do not support cursor library to provide cursors.
    FreeTDS supports server side cursors so tell DM so.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Feb 2 00:11:54 2026 +0000

    odbc: Add VMS implementation for memory_usage function in tvp test

    Code from Matt McNabb.
    Allows to run TestInitializeLeak test even on VMS.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Feb 16 21:49:06 2026 +0000

    build: Clean correctly odbc_attributes_sorted file

    The file is generate to check that attributes in odbc.h are
    sorted alphabetically.
    But "make distclean" should clean all generated files.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Feb 16 21:40:07 2026 +0000

    misc: Check all t0016 data files are included in the distribution

    It's pretty easy to forget adding these files so explicitly
    test before a release.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Feb 16 21:45:25 2026 +0000

    tds: Avoid overflow converting numeric to string

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 15 17:58:23 2026 +0000

    ctlib: Test srcfmt parameter for cs_convert

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 15 17:55:28 2026 +0000

    ctlib: Add minor comments to cs_convert_date test

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Feb 14 17:12:48 2026 +0000

    cmake: Use functions instead of macros

    More or less the same but functions are more flexible.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Feb 12 08:13:23 2026 +0000

    dblib: Add test for BCP into computed columns if triggers are enabled

    Test previous commit.
    If FIRE_TRIGGERS hint is enabled client can potentially
    insert computed columns.
    Allows to specify hints and table name in SQL test scripts.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Wed Aug 28 13:33:47 2024 -0400

    BCP into computed columns again when allowing triggers.

    The destination view may well have an INSTEAD OF INSERT trigger that
    makes meaningful use of the supplied values.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Feb 12 03:27:46 2026 +0000

    Move tds_ascii_strupr to a separate file to be reused

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Mar 8 22:02:07 2025 +0000

    Minor updates to some documentation

    Update branch names.
    Mailing list is not used anymore.
    Remove old original author note.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Feb 11 10:23:50 2026 +0000

    Avoid GCC warnings due to macro implementation

    The last commit is causing a lot of complains from GCC, specifically
    for code like

       if (something)
           tdsdump_log(...);

    generates, for instance:

    src/tds/config.c:220:20: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
      220 |                 if (connection->ip_addrs == NULL)
          |

    which is actually the issue the macro is supposed to avoid.
    Use __VA_ARGS__ if available and wrap code in the classic
    "do { ... } while(0)" pattern.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Wed Feb 11 12:52:10 2026 +1300

    Avoid dangling-else problem in logging macros

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Apr 21 13:13:39 2025 +0100

    ctlib: Some compatibility with Sybase library for tests

    FreeTDS seems a bit less picky.
    Set library version to 1.55.
    Call ct_init before cs_convert.
    Remove some cast warnings.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Dec 4 21:28:18 2025 +0000

    tds: Use bool for put_data callback

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Feb 5 20:55:09 2026 +0000

    tds: Fix potential leak of packet

    "packet" variable usually holds the same value as "tds->recv_packet".
    If tds_realloc_packet() returns NULL "packet" get set to NULL so
    freeing "packet" instead of "tds->recv_packet" causes a leak.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Feb 10 05:24:41 2026 +0000

    odbc: Check NULL pointer for SQLAllocHandle function

    The check should be done by the DM but not hurt in case
    no DM is used, not a hot path.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Feb 2 13:10:16 2026 +1300

    Static analysis: Defensively initialize output parameters

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Feb 2 12:04:56 2026 +1300

    Fix some integer range/sign warnings

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Apr 19 15:48:42 2025 +0100

    Simplify logging functions and macros

    Remove the need for TDSDUMP_LOG_FAST and TDSDUMP_LOG_FAST.
    Name function and macros differently to avoid clash and having
    to undefine/define them.

    This change initial came to address function renaming from
    Aaron M. Ucko.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Feb 9 05:44:30 2026 +0000

    tds: Fix typo in comment (cilent -> client)

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Feb 7 23:22:23 2026 +0000

    dblib: Add more tests for Sybase BCP

    Test inserting NULL TEXT values.

    Test for long variable columns, this exercise code dealing with
    how the row is encoded (offset computation).

    Test inserting column with default values.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 8 04:15:04 2026 +0000

    dblib: Allows to specify expected file for t0016 test

    This is useful in cases data are changed while inserting, like
    when you have default values.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Thu May 9 16:36:31 2024 -0400

    Improve support for TDS 5 (Sybase) bulk transfers.

    * Read defaults, send them back explicitly as needed, and clean up
      their storage afterwards.
    * tds5_bcp_add_variable_columns:
    ** Send spaces in lieu of fully empty SYB(VAR)CHAR data.
    ** Send correct textpos values in all cases.
    ** When writing the adjustment table, avoid a potential Sybase "row
       format error" by eliding the (effective) column count when it would
       have repeated the largest adjustment table entry.
    * tds_deinit_bcpinfo: Free and reset current_row for transfers in.
      Avoid potentially trying to interpret fragments of outgoing TDS
      data as BLOB pointers.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 8 04:14:23 2026 +0000

    dblib: Add missing data files for t0016 test to distribution

    These data files are part of t0016 test.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 8 04:40:06 2026 +0000

    ci: Fix some nightly test output

    Detect correctly gcc version line.
    Add time information.
    Also change syntax to get data from external programs.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Feb 6 19:55:04 2026 +0000

    tds: Strip initial separators formatting values in vstrbuild

    The separators are stripped anyway to strtok_r, so strip
    the initial ones directly in norm_fmt.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Feb 7 17:59:04 2026 +0000

    tds: Avoid static compiler warning about NULL pointer

    "s" variable was used mainly as a flag to detect string copy
    failure.
    It was initialised with a no-NULL pointer to be able to detect
    a failure (NULL DSTR pointer).
    But as it was initialised with "param" value and checked for no-NULL
    the static analyzer detected a possible NULL "param" and complained;
    initialise the pointer to "(void *) -1".
    Renamed to a more meaningful name.
    Also use "got_error" to mark errors not related to DSTR copying.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Feb 2 13:11:08 2026 +1300

    Static analysis: refactor code to help the analyzer understand it

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Feb 2 13:11:59 2026 +1300

    Static analysis: Code comment about false positive

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Feb 5 21:59:01 2026 +0000

    tds: Improve vstrbuild function

    Avoid using a list to initialise an array, compute size
    while scanning format string and write into the final array.
    Avoid updating always value pointing to resultlen.
    Change style, simplify (use if instead of small switches).

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Feb 2 16:44:27 2026 +1300

    Static analysis: Cross-platform marking of Noreturn functions

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Feb 6 06:08:17 2026 +0000

    dblib: add strbuild test and fixes

    Do not strip spaces from formatted parts (as ASE does).
    Return error if a placeholder is missing.
    Do not ignore placeholder if it's at the end of the string.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Feb 6 06:10:07 2026 +0000

    dblib: Fix result from dbstrbuild

    dbstrbuild() returns the number of written characters (not
    including terminator) or negative number on error.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Feb 3 11:22:05 2026 +1300

    ODBC unit tests: improve error checking

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Feb 5 22:47:53 2026 +0000

    cmake: Build wide tests modules consistently with Autoconf

    Fix typo in _UNICODE macro definition (1_ -> 1).
    Build common library with wide characters too, like Autoconf.
    The main test part were already using wide encoding if wide
    tests were enabled (this is the default for CMake).

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Feb 2 13:47:32 2026 +1300

    Avoid buffer overflow with tds_dir_snprintf in Windows

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Feb 2 13:33:40 2026 +1300

    Fix null pointer dereferences

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Feb 2 12:28:15 2026 +1300

    Avoid passing invalid handle to GetProcAddress

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Feb 5 07:19:50 2026 +0000

    dblib: Reduce indentation in dbperror

    Just style change.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Feb 2 10:48:28 2026 +1300

    Avoid leaking thread handle when creating detached thread

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Feb 5 03:20:28 2026 +0000

    dblib: Fix writing BCP error line to error file

    The check for fwrite was always triggered as count was 1 on
    success which was less then the chunk size.
    This as arguments were reversed.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Feb 5 03:44:26 2026 +0000

    dblib: Align line difference in t0016 test

    Make it easier to understand the difference between input
    and output lines if a mismatch occurs.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Dec 23 19:16:29 2025 -0500

    ODBC MARS: Don't need to free MARS socket until statement free

    Each MARS session has a TDSSOCKET structure associated. To avoid overhead
    with creation and destruction of these, defer destruction of the TDSSOCKET
    until the statement handle is being closed. The same MARS session can be
    used for multiple executions of the same statement.

    Further optimization may be possible by allowing these structures to
    persist in their pool (conn->sessions) even after the HSTMT is closed, and
    re-using an unbound one for later statements.

    Further discussion: https://github.com/FreeTDS/freetds/pull/690

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 1 20:55:14 2026 +0000

    dblib: Handle better memory errors from dblib_get_tds_ctx

    Handle the function returning NULL in all code paths.

Author: Maksim Korotkov <m.korotkov@postgrespro.ru>
Date:   Fri Jan 16 11:24:07 2026 +0300

    dblib: avoid potential NULL dereference

    tds_alloc_context() may return NULL, and the returned value should be checked
    before being dereferenced.

    Found by PostgresPro

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 1 18:48:51 2026 +0000

    tds: Use uint8_t base type for bit fields

    This produce same layout for different compilers (like GCC and MSVC).
    libTDS does not keep ABI but if somebody would mix different compiler
    better to have the same ABI.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 1 18:49:42 2026 +0000

    tds: Declare field as "unsigned" instead of "unsigned int"

    Just style, more consistent with near fields.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 1 10:07:22 2026 +0000

    tds: Reuse forward declarations if possible

    Just style change.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Wed Dec 24 14:46:17 2025 +1300

    ODBC MARS: Expand the MARS1 test

    Test both parameterized and non-parameterized inserts.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Dec 22 20:34:53 2025 -0500

    ODBC MARS: Fix sliding window calculation

    The sliding window calculation hardcodes a prefetch size of 4, i.e. the
    first fetch will request the server to send 4 packets, which FreeTDS
    dequeues into a packet cache. However, on completion of processing of each
    one of those packets, it requests the server to send another 4 packets.
    This causes the number of packets cached in the client to increase
    indefinitely. Changed to base the prefetch window growth on the sequence
    number of the packet just processed, not the latest sequence out of all the
    cached packets.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jan 31 21:40:37 2026 +0000

    tds: Remove obsolete commented out code

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Jan 30 07:59:45 2026 +0000

    dblib: Minor comment updates

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jan 25 10:30:44 2026 +0000

    tds: Avoid strict test during conversion from string to binary

    The check is strictly for debugging, should never happen, enable
    only on debug builds.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jan 25 10:16:24 2026 +0000

    utils: More checks for literals for SMP numbers

    This code is used just for tests, more strict does not hurt.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jan 25 10:15:36 2026 +0000

    Avoid C++ style comments

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Dec 22 20:44:34 2025 -0500

    ODBC MARS: Extra debug logging

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Wed Dec 24 15:43:44 2025 +1300

    ODBC Tests: option to suppress display of every command

Author: Maksim Korotkov <m.korotkov@postgrespro.ru>
Date:   Thu Jan 15 00:37:19 2026 +0300

    tds: fix potential NULL dereference
    The result of the realloc function can be NULL if the memory allocation fails.
    Found by PostgresPro with Svace Static Analyzer

Author: Maksim Korotkov <m.korotkov@postgrespro.ru>
Date:   Wed Jan 14 23:05:04 2026 +0300

    dblib: added missed deallocation of dbopts

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jan 3 16:36:54 2026 +0000

    tds: Use bool for fOK variable and rename to ok

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jan 3 15:33:06 2026 +0000

    odbc: Add some missing types to BCP conversions

    BCP code converts data from TDS types (even on ODBC) to server.
    Possibly not fully supported at the moment, but they won't hurt.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Dec 24 08:57:41 2025 +0000

    tds: Save collations test output to file

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 20 17:44:26 2025 +0000

    odbc: Set charset conversion based on binding type for BCP

    Source can be either ANSI or wide, set character conversion
    accordingly.
    Extend test to test some conversions. CP850 encoding was chosen
    as it encode some Latin1 characters in a different way.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 20 17:44:04 2025 +0000

    tds: Use proper collation for bulk inserts

    Collation is used to specify charset encoding.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 30 14:02:34 2025 +0000

    tds: Add function to get collation name

    This is useful to build queries to create table or sending
    data with correct encoding.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Dec 29 20:08:36 2025 +0000

    tds: Allow to select which char column should be encoded

    Add use_iconv_out flag to column.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Dec 17 17:17:37 2025 +0000

    tds: Rename use_iconv to use_iconv_in

    The setting affects only data from server, not the opposite.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Dec 25 08:50:18 2025 +0000

    odbc: Honour BCP=nodrop environment in bcp test

    The tables were dropped in all cases.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 20 17:44:04 2025 +0000

    odbc: Use a single command to cleanup tables in bcp test

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 21 16:45:59 2025 +0000

    odbc: Fix indentation in sql2tds

    Code is indented with tabs, not spaces.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 23 11:36:21 2025 +0000

    tds: Add missing SQL collations

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 23 11:35:54 2025 +0000

    odbc: Fix wrong comment in utf8_2 test

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 23 11:34:01 2025 +0000

    odbc: Use bool for "minimum" parameter

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 20 08:54:25 2025 +0000

    odbc: Minor improvements for bcp test

    Simplify queries to cleanup tables.
    Check return setting SQL_COPT_SS_BCP attribute.
    Avoid truncation for DATETIME2, more compatible with MS driver.

Author: Matt McNabb <Matthew.mcnabb@vmssoftware.com>
Date:   Fri Nov 7 16:03:56 2025 +1300

    Refactor FreeBCP main loop to reduce code duplication

Author: Matt McNabb <Matthew.mcnabb@vmssoftware.com>
Date:   Fri Nov 7 15:24:15 2025 +1300

    FreeBCP: mark private functions as static, and match prototype to definition

Author: Matt McNabb <Matthew.mcnabb@vmssoftware.com>
Date:   Fri Nov 7 14:53:07 2025 +1300

    Issue #647: FreeBCP native file format support

        Commit 9058123 causes dbresults(dbproc) loop to free
        the structures used by dbcoltype(), so perform the
        bcp_colfmt() loop before the -E flag processing

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Dec 2 10:47:40 2025 +1300

    Issue #648: avoid redundant setup calls in FreeBCP

        The bcp_init() already performs the zero-row SELECT to
        obtain column formats, and already calls bcp_columns().

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 16 16:34:08 2025 +0000

    tds: Use bool for "started" variable

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 13 16:37:03 2025 +0000

    tds: Avoid using sprintf to format hexadecimal byte

    Reuse tds_hex_digits.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 13 16:19:45 2025 +0000

    tds: Do not use sprintf to output a character

    No reason to be so expensive, code is not more readable.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 5 22:17:26 2025 +0000

    odbc: Wait a bit before removing created login to allow disconnection

    It looks like that the CI is intermittently failing.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Dec 2 16:14:56 2025 -0500

    VMS: configure from trunk (almost)

    Also, read version from version.h instead of Configure.
    Previous code mistakenly included single quotes in config.h VERSION
    Manual install of two headers is still required, as they
    depend on gperf which we don't have a VMS port for.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Oct 6 21:00:15 2025 -0400

    VMS: Improved detection of OpenSSL ; support 3.1 and static build

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Sep 16 17:19:38 2025 +1200

    VMS: Tidy up build documentation; TDSVER no longer set at compile-time

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Dec 1 21:37:57 2025 -0500

    VMS: make ODBC Wide & MARS into build options, not hardcoded

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Sun Oct 19 18:09:17 2025 -0400

    VMS: Use ODBC MARS1 test

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Sun Oct 19 17:48:57 2025 -0400

    VMS: Enable ODBC MARS

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Oct 14 19:14:32 2025 -0400

    VMS: Correctly find the built driver for ODBC Tests that use DriverConnect; document in code

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Sep 16 13:32:59 2025 +1200

    VMS: Correctly define sizes of types in config.h.
    Note - sizeof(long) differs between VSI C and VSI C++, so don't hardcode that.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Sep 15 11:36:24 2025 +1200

    VMS: When test case or App fails, return failure status to OS

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Sep 15 11:36:53 2025 +1200

    VMS: Alert user when testing if they haven't configured test environment

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Sep 9 14:28:03 2025 +1200

    VMS: Test suite: Build ODBC tests correctly; add timing check;
     add option to generate dump log for each test.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Sun Oct 12 23:57:38 2025 -0400

    VMS: Fix errors in ODBC-enabled build

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Sep 15 10:05:48 2025 +1200

    VMS: gitignore generated files

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 5 20:02:03 2025 +0000

    dblib: Fix typo in comment

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Dec 4 04:06:19 2025 +0000

    vms: Use proper declaration for main() function in tests

    Do not list parameter list empty.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Dec 4 04:04:59 2025 +0000

    vms: Simplify expression in C source tests

    Just pass the buffer, the type is already compatible, no need
    to cast.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Dec 4 03:50:33 2025 +0000

    vms: Remove need for file tweak, already fixed

    "%td" usage in format stringswas removed by commit d01670c2ed63a912
    (cfr "Do not use %td printf formatting string").

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 2 21:14:08 2025 +0000

    Avoid warning due to redefinition of alloca on OpenVMS

    "alloca" macro could be already defined by stdlib.h on
    OpenVMS causing a warning.
    Do not attempt to redefine "alloca" if already defined.

    Reported-by: Matt McNabb <matthew.mcnabb@vmssoftware.com>

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 2 19:24:14 2025 +0000

    odbc: Do not lock table in describeparam test

    That statement failed due to locking during multi process
    testing in AppVeyor CI.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 2 19:16:06 2025 +0000

    ctlib: Add a test for cs_dt_info and date formats

    Check all formatting are the same as Sybase versions.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 2 19:15:03 2025 +0000

    ctlib: Use cs_dt_info to unify date formatting in test

    Remove an hack in tests.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 2 19:11:58 2025 +0000

    ctlib: Implement setting date format using cs_dt_info

    Beside implementing missing feature this can be used for
    test code.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 2 17:51:50 2025 +0000

    tds: Allows %Xz time format option

    Allows to override precision using a fixed precision.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 2 17:50:54 2025 +0000

    tds: Remove assert in tds_strftime

    Trim value using AND operation.
    User should not pass invalid values but better to avoid
    crashes.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 2 05:28:01 2025 +0000

    ctlib: Error checking in cs_dt_info

    Although this function is mainly a stub add error handling,
    similar to cs_locale.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 2 05:26:06 2025 +0000

    ctlib: Use variable to store function name in cs_locale

    Mainly style change.
    Make it harder in the future to add an error and misspell the name.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Dec 1 13:01:11 2025 +0000

    ctlib: Add missing constant for date formats

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 30 18:32:48 2025 +0000

    odbc: Write a test for SQL_COPT_SS_OLDPWD option

    Create a login with an expiring password, check we can login and
    change the password at the same time.
    The test runs only on CI (or with CI environment set to "true").

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Dec 1 19:37:18 2025 +0000

    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.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Dec 1 09:05:08 2025 +0000

    Move alloca OpenVMS definition to alloca.h header

    Just for consistency.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 30 16:19:25 2025 +0000

    ctlib: Reduce possible reentrance issues for res_type_str

    Change output buffer instead of always use the same one.
    Not solving all possible issues but fine for test code.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 30 14:59:04 2025 +0000

    ci: Use CMAKE_INTDIR macro in defncopy test to avoid PATH change

    CMake defines CMAKE_INTDIR as a constant string with the
    directory name of output directory name.
    Use it to update PATH environment.
    TDS_DIR change allows to expand passed macro definition.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 30 15:37:32 2025 +0000

    utils: Use bool for tds_dstr_isempty

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 30 09:58:44 2025 +0000

    Restore charset_lookup.gperf file

    This reverts commit 572b5a3547738dbe61c65f7eb754be07c0563fe2
    (cfr "Remove intermediate charset_lookup.gperf file").
    This file is used to generate coverage reports by nightly CI.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 30 07:25:34 2025 +0000

    ci: Do not attempt download from not existing URL

    It just waste time trying.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Nov 11 23:37:05 2025 +0000

    ci: Build one job with Visual Studio

    Use "Visual Studio 12 2013" as generator.
    Remove -DCMAKE_BUILD_TYPE=XXX.
    Target are inside configuration directory.
    Pass --config XXX for each cmake invocation.
    Common setup code written using PowerShell.
    Change a bit style of some line to use single quotes and multiline to
    make them more readable

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 30 08:48:33 2025 +0000

    build: Set include path looking for OpenSSL functions

    Not strictly necessary as mainly check_function_exists_define
    use the linker to discover libraries but makes easier to
    expand in the future.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 29 13:58:05 2025 +0000

    Tidy up main gitignore file

    Anchor to directory specific files.
    Sort first generic files, then anchored, inside the 2 groups
    sort alphabetically.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 29 13:52:24 2025 +0000

    Remove obsolete file from gitignore

    doxyfile generation was removed in commit 98eb82d6f94744
    (cfr "Remove code to build partial reference guide only for libTDS").

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 29 13:38:05 2025 +0000

    Remove intermediate charset_lookup.gperf file

    This is used to just generate other source file.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 29 10:57:30 2025 +0000

    Remove mkinstalldirs

    Autoreconf will take care of providing this file if needed.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Nov 28 08:31:01 2025 +0000

    replacements: Use vsprintf_s instead of vsprintf

    Not much of an issue in this case, but just to stay on the
    safe side.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Nov 28 01:21:52 2025 +0000

    tds: Remove printf style macro from SSPI code

    It makes the code simpler.
    The macro made sense when the source support both ANSI and WIDE
    versions.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Nov 27 20:24:59 2025 +0000

    tds: Fix memory leak for channel binding using Kerberos

Author: Bulat Gafurov <67165594+paraddise@users.noreply.github.com>
Date:   Wed Nov 26 23:30:30 2025 +0000

    Add a test for channel binding

Author: Bulat Gafurov <67165594+paraddise@users.noreply.github.com>
Date:   Sat Nov 1 19:01:14 2025 +0300

    Add support of Channel Binding for TLS up to 1.2

    Extended Protection for Authentication (EPA) requires the use of
    channel binding.
    When using NTLM or Kerberos authentication, the client must include
    channel binding information.
    To successfully connect to servers where EPA is set to "Required",
    the client has to provide a valid Channel Binding Token (CBT).

    Implement channel binding for NTLM, Kerberos and SSPI.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Nov 26 23:26:49 2025 +0000

    tds: Reuse TDSGSSAUTH type

    Just style change, code use typedefs quite a lot.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Nov 27 08:17:02 2025 +0000

    tds: Reduce usage of deprecated OpenSSL 3 functions

    Reduce the number of warnings and make it easier to
    upgrade.
    Code works with OpenSSL 1.0.2 too.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Nov 26 04:03:46 2025 +0000

    tds: Remove need for RSA_get0_key

    Use RSA_size instead, simpler and avoids function checking
    during configuration.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Nov 26 04:02:25 2025 +0000

    tds: Add a test for OpenSSL tds5_rsa_encrypt

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Nov 24 19:26:26 2025 +0000

    tds: Use instance name for SPN

    The SPN should use the instance name, not the port.
    Although usually port and instance SPNs are used if SPNs are
    registered manually and the port is dynamic or changed is
    likely that the port SPN won't be updated.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Nov 25 21:12:30 2025 +0000

    tds: Reuse TDSAUTHENTICATION type

    Just style change, code use typedefs quite a lot.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Nov 20 05:44:48 2025 +0000

    apps: Do not include libTDS headers in FreeBCP

    "tds.h" was mainly included for historic reasons (it contained
    a lot of not libTDS specific things).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Nov 20 05:41:16 2025 +0000

    tds: Rename "unknown" field with more proper name

    As Microsoft documented the field is "reserved3".

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Nov 19 23:57:13 2025 +0000

    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 broken ABI for Windows.
    Provide tdsdump_open with old ABI and a new tdsdump_wopen
    (only Windows).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Nov 19 23:51:17 2025 +0000

    utils: Avoid conversion warnings in tds_dir_from_cstr

    MSVC complains about size_t -> int conversions.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Nov 19 09:20:23 2025 +0000

    dblib: Check parameters in bcp_getbatchsize

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Nov 19 06:22:13 2025 +0000

    ci: Test redirection of Windows CRT debug logging to a file

    Attempt to redirect it to a file and check it's present.
    We use bsqldb as tsql is linked statically.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Wed Nov 5 10:39:02 2025 +1300

    Option to dump Windows CRT debug logging to a file instead of stdout/stderr

Author: Matt McNabb <Matthew.mcnabb@vmssoftware.com>
Date:   Fri Nov 7 13:48:26 2025 +1300

    Win32 crtdbg.h already replaces strdup (in DEBUG builds)

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Nov 11 19:08:14 2025 +0000

    ci: Run tests in parallel

    This speed up the test quite a lot as some tests have some
    delays inside.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Nov 11 19:06:41 2025 +0000

    ci: Use log only for a single command

    Logs slow down the test quite a lot.
    Also, on Windows running the tests in parallel causes so much
    delay that some tests start to fail due to timeouts.
    As logs are not much used just use for a single command.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 9 19:38:12 2025 +0000

    ci: Use parallel build to speed up build

    Change generator to Ninja to use parallel builds.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Nov 11 08:42:09 2025 +0000

    ci: Remove build without OpenSSL

    One of the reason this was introduced was the lack of OpenSSL
    library in the ZIP artifact. This was fixed time ago.
    Remove that build, using TLS is recommented.
    Also this speeds up the CI builds.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Nov 11 08:39:06 2025 +0000

    tds: Make sure we dump hexadecimal in ASCII

    isprint is depending on locale causing to output the
    character part of the dump potentially not in ASCII.
    The output should be only ASCII.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Nov 10 17:47:23 2025 +0000

    ctlib: Rename RPCs to allow running them in parallel

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 9 21:24:50 2025 +0000

    cmake: Use "len" result in source code checks

    This potentially avoid some warning compiling the code.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 9 12:05:46 2025 +0000

    cmake: Improve detection of some stdio functions

    Do not check some stdio functions twice with 2 methods.
    The CHECK_STDIO_FUNCTION_EXISTS macro, used to test some
    formatting functions was checking previous function detection
    (using symbol linking) and then try another detection (using
    source code compilation) if not found.
    This caused a problem with CMake caching.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 9 12:14:18 2025 +0000

    ci: Update PATH in case CMake is not recent enough

    In a recent patch ENVIRONMENT_MODIFICATION was used to correct
    the PATH as required however this is not supported all
    CMake versions used by AppVeyor tests.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Nov 7 18:49:35 2025 +0000

    ci: Fix tests execution for CMake using Visual Studio

    Visual Studio output the binaries based on configuration on
    a sub directory.
    This causes issues for tests as they don't find either
    libraries or executables.
    To test this remove PATH settings, the build systems
    will handle it.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Nov 7 18:50:45 2025 +0000

    cmake: Fix ctest command for Visual Studio

    Do not replace ctest with with "ctest", CMake already find
    the correct executable.
    Pass the configuration, otherwise Visual Studio projects
    will fail to build.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Nov 7 18:51:38 2025 +0000

    ci: Do not open dialogs on some errors

    On Windows the tests will be stuck till the timeout,
    avoid it.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Nov 7 21:28:56 2025 +0000

    replacements: Do not compile tests during normal build

Author: hking <hollie.king@forescout.com>
Date:   Thu Jun 12 15:32:23 2025 -0500

    Add gnutls ciphers parameter to allow control of priority string

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Nov 6 21:08:08 2025 +0000

    ci: Use cmake command instead of nmake if possible

    cmake commands are more generic.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Nov 6 21:01:56 2025 +0000

    ci: Use OpenSSL 3.3 or 3.5 if available

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Nov 6 20:54:45 2025 +0000

    cmake: Allows to build tests without running them

    Useful to separate build and test running.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Nov 6 20:59:04 2025 +0000

    odbc: Fix suggested command to install in connect test

    Spaces matter in the command, remove otherwise it won't
    work correctly.

    Reported by Matt McNabb.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Oct 6 15:06:59 2025 +1300

    Tests: o_connect: Improve commentary on Windows ODBC configuration
    issues; remove test that won't work in Windows

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Nov 5 23:56:49 2025 +0000

    odbc: Fix a typo in connect test

    trucate -> truncate

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Sep 16 13:21:34 2025 +1200

    Tests: o_genparams: TIMESTAMP extension should use client date

    The ODBC driver extends a TIME value for a TIMESTAMP input
    parameter using the client current date, not the server date.
    https://learn.microsoft.com/en-us/sql/relational-databases/native-client-odbc-date-time/datetime-data-type-conversions-odbc?view=sql-server-ver15

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Oct 6 12:56:00 2025 +1300

    Tests: o_tokens: do not use temporary PWD file for override

    This method was introduced when code used to always read PWD
    file (done automatically inside odbc_connect).
    Now just update common_pwd fields.
    This avoid having to create temporary files which can cause
    issues and races.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Nov 3 11:31:38 2025 +1300

    Only define SQLWSTR and sqlwcslen replacements if needed

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Nov 3 11:28:11 2025 +1300

    Compile-time check for SIZEOF_SQLWCHAR being correct

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Nov 3 11:21:00 2025 +1300

    Always check compile-time Static Asserts (and avoid possibly creating external symbol)

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Oct 7 12:33:04 2025 +1300

    Tests: o_utf8_2: improve debug output, allow for iconv not installed

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Sep 16 13:35:51 2025 +1200

    Tests: ODBC - Correct data type for length parameter

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Oct 6 15:35:27 2025 +1300

    Tests: o_type - clarify that Errors are expected

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Oct 6 12:06:04 2025 +1300

    Tests: ctlib common: username not required, if using MSSQL Trusted Connection

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 2 09:53:08 2025 +0000

    ci: Move to macos-14 for GitHub actions

    macos-13 will be removed in a month.
    Move to OpenSSL, GnuTLS seems to fail for some reasons.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Oct 31 21:02:20 2025 +0000

    odbc: Add test for SQLExecute re-execution on failure

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Thu Oct 30 21:26:10 2025 -0400

    odbc: Re-prepare a prepared query if it never returned a handle

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 28 11:37:00 2025 +0000

    Remove obsolete CVS $Id

    Files have been changed since that release.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 26 21:45:56 2025 +0000

    odbc: Use bool for odbc_use_version3 in tests

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Oct 25 20:10:15 2025 +0100

    Give error if iconv library is not found and not explicitly disabled

    iconv library is strongly encouraged so give error if
    not found and not explicitly disabled.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Oct 23 21:03:18 2025 +0100

    odbc: Makes tds_no_dm definition common in tests

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Oct 23 19:45:03 2025 +0100

    odbc: Fix inserting too much data with SQLPutData

    An error is returned if column is truncate.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Oct 8 16:35:57 2025 +0100

    odbc: Accept any variable data type using DATA_AT_EXEC length

    Reported in https://github.com/FreeTDS/freetds/issues/667.

    The behaviour is consistent with Microsoft driver.

    This caused an issue using PHP ODBC PDO driver.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Oct 17 07:50:29 2025 +0100

    cmake: Add some type definitions for unixODBC

    Some unixODBC headers rely on some configuration definitions.
    For instance SQLBIGINT can be a structure or a number.
    Add needed definitions (SIZEOF_LONG_INT, HAVE_LONG_LONG).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 14 21:35:22 2025 +0100

    ci: Update win-iconv version

    Pick up more recent master version, already including my fix.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 14 21:10:08 2025 +0100

    odbc: Do not link Driver Manager main library into FreeTDS driver

    Including all ODBC_LDFLAGS into ODBCINST_LDFLAGS causes to
    link also "odbc" library (main Driver Manager library) and
    not only "odbcinst" (the installation library).
    We need only to use a couple of installation function
    from our ODBC driver so avoid linking to main ODBC library.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 14 21:06:42 2025 +0100

    cmake: Link with gssapi_krb5 only with Kerberos enabled

    This library is only used to support Kerberos.
    Problem reported and change suggested by Benjamin Leff.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Sep 10 17:53:56 2025 +0100

    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.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Aug 28 21:02:57 2025 +0100

    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.

Author: Craig A. Berry <craigberry@mac.com>
Date:   Sat Jun 28 12:54:46 2025 -0500

    Update README.vms for recent changes

    and frankly some not-so-recent as I haven't touched it in a couple
    of decades.

Author: Craig A. Berry <craigberry@mac.com>
Date:   Sat Jun 28 11:33:24 2025 -0500

    Build and run more tests on VMS

    Some of the newer tests were not getting built and run.

Author: Craig A. Berry <craigberry@mac.com>
Date:   Fri Jun 27 19:12:07 2025 -0500

    Add a test wrapper for VMS

    The tests have voluminous output that makes it very hard to tell
    what failed or succeeded.  So make a test wrapper analogous to
    misc/full-test.sh. And then run the tests through that while
    continuing in the face of error so we don't kill the whole test
    suite if one test fails.

    Output will look like:

    Starting DBLIBCHECK...
    ok T0001
    ok T0002
    ok T0003
    ...
    ok BCP
    NOT ok THREAD -- check THREAD.log
    ok TEXT_BUFFER
    ....

Author: Craig A. Berry <craigberry@mac.com>
Date:   Fri Jun 27 15:37:13 2025 -0500

    Build test_base on VMS

    It doesn't do anything useful, but it makes the main() function go
    missing if we don't have it.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Jun 26 09:39:36 2025 +0100

    odbc: More compatiblity for SQL_ATTR_QUERY_TIMEOUT attribute

    By default should return 0 value.
    Add test for it.
    Also add test for clamping value.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Jun 26 07:07:42 2025 +0100

    tds: Do not accept negative values for some configuration

    Negative values do not make sense for TCP port and TEXTSIZE.
    Negative timeout values are not valid.

Author: Craig A. Berry <craigberry@mac.com>
Date:   Tue Jun 24 10:38:20 2025 -0500

    VMS has had vsnprintf for a long time

    And this allows for a better vasprintf fallback for systems where
    vasprintf is not available.

Author: Craig A. Berry <craigberry@mac.com>
Date:   Mon Jun 23 07:26:27 2025 -0500

    Better test for vasprintf on VMS

    Recentish CRTLs do have it, but the test I added 23 years ago was
    not correctly detecting it.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jun 17 09:56:39 2025 +0100

    ci: Add MSSQL 2025 to GH action matrix

    SA_PASSWORD environment is deprecated so add also newer
    MSSQL_SA_PASSWORD.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Jun 19 13:16:10 2025 +0100

    ctlib: Update enumeration style

    Do not use CamelCase.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Apr 18 20:29:42 2025 +0100

    ctlib: Improve and fix query parsing

    Factor our a new query_has_for_update to check is a query has a
    "FOR UPDATE" clause.
    Add a test for such a function.
    Take into account comments during the parse.
    Handle correctly strings and identifiers as single tokens.
    Use mnemonics instead of literal constants.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Mon May 13 15:06:24 2024 -0400

    ct_cursor: Predict cursor type for CS_CURSOR_DECLARE.

    Request forward-only cursors for updates, keyset-driven cursors otherwise.
    Regardless, specify optimistic cursors, which check timestamps and, when
    they're not available, values.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Jun 19 11:24:38 2025 +0100

    ctlib: Add a comment for FreeTDS extension

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jun 18 11:08:10 2025 +0100

    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.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jun 17 14:44:51 2025 +0100

    tds: Add more types to tds_get_column_declaration

    XML and UNITEXT support.
    Add some missing cases to the switch, just for completeness.
    Show warnings if new types are added and --enable-extra-checks is
    used.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jun 17 14:39:33 2025 +0100

    tds: Reuse computed type

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jun 15 13:02:46 2025 +0100

    tds: Do not override all GnuTLS settings

    Use gnutls_set_default_priority_append instead of
    gnutls_priority_set_direct if available.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jun 15 13:42:28 2025 +0100

    tds: Disable TLS v1.1 by default

    The protocol was deemed to be not much secure anymore.
    It's less of a problem for Windows compared to v1.0 as
    Windows added support for TLS v1.1 and v1.2 together.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Jun 16 17:46:17 2025 +0100

    tds: Constify passing collation information

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Apr 22 13:32:24 2025 +1200

    Allow ASE (TDS 5.0) with TDS_ENCRYPTION_STRICT option

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Tue Apr 22 13:32:02 2025 +1200

    Allow Strict Encryption for TDS 5.0 (Sybase SSL works this way)

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat May 31 17:02:34 2025 +0100

    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.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat May 31 17:00:18 2025 +0100

    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
      293 |                                 rows, (long) ((stop.tv_sec - start.tv_sec) * 1000) + ((stop.tv_usec - start.tv_usec) / 1000));
          |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                                                                    |
          |                                                                                    __suseconds64_t {aka long long int}

    long should be enough for 49 days in case of 32 bit, I hope
    your query doesn't take so long.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed May 28 07:50:03 2025 +0100

    ci: Enable back MSSQL 2017

    It was disabled due to some server setup issues.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu May 22 22:05:53 2025 +0100

    odbc: Add ConnectionTimeout parameter

    This is especially useful to avoid having to call SQLSetConnectAttr.
    For instance you can use this parameter for PHP.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun May 25 10:16:19 2025 +0100

    odbc: Check ODBC attribute list is sorted

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun May 25 13:06:22 2025 +0100

    odbc: Sort ODBC attribute list in alphabetical order

    Prepare to simplify attribute lookup.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat May 24 21:59:25 2025 +0100

    odbc: Reuse odbc_appintent2readonly function

    Make code handling ApplicationIntent attribute more similar.

Author: Peter Deacon <peterd@iea-software.com>
Date:   Sat May 24 21:29:46 2025 +0100

    odbc: Add loading ApplicationIntent from odbc.ini

Author: Peter Deacon <peterd@iea-software.com>
Date:   Sat May 24 21:29:15 2025 +0100

    odbc: Add support for ODBC connection attribute ServerCertificate

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat May 24 22:12:27 2025 +0100

    Add missing gl_HOST_CPU_C_ABI_32BIT m4 macro

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat May 24 21:03:13 2025 +0100

    Update ax_pthread.m4 macro

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu May 22 23:22:23 2025 +0100

    ci: Add m4 macros to satisfy new MacOS

    Make sure AM_ICONV and dependent macros are defined.
    We newer gettext brew package it seems we have problems
    finding this macro.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Mar 22 07:33:16 2025 +0000

    Avoid errors redefining getpid() for MingW

    We use a macro for getpid but MingW define a getpid function
    which can clash with our definition. Include unistd.h header
    earlier to avoid the clash later.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Apr 23 21:47:50 2025 +0100

    ctlib: Add a test for data rows locking tables to blk_in test

    As other tests for bulk copy skip the test if the setup fails.
    This allows to add tests for types not supported by some versions
    of the database without having to explicitly test if some types
    are supported or not for the specific query.
    Add a test with "LOCK DATAROWS" which fails on Microsoft servers.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Apr 23 22:36:46 2025 +0100

    ctlib: Check all command succeed running a query with run_command

    Almost all test queries are expected to run successfully
    commands so check they all succeeded.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Apr 23 22:15:58 2025 +0100

    ctlib: Do not store run_command results if not used

    No reason to store the result value.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Apr 23 21:43:28 2025 +0100

    tds: Detect data rows locking looking to capabilities

    More fine grained and correct check.
    For instance ASE version 12.5.2 reports a version of 12.5 during
    login so the check for >= 12.5.1 failed causing invalid encoding.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Apr 23 21:41:08 2025 +0100

    tds: Make clear product version is hexadecimal in logs

    Format output as 0xXXXX, not just XXXX.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Apr 14 15:57:29 2025 +1200

    [DOL BULK] Documentation for sysstat2; warn about slow index for datarows-locked table

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Apr 14 15:22:24 2025 +1200

    [DOL BULK] Perform the locktype query before the columns query - hidden dependency

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Apr 14 15:15:30 2025 +1200

    [DOL BULK] Also support freebcp being invoked with database.owner.tablename

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Apr 14 13:33:26 2025 +1200

    [DOL BULK] Row data packet layout

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Apr 14 12:36:05 2025 +1200

    [DOL BULK] Probe for datarows-lock on the table

            Limit the locking type probe to ASE versions that support it

Author: Matt McNabb <Matthew.mcnabb@vmssoftware.com>
Date:   Fri Apr 11 17:46:43 2025 +1200

    [DOL BULK] Add TDS_REQ_DOL_BULK to capabilities.

      Wireshark calls this TDS_DOL_VOID and tds.capability.dol.bulk
      Required by SAP ASE to bulk insert to a datable with DATAROWS locking.

Author: Matt McNabb <matthew.mcnabb@vmssoftware.com>
Date:   Mon Apr 14 10:45:52 2025 +1200

    Allow alternate input file for c_blk_in unittest

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Apr 21 18:16:42 2025 +0100

    ctlib: Check buffer length for ct_cmd_props(CS_CUR_STATUS)

    Sybase requires it to be CS_UNUSED.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Apr 21 13:12:52 2025 +0100

    ctlib: Better check for ct_cursor parameters

    Check parameters in a way more similar to Sybase libraries.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Apr 21 15:58:08 2025 +0100

    ctlib: Remove leak freeing command

    Release cursor while freeing command.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Apr 21 02:58:41 2025 +0100

    ctlib: Reuse check_call macros in tests

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Mar 24 05:20:49 2025 +0000

    tds: Do nothing if error on tds_set_interfaces_file_loc

    It should not happen, but in case it does do not revert to
    NULL.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Apr 20 10:30:13 2025 +0100

    Avoid some mixed sign compare converting numeric

    tds_numeric_bytes_per_prec are always more than 0 bytes.
    tds_swap_bytes takes the size of the buffer which should be
    size_t, not int.
    Also fill the entire numeric with zeroes first as makes easier
    for new compilers to use better code due to size constant.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Mar 21 04:37:57 2025 +0000

    tds: Remove some warnings compiling with -Wconversion

    Most of the times we check for overflow before numeric conversions.
    Use unsigned characters if we need to do computation on them.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Apr 20 02:29:51 2025 +0100

    odbc: Set proper error in convert_numeric2server

    Propagate conversion error, otherwise a generic one would be
    used.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Apr 20 02:20:43 2025 +0100

    odbc: Extract and reuse function to convert numeric from ODBC to libTDS

    Reduce code duplication.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Apr 19 19:59:43 2025 +0100

    odbc: Add support for SQL_COPT_SS_ATTACHDBFILENAME connection attribute

    Allows to attach a file while logging it.
    Previously the option was only available using string
    attributes using SQLDriverConnect.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jul 8 10:01:10 2018 +0100

    dblib: Return table column name from dbtablecolinfo if available

    Fill ActualName with real column table name if available.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Apr 19 16:15:47 2025 +0100

    Add missing test_base.h file to distribution

    File was added in commit c431fed9845a6d68e2383922598982b10eb1ff79
    (cfr "unit tests: Start phasing in a central baseline setup")

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Apr 19 03:42:08 2025 +0100

    Swap varint size 4 and 5 to make code more readable

    Varint size is, for most types, the size of the length in the protocol.
    For instance a size 0 means there's no size associated with the
    type while 1 means the size is one byte (so potentially 0-255).
    This is not true for size 5 which is a simple 4 bytes length while
    type 4 was a bit more complicated (having 2 lengths, one for
    text pointer and one for the data).
    Swap varint types of 4 and 5 to make the code more readable and
    consistent.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Apr 19 03:48:57 2025 +0100

    utils: Fix range check converting path name

    The check was meant to check if the returned length exceeded
    the passed buffer.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Apr 19 03:25:54 2025 +0100

    ctlib: Explain the need for cs_dt_crack

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Mar 24 05:23:07 2025 +0000

    utils: Always force terminator for tds_dir_from_cstr

    We explicitly convert the terminator so it should be already
    terminated. But won't hurt force setting it.
    Also check MultiByteToWideChar is not returning wrong values.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Apr 18 20:29:27 2025 +0100

    Define and use more cursor constants

    Mainly style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Apr 18 10:20:19 2025 +0100

    odbc: Fix linker issues with wide support disabled on Windows

    Do not attempt to export wide functions if they are not compiled.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Apr 18 10:19:19 2025 +0100

    odbc: Do not give warnings compiling with wide support disabled

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Apr 18 10:18:08 2025 +0100

    dblib: Remove an unused warning on Windows

    UNITTEST variable is not used if systems, like Windows, does not
    support fstat.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Apr 17 20:41:06 2025 +0100

    tests: Reuse bool, make symbols static

    Use bool type for "failed" variable.
    Do not export functions or variables from tests if not needed.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Apr 17 19:30:16 2025 +0100

    doc: Sync web pages

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Apr 15 20:53:52 2025 +0100

    dblib: Check NULL behaviour in t0014 test

    Check dbreadtext does not crash on NULL values.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Mar 24 05:18:57 2025 +0000

    dblib: Allows to pass NULL to dbsetifile

    As documented by Sybase passing NULL should reset to the default
    value.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Apr 15 21:21:57 2025 +0100

    dblib: Fix dbreadtext crash on NULL values

    NULL values have column_cur_size < 0.
    Do not use negative values for size, thread NULL values has having
    size zero. This will cause dbreadtext to return 0, which is the
    correct value.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Apr 15 20:53:11 2025 +0100

    dblib: Compatibility with Sybase libraries for t0013 and t0014 tests

    DBTDS_7_2 is only FreeTDS.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Apr 15 20:52:21 2025 +0100

    dblib: Add some assert in some tests

    Make sure memory allocations did not fail.
    Check some unexpected result from dbreadtext.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Apr 15 20:50:20 2025 +0100

    dblib: Make some variable static

    Reduce scope, no need to export them, they are not used
    outside tests.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Apr 15 20:48:11 2025 +0100

    dblib: Use bool in t0013 and t0014 tests

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Mar 29 15:08:48 2025 +0000

    apps: Remove warning compiling with MSVC

    Specifically:

        warning C4996: 'unlink': The POSIX name for this item is deprecated.
        Instead, use the ISO C++ conformant name: _unlink.
        See online help for details.

    This was introduced by commit 0c5059e394f19e
    (cfr "Makes macros.h independent from other headers").

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Mar 28 05:23:35 2025 +0000

    More robust filename comparison on log_elision.c

    Problem reported by Craig A. Berry.
    On OpenVMS the check for log was failing due to different
    syntax of file names.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Mar 27 07:36:08 2025 +0000

    dblib: Remove server and timeout override in some tests

    I never used this feature.
    Also it's confusing with last changes and printing the wrong
    executable name if used.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Wed Jul 17 15:38:03 2024 -0400

    Centralize test login info (PWD file) handling.

    Extend the recently introduced tds_test_base library to supply a new
    COMMON_PWD data structure (mostly based on ctlib tests'), an instance
    thereof (the only one in practice), functions for working with it, and
    the default (relative) path to try.  Adjust everything else to use
    this setup rather than a local variant thereof.  Let historical
    variable names such as SERVER continue to work within dblib tests
    because all online dblib tests need to consult them, but explicitly go
    through the instance elsewhere, including dblib tests' common.c.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Wed Jul 17 14:57:08 2024 -0400

    Optionally suppress crash dialog boxes for tests on Windows.

    Consult the environment variable DIAG_SILENT_ABORT (if present),
    looking for a value starting with Y or y.  To that end, adjust
    TEST_MAIN to call test-specific entry points test_main and incorporate
    a new tds_test_base library defining a wrapper main that, on Windows,
    first suppresses any possible source of crash dialog boxes.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Wed Jul 17 13:31:26 2024 -0400

    unit tests: Formally designate entry points as TEST_MAIN().

    Define it in the recently introduced <freetds/utils/test_base.h>
    (which now includes <freetds/macros.h> accordingly) as

      int main(int argc TDS_UNUSED, char **argv TDS_UNUSED)

    so that main can have the same signature in tests that ignore any
    arguments as in tests that consult arguments without yielding any
    warnings.  Use this macro for all tests to pave the way for
    introducing a central main wrapper around what will then be a
    test-specific test_main.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Mar 26 10:26:37 2025 +0000

    Makes macros.h independent from other headers

    This header can be potentially be included very earlier.
    Avoid having it dependent on other larger headers.
    This can cause some compilation error in some environments
    like MingW.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Wed Jul 17 12:32:39 2024 -0400

    unit tests: Start phasing in a central baseline setup.

    * Introduce a <freetds/utils/test_base.h> that for now simply ensures
      that assertions in test-specific code will always be active and
      pulls in <config.h>.  (Tests that use assertions are still responsible
      for including <assert.h> themselves, but <config.h> is generally best
      included as early as possible.)
    * Start every common.h with #include <freetds/utils/test_base.h> and
      src/tds/unittests/{parsing,tls}.c with #include "common.h".  (Every
      other unit test with an accompanying common.h already had that form.)
    * Don't directly undefine NDEBUG or include <config.h> anywhere in
      */src/unittests.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Mon May 13 15:09:06 2024 -0400

    ct_get_data: Populate cmd->iodesc->name more efficiently.

    Explicitly build cmd->iodesc->name and update ...->namelen along the
    way rather than calling sprintf and strlen (which can be slow).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 23 11:07:47 2025 +0000

    Remove -no-install warnings for Mac OS

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 23 10:56:10 2025 +0000

    ci: Build tests under Mac OS

    Just build the test, at least check if they compile.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 23 05:21:08 2025 +0000

    Remove some -Wconversion warnings

    In ct.c we already tested the numbers were not negative.
    For tests force conversions, we expect numbers not to be negative.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 23 09:36:11 2025 +0000

    Do not compile some empty modules

    Some systems (like Mac OS) complains that module (c files) are
    empty, not exporting any symbols.
    This is due to conditional compilation in some files.
    Replacement functions are compiled only if missing (poll, socketpair).
    Some code is only used on Windows (gettimeofday.c, win_mutex.c).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 23 08:21:26 2025 +0000

    Remove usage of WIN32, WIN64 and __WIN32__ macros

    _WIN32 is always present for Windows having at least 32 bit, so
    no need to check either WIN32 or __WIN32__.
    WIN64 is not used in code, _WIN64 can be used instead if needed.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 23 05:49:36 2025 +0000

    odbc: Minor changes to parse hexadecimal numbers

    The assert it's testing condition that cannot happen, pretty
    paranoid.
    Convert to lower case instead of upper case so simplify (with or
    the constant is simpler than with and).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 23 05:47:04 2025 +0000

    Do not include assert.h if not used

Author: Craig A. Berry <craigberry@mac.com>
Date:   Sat Mar 22 14:55:25 2025 -0500

    VMS build updates

    Find OpenSSL 3.x if available.
    Build tweaks to avoid unrecognized symbols.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Wed Jul 17 16:08:10 2024 -0400

    Formally address static analyzer concerns.

    * Add more explicit sanity checks and initializers.
    * vstrbuild.c (tds_vstrbuild): Use unsigned int for counts that will
      never be negative.
    * rpc_ct_setparam.c (ex_display_results): Avoid memory leaks in some
      error cases.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Wed May 8 16:21:30 2024 -0400

    Fix compilation errors in single-threaded builds.

    * Conditionally stub out the tests that require threading (as of 1.4.12)
      and don't yet have such logic.
    * include/freetds/thread.h: Never try to add extra checks around stubs.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Mar 21 08:50:34 2025 +0000

    Reuse TDS_MIN and TDS_MAX macros

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Mar 21 07:45:08 2025 +0000

    tds: Move tds_put_buf to login.c

    It's used specifically for login.
    In the meantime use TDS_PUT_BYTE instead of tds_put_byte to avoid
    a possible warning and and reuse TDS_MIN.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Mar 21 07:42:35 2025 +0000

    tds: Introduce and reuse TDS_MAX, TDS_MIN and TDS_CLAMP

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Mar 21 04:35:33 2025 +0000

    tds: Add some comments in tds_numeric_to_string

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Tue May 28 15:16:52 2024 -0400

    Address most implicit conversion warnings.

    - Harmonize variable, parameter, etc. data types more fully.
    - Adjust system API usage accordingly:
    -- For some string constants, use sizeof() - 1 in lieu of strlen,
       taking care to ensure they come from array variables.
    -- Keep format specifiers for printf et al. in sync with argument types.
    -- dbprrow: Account for the fact that printf always uses int for
       dynamic widths by substituting memchr + fwrite.
    -- odbc/prepare_query.c (prepared_rpc): Substitute atoi for strtol
       (already used with no endptr) when populating TDSINT4.
    - Cast away some remaining discrepancies where safe, in some cases by
      taking advantage of TDS_PUT_* macros.
    - ctlib.h: Explicitly define _CS_CURS_TYPE_* in terms of
      TDS_CURSOR_STATE_* rather than duplicating their values.
    - odbc_util.c: #include <stddef.h> for ptrdiff_t (now used in
      odbc_set_string_flag).
    - tds_parse_conf_section: To legitimize a cast, tighten debug_flags'
      range check on systems where int is narrower than long.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Mar 14 10:43:38 2025 +0000

    Remove some warnings compiling with -Wconversion

    This option detect problems truncating integer numbers and
    changing sign.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Mar 12 08:07:12 2025 +0000

    doc: Update note on release process

    Mostly removal of old notes.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Mar 6 20:36:46 2025 +0000

    doc: Sync web pages

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Mar 12 04:23:56 2025 +0000

    Avoid some warnings if -Wconversion is used

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Mar 12 04:24:38 2025 +0000

    Use sizeof instead of constants

    Make easier to change buffer size and code more readable.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Mar 12 04:19:07 2025 +0000

    tds: Use size_t for tds_timestamp_str buffer size

    More appropriate type.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Mar 11 19:39:20 2025 +0000

    doc: Update software used for release

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Mar 11 19:41:22 2025 +0000

    odbc: Add a comment about usage of iODBC extension

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Mar 11 19:41:03 2025 +0000

    odbc: Use more verbose and clear names for some Unicode macros

    Makes code more clear.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 9 21:08:14 2025 +0000

    odbc: Add missing potential iconv library to tests

    If iconv library is needed it wasn't find linking some tests.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 9 21:07:04 2025 +0000

    odbc: Implement SQL_ATTR_DRIVER_UNICODE_TYPE

    It's a iODBC extension to get the type of Unicode driver.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Mar 8 22:02:07 2025 +0000

    doc: Remove obsolete note from README file

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 9 21:09:14 2025 +0000

    tds: Remove warnings about some unused parameters

    This apply to system still using OpenSSL 1.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 9 08:42:50 2025 +0000

    odbc: Remove obsolete TODO in SQLSetConnectOption

    vParam should be always be the same size as the pointer.
    Also write vParam converted to avoid printing part of it during
    logging in case of 64 bit environments.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 9 08:40:39 2025 +0000

    odbc: Avoid potentially usage of NULL pointer

    "params" can be used uninitialised in case of new_query allocation
    failure.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Mar 8 22:01:06 2025 +0000

    tds: Avoid some possible conversion warning in some tests

    Specifically:

      CC       charconv.o
    charconv.c:105:20: warning: implicit conversion from 'int' to 'char' changes value from 194 to -62 [-Wconstant-conversion]
      105 |                 buf[*pos] = 0xC0 + (x >> 6);
          |                           ~ ~~~~~^~~~~~~~~~

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Mar 8 21:56:49 2025 +0000

    odbc: Use correct type for wide characters in utf8_4 test

    Some Driver Manager do not define WCHAR type, use SQLWCHAR which
    is the same type used below in the code.

