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.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Mar 6 11:09:30 2025 +0000

    docs: Update website, lessen mailing list references

    The mailing list has not been used for a while.
    Start deprecating it.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Mar 5 09:24:15 2025 +0000

    doc: More updates on user guide

    Point to GitHub project page instead of mailing list, not used
    for a while.
    UCS-2 -> UTF-16 where it makes sense.
    Characters -> units for UTF-16.
    Minor update for code, errors to stderr.
    Update some link URLs.
    Update shebang line for Perl to use env program.
    Add a small section for Solaris.
    Remove some proposed project nobody started working for ages.
    Update section with links to protocol documentation.
    Remove link to Microsoft dblib, removed time ago.
    FreeTDS convert also Sybase character encoding, not only
    Microsoft.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Mar 5 09:32:46 2025 +0000

    doc: Minor fixed to userguide

    Use empty elements.
    String quoted with double quote.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Mar 5 05:52:09 2025 +0000

    doc: Multiple updates to userguide

    Remove Alternatives section, pretty obsoleted.
    Update some version to 1.5 instead of 1.4.
    Remove lot of reference to the mailing list, nowadays Github
    project is used instead, mailing list hasn't been used for more than
    a year.
    Update some tool version used.
    Update link to GNU make.
    Remove special section for Mac OS X, now compiling normally.
    Collation is always used on MSSQL, remove an obsolete comment about it.
    Now .freetds.conf file can be in ~/.config under Unix.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Mar 3 11:14:40 2025 +0000

    Fix some markdown formatting in NEWS file

    Remove additional wrong end of verbatim quote in the middle.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Mar 3 11:13:29 2025 +0000

    Bump version number in preparation for next release

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Feb 27 20:27:29 2025 +0000

    replacements: Ignore some unused parameters usage

    Avoid warnings like:

        src/replacements/iconv.c: In function ‘get_iso1’:
        src/replacements/iconv.c:251:41: warning: unused parameter ‘len’ [-Wunused-parameter]
          251 | get_iso1(const unsigned char *p, size_t len, ICONV_CHAR *out)
              |                                  ~~~~~~~^~~

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Feb 27 19:41:24 2025 +0000

    Update NEWS.md file

    Quote "_" when needed.
    Remove NCBI comment.
    Collapse and reorder some lines.
    Quote some literals (like code or filenames).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Feb 25 04:28:27 2025 +0000

    odbc: Fix nullable result from SQLDescribeParam

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

    From Microsoft documentation (SQLSetDescField):

        In IPDs, this field is always set to SQL_NULLABLE because
        dynamic parameters are always nullable and cannot be set by
        an application.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Feb 24 20:54:00 2025 +0000

    Merge news update with another branch

    Specify updates from NCBI.
    Close lists with dot instead of semicolon.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Feb 24 20:29:26 2025 +0000

    Update NEWS.md file with changes from previous release

    Start preparing for new release.
    Just went through the git logs.
    More than expected.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Feb 20 02:10:43 2025 +0000

    ci: Add MSSQL 2022 to nightly tests

    Some tests requires more updated servers.
    Particularly SQLDescribeParam implementation requires MSSQL 2012+.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Feb 19 05:38:48 2025 +0000

    tds: Allows freetds.conf to be stored in ~/.config

    More modern location for the file.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Feb 19 05:16:56 2025 +0000

    Update old TODO files

    Probably should be mostly removed.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Feb 19 05:16:17 2025 +0000

    odbc: Mark SQLDescribeParam as implemented in various files

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Feb 19 00:11:51 2025 +0000

    odbc: Update commented out SQLBrowseConnect

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Feb 7 06:44:37 2025 +0000

    odbc: Implement SQLDescribeParam using sp_describe_undeclared_parameters

    Prepare query in order to pass it to sp_describe_undeclared_parameters,
    then parse reply in order to extract parameter types.
    A dummy TDSCOLUMN is filled to be passed to odbc_set_sql_type_info.

    Some behaviour from MS driver:
    - parameter information are stored inside IPD and returned
      by SQLDescribeParam;
    - reset IPD and APD on prepare;
    - do not attempt to get parameter types if we bound some parameter;
    - do not query parameter types multiple times.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Feb 4 21:21:28 2025 +0000

    odbc: Add test for SQLDescribeParam

    The purpose is to implement it using MSSQL 2012
    sp_describe_undeclared_parameters stored procedure.
    So test is written to reproduce MS behaviour.
    We cannot use temporary table as the stored procedure seems to not
    handled them.
    Checking IPD fields is important to understand and reproduce MS
    behaviour correctly.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Feb 17 21:51:49 2025 +0000

    odbc: Allows to reset descriptors

    Setting record count to 0 is allowed.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Feb 17 10:45:00 2025 +0000

    odbc: Do not change behaviour if extra checks are enabled

    Debug code should not change behaviour.
    Debug code was skipping some part if no result set was present.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 16 20:44:10 2025 +0000

    odbc: Reuse tds_ascii_strupr function

    Remove TODO reusing function already present.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 16 18:18:35 2025 +0000

    odbc: Fix typo in comment (propretary -> proprietary)

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 16 18:05:40 2025 +0000

    odbc: Fix typo in comment (idp -> ipd)

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Fri May 10 16:50:24 2024 -0400

    _ct_handle_client_message: Report system errors' descriptions.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Feb 10 06:03:54 2025 +0000

    odbc: Return correct type from odbc_set_stmt_query

    Make clear we return an ODBC error code.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Feb 9 09:29:42 2025 +0000

    odbc: Use bool for odbc_lock_statement return

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Feb 8 18:11:35 2025 +0000

    odbc: Add missing SQL_GUID type to sql types for tests

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Feb 8 18:10:15 2025 +0000

    tds: SYBNVARCHAR type is only Sybase, move definition in header

Author: Maksim Korotkov <m.korotkov@postgrespro.ru>
Date:   Thu Feb 6 22:17:23 2025 +0300

    pool: added missing deallocations

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Feb 7 06:06:41 2025 +0000

    odbc: Reuse some common definition in tests

    odbc_lookup_int structure.
    odbc_lookup_value function.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Feb 6 07:52:48 2025 +0000

    odbc: Allows to reuse lookup table for SQL types in tests

Author: Maksim Korotkov <m.korotkov@postgrespro.ru>
Date:   Tue Feb 4 10:32:34 2025 +0300

    dblib: fixed incorrect error handling

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Feb 5 21:21:51 2025 +0000

    odbc: Avoid possible leak detection on driver unload

    For debug Windows build if the ODBC driver is unloaded a leak
    detector is activated.
    It looks like from AppVeyor logs that sometimes during the leak
    detector some leak are detected.
    To avoid these false positive free memory before calling
    SQLFreeEnv (which could unload the driver from memory).
    Also decrease socket library counter calling WSACleanup().

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Feb 4 20:38:02 2025 +0000

    odbc: Small style update in tests

    Return type and function name in separate lines.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Feb 4 19:33:14 2025 +0000

    vms: Add some missing files to the project description

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Feb 4 19:32:59 2025 +0000

    dblib: Do not call TDS_ZERO_FREE on local variables

    It's useless to reset the pointer after freeing it.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Jan 31 08:31:00 2025 +0000

    Remove file added by mistake

    This file was added by commit 56bf3ca212354b0df93db118a09641bf39e84993
    ("tds: Small comment improve").

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Jan 30 04:24:59 2025 +0000

    tds: Remove ANSI encoding code from SSPI code

    The code already force Unicode at the beginning of the file,
    there's no need to keep around ANSI code.
    This removes the need of some pointer conversion.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jan 29 21:04:31 2025 +0000

    odbc: Minor raiserror test style updates

    Use a macro to print yes or no.
    Reuse CHKPrepare macro to call SQLPrepare and check for success.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jan 28 21:54:52 2025 +0000

    doc: Minor updates to which_api.html

    Remove some obsolete and misleading information.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jan 28 21:18:13 2025 +0000

    tds: Use bool for TDSBCPINFO::identity_insert_on and xfer_init

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jan 26 21:47:25 2025 +0000

    tds: Use bool for TDSDYNAMIC::emulated

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jan 26 21:48:13 2025 +0000

    misc: Update usage message for bounce.c utility

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jan 25 20:34:57 2025 +0000

    dblib: Compatibility with Sybase library for t0016 test

    Sybase library does not like query after bcp_init.
    Client charset "UTF-8" is not recognised.
    Avoids some warnings due to const pointers.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Thu May 9 15:42:10 2024 -0400

    tds7_send_record: Reject invalid NULL data.

    When the user erroneously supplies NULL data for a column which does not
    use a nullable type and is not otherwise known to be nullable, cleanly
    fail.  Pressing on anyway (in hopes that a server-side default would
    take effect?) was liable to trigger legitimate assertion failures in
    tds_checks.c.  To that end, take the null_error callback and invoke it
    before bailing unless it is itself NULL.

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

    bulk.c: Address some implicit conversion warnings.

    Cast away harmless discrepancies, mostly by taking advantage of
    TDS_PUT_BYTE.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jan 25 20:33:13 2025 +0000

    Continue else on same line after bracket

    Just style change.
    More coherent with the rest of the code.

Author: Vadim Zeitlin <vz-soci@zeitlins.org>
Date:   Thu Jan 23 00:35:15 2025 +0100

    Extend array test to check what happens without status array

    Add FLAG_NO_STAT flag which can be used to test the behaviour when
    SQL_ATTR_PARAM_STATUS_PTR is not specified.

    In this case we can't examine per-row status, but the SQL statement
    should still return the expected value, which is different from the one
    returned when status array is used in case of error.

    This commit is best viewed ignoring whitespace-only changes.

Author: Vadim Zeitlin <vz-soci@zeitlins.org>
Date:   Fri Jan 24 17:16:11 2025 +0100

    Fix return value when bulk operation not using status array fails

    In this case Microsoft ODBC driver returns SQL_ERROR instead of
    SQL_SUCCESS_WITH_INFO returned if status array is specified, which makes
    sense because otherwise the application wouldn't have any way to find
    out what went wrong: without the status array it's impossible to know
    which rows were affected by the error and so returning SQL_ERROR is both
    more logical and more compatible.

Author: Vadim Zeitlin <vz-soci@zeitlins.org>
Date:   Wed Jan 22 23:41:57 2025 +0100

    Use FLAG_PREPARE in array unit test

    No real changes, just prepare for the upcoming commit.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Jan 23 15:53:04 2025 +0000

    dblib: Update ct_dynamic code style

    Use check_call if possible, line number is enough if test
    fails.

Author: Vadim Zeitlin <vz-soci@zeitlins.org>
Date:   Thu Jan 23 00:32:42 2025 +0100

    Allow array unit test to pass with Microsoft ODBC driver

    It returns SQL_SUCCESS_WITH_INFO even when not using prepared statements
    and errors happen and, more surprisingly, gives more errors from the
    insert-and-update query.

    Make the minimum changes to let the test pass with this driver without
    changing its behaviour when using the FreeTDS driver.

Author: Vadim Zeitlin <vz-soci@zeitlins.org>
Date:   Thu Jan 23 00:30:50 2025 +0100

    Initialize row passed to SQLGetDiagField() to 0 in array test

    Otherwise Microsoft ODBC driver returns some garbage in it: it seems to
    not clear the high word of SQLINTEGER in 64 bit builds, even though it
    should, but without this commit we were getting errors like

    invalid row 1448476673 returned reading error number 1

    when using this driver.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Tue May 21 14:46:04 2024 -0400

    Fully retire unread variables.

    All could at least potentially receive updates, but they were never
    consulted or even logged.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Jan 23 03:02:29 2025 +0000

    ctlib: Reuse check_call macro in t0002 test

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Jan 23 03:01:56 2025 +0000

    ctlib: Remove useless call to ct_results

    There should be all CS_SUCCEED results followed by a last CS_END_RESULTS.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Mon May 13 14:50:25 2024 -0400

    ctlib: Better support new date/time types (DATETIME2, etc.)

    * Allow _cs_convert to accept an explicit TDS destination type; direct
      it to copy cres.dta if that destination type is SYBMS{DATE,TIME}*.
    * _blk_get_col_data: Don't give _cs_convert_not_client any data to
      convert (blindly in the wrong direction!); rather, if it indicates
      that the column holds a new MS type, supply an explicit TDS
      destination type to _cs_convert.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Jan 20 17:53:11 2025 +0000

    Revert "ctlib: Convert correctly MS date/time data for bulk copy in"

    This reverts commit f5c1e191cf2a770f5af8fc8b87c6f75a31ed4d31.

    Aaron commit solving this issue is simpler.

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

    Address Windows build errors, most config-dependent.

    * In the absence of an external SQLGetPrivateProfileString, fail the
      build only when expecting to use an external driver manager, and
      expose tds_SQLGetPrivateProfileString to the odbc "connect" unit test.
      Don't let that test attempt to use SQLGetPrivateProfileStringW even in
      Unicode builds.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Oct 20 13:08:07 2023 +0100

    utils: Reduce comparisons between signed and unsigned

    Indexes are better if they use size_t to avoid potential
    conversion although compilers today are good enough to avoid
    them.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jan 22 15:57:46 2025 +0000

    odbc: Add test for SQL_C_STINYINT type

    Tested also with Microsoft driver.
    TestInput tests both SQLFetch and SQLBindParameter.

Author: Vadim Zeitlin <vz-soci@zeitlins.org>
Date:   Wed Jan 22 16:58:00 2025 +0100

    Fix handling of SQL_C_STINYINT

    Map it to SYBSINT1 so that it is stored as signed, and not unsigned as
    before, in the database.

    Closes #627.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jan 22 07:30:52 2025 +0000

    dblib: Reuse replacements.h header for snprintf

    snprintf macro is used for some compilers having _snprintf instead.
    The same definition (and more) is in replacements.h header.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jan 21 19:16:21 2025 +0000

    ctlib: Improve blk_in test

    Check inserted data.
    Allows to execute multiple tests.
    Allows to write tests using input file.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Mon May 13 14:50:25 2024 -0400

    ctlib: _cs_dt_crack_v2: Formally populate datetzone from dr.timezone

    Still always 0 in practice.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jan 21 19:18:33 2025 +0000

    tds: Use bool type for from_malloc

    Just style change.
    More readable.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jan 21 19:17:45 2025 +0000

    tds: Fix typo in comment

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jan 18 11:04:34 2025 +0000

    dblib: Update t0016 test style

    Use bool for boolean variables.
    Fix some indentation in "failure" function.
    Update some function definition splitting return type in a separate
    line.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Jan 17 16:04:15 2025 +0000

    ctlib: Convert correctly MS date/time data for bulk copy in

    _cs_convert_not_client was written to help converting type from
    CT-Library data, not to CT-Library data.
    This results in wrong encoding for MS date/time columns.
    Write a new _blk_to_not_client to convert to TDS type not
    matching CT-Library types.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Jan 17 16:08:28 2025 +0000

    ctlib: Update blk_in test style

    Remove spaces at the end of lines.
    Make variables static.
    Remove some unused definitions.
    Make "command" a local variable.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Jan 17 11:45:42 2025 +0000

    ctlib: Improve _cs_convert_not_client doc and style

    Add some comments to inline documentation.
    Rename type to srctype, more readable and meaningful.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Jan 16 17:41:38 2025 +0000

    tds: Add support for SYBSINT1 type conversion

    Never personally encountered but won't hurt.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Jan 16 17:41:29 2025 +0000

    tds: Fix typo in comment (directed -> directly)

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jan 14 19:42:38 2025 +0000

    doc: Minor updates to website

    Remove some obsolete information from FAQ.
    Add link to GitHub project for issues and questions.
    Use https instead of http for some links.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Jan 13 08:12:55 2025 +0000

    ctlib: Reuse check_call macro in timeout test

    Reduce code.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jan 8 15:18:04 2025 +0000

    ctlib: Remove initial underscore from field names

    Other fields do not start with underscore.
    Just style change.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Thu Dec 19 14:02:11 2024 -0500

    Introduce CS_INTERRUPT_CB and corresponding return values: CS_INT_*.

    Define CS_INTERRUPT_CB's numeric value alongside other CS_*_CBs';
    start a new 94xx range to avoid confusion with properties.
    (Sybase/SAP ctlib has no such callback.)  Allow specification on
    either the connection or the context level as usual, with the help of
    a shim installed on demand to minimize interference with tds_select's
    optimization for the no-handler case.  For CS_INT_*, copy TDS_INT_*
    and confirm their equality at compile time as with CS_NULLTERM et al.

    Add a test roughly modeled on dblib's timeout.c unit test, which
    (alone) exercises the corresponding db_setinterrupt API.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jan 8 15:48:20 2025 +0000

    List TDS types explicitly instead of using "default"

    New types will trigger new warnings.
    Also handle some additional types in dbpivot function.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Tue May 21 14:52:30 2024 -0400

    Acknowledge non-exhaustive TDS_SERVER_TYPE switch statements.

    Add no-op default cases to switch statements that don't explicitly cover
    all of TDS_SERVER_TYPE.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Jan 3 17:47:48 2025 +0000

    ci: Wait for grabcov process to terminate

    Since addition of internal checks in tdspool the test that uses
    tdspool takes more times, sometimes more than other tests.
    This cause the script to fail as it tries to use some files that
    in the meantime get deleted as the test is still running.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 29 21:39:42 2024 +0000

    odbc: Fix typo in comment

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 27 16:41:44 2024 +0000

    odbc: Wrap SQLNumParams in CHKR2 macro like most of other ODBC calls

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 27 14:39:20 2024 +0000

    Set TCP_NODELAY after accepting connected sockets

    Reduce latency.
    Currently affecting only tests (tds_listen function in server
    code is used only for a test).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 27 14:20:53 2024 +0000

    ci: Remove GitHub dist action

    There's already an official distribution from the official
    website using a more stable environment, keep using that one.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 27 14:07:44 2024 +0000

    odbc: Change development conditions for tokens tests

    Use all tests if driver is Microsoft one.
    The target is making our driver behave like Microsoft one.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 27 13:44:52 2024 +0000

    odbc: Fix minor spaces in tokens test

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 27 09:00:15 2024 +0000

    odbc: Add test for SQLFetch behaviour

    Not much working currently.
    Trying to match behaviour between our driver and Microsoft one.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 27 09:01:26 2024 +0000

    odbc: Use proper type for tds_process_tokens flags

    The type is unsigned due to passing a series of bit flags.
    Mainly style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jan 16 11:25:41 2016 +0000

    pool: Add some internal checks

    Enabled with --enable-extra-checks.
    Check state of TDS_POOL structure.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Dec 25 17:58:21 2024 +0000

    odbc: Factor out function to copy data to client data

    Mainly style change, odbc_SQLFetch function is pretty big.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Dec 25 10:16:56 2024 +0000

    odbc: Reduce some variables scope in odbc_SQLFetch

    Mostly style changes.
    Reduce scope for "colinfo", "len" and "drec_ard".
    Change "truncated" type from int to bool.
    Make "ard" more constant and reuse it.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Dec 23 09:39:59 2024 +0000

    odbc: Fix typo in Windows dialog

    AUDIO -> AUTO.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 25 20:33:27 2023 +0000

    odbc: Allows to set version to "AUTO" from Windows dialog

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jul 10 08:01:17 2024 +0100

    Add support for TDS 8.0

    TDS 8.0 is very similar to 7.4.
    The protocol difference is that TLS layer is not wrapped inside TDS
    during login.
    The other difference is that the usage of TDS 8.0 by default requires
    certificate validation.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 21 16:54:08 2024 +0000

    ctlib: Sort result type constants

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 21 16:53:47 2024 +0000

    ctlib: Add preprocessor defines for ct_command options

    Allows preprocessor checks.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 21 09:19:02 2024 +0000

    ctlib: Better definition for TDS version constants

    Sybase headers use macro defines, use also for our headers.
    This allows preprocessor checks.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 21 09:17:52 2024 +0000

    ctlib: Start supporting TDS 8.0

    Make it possible to set or query TDS 8.0.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 21 09:17:17 2024 +0000

    ctlib: Add a comment about extensions

    There are currently quite some FreeTDS extentions but they are not
    marked. Start to mark them so easy documentation.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Thu Dec 19 13:30:36 2024 -0500

    ct_con_props: Support getting CS_PRODUCT_NAME.

    Sybase/SAP ctlib has no such property, so use the next available 93xx
    numeric value.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Thu Dec 19 13:13:44 2024 -0500

    ct_con_props: Support getting CS_ENDPOINT (socket file descriptor).

    Use Sybase/SAP ctlib's name and numeric value for the property.

Author: chai min <chaim_yangmq@163.com>
Date:   Fri Dec 13 17:20:55 2024 +0800

    ci: Workflow dependencies pinned using hash values

    To ensure stability and improve build reproducibility, updated the
    dependency repository version from version to a pinned hash.
    This approach avoids potential issues caused by moving or deleting
    tags and ensures that all environments use the same dependency version.

Author: chai min <chaim_yangmq@163.com>
Date:   Fri Dec 13 17:01:48 2024 +0800

    ci: Set default workflow permissions to read-only

    Declare default permissions as read-only for all jobs in the
    workflow to follow the principle of least privilege.
    This enhances security by limiting the permissions available to
    the actions run within this workflow.

        permissions: read-all

    This change ensures that any action in this workflow can only read
    repository data unless explicitly granted write access.
    Explicit permission settings for specific jobs or steps should be
    used when write access is required.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 13 18:33:55 2024 +0000

    odbc: Remove a format warning from test

    Specifically:

        c2string.c:80:26: warning: format specifies type 'long long' but
        the argument has type 'SQLBIGINT' (aka 'long') [-Wformat]

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 13 18:34:50 2024 +0000

    Remove missing declaration without prototype warning

    Specifically remove:

        warning: a function declaration without a prototype is deprecated
        in all versions of C [-Wstrict-prototypes]

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 13 18:24:30 2024 +0000

    Remove declaration without prototype warning

    Specifically remove:

        warning: a function declaration without a prototype is deprecated
        in all versions of C [-Wstrict-prototypes]

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 13 18:12:26 2024 +0000

    server: Improve message writing functions

    tds_send_err is very similar to tds_send_msg, only the token changes.
    Improve and fix tds_send_eed; currently it's not used.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 13 05:29:25 2024 +0000

    odbc: Allows the parser to parse not using a file

    Pass a function and a parameter instead, allowing, for instance
    to use a string as input, or dynamic generating the commands.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 13 05:27:01 2024 +0000

    odbc: Cache TDS version before initialising parser in tests

    For Microsoft driver we need to interrogate the server in order
    to understand TDS version.
    This was done in odbc_init_parser, however, if we want to reuse
    the parser alone it's not a good idea to randomly poke with
    the server, so do it explicitly after the connection outside
    the parser.
    Still the parser could call odbc_tds_version running tds_version_cmp
    command.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 8 19:05:12 2024 +0000

    server: Do not overwrite error before displaying it

    Potentially CLOSESOCKET could override the error which is
    needed by perror, so call perror before CLOSESOCKET.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 8 17:00:11 2024 +0000

    odbc: Remove some duplicated code in timeout3 and freeclose tests

    Fake server initialisation function was exactly the same.
    In the meantime return bool from init_fake_server instead of int.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Dec 12 21:23:33 2024 +0000

    odbc: Reduce code duplication in insert_speed test

    insert_test_auto and insert_test_man were almost identical.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Dec 12 04:53:13 2024 +0000

    tds: Use more TDS_PROPAGATE

    Reuse the macro to reduce code size.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 8 20:15:43 2024 +0000

    odbc: Make test parser more self contained, avoid globals

    Incapsulate everything in a structure.
    This also allows to parse multiple files at a time.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jul 16 15:12:52 2024 +0100

    tds: Set ALPN for TDS 8.0

    TDS version for 8.0 is agreed base on ALPN (if not present at the
    moment TDS 8.0 is assumed).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Dec 11 20:17:00 2024 +0000

    Remove now unused variable

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Dec 11 20:10:15 2024 +0000

    odbc: Allows SERVER to override DSN or SERVERNAME settings

    This is compatible with Microsoft behaviour; you can use
    information from DSN in connection string but override them
    with other attributes in the connection string.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Dec 11 06:11:17 2024 +0000

    tds: Use inline for tds_socket_init and tds_socket_done

    For historical reasons a lot of macros were used instead of
    inline functions.
    We already use in other places inline functions so it's no
    more a portable issue.
    The implementation of these function is small and we don't
    need additional headers.
    This allows reuse in code not linking all libtds library (like
    ODBC tests).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Dec 11 04:55:55 2024 +0000

    tds: Use bool for winsock_initialized

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Dec 11 04:54:54 2024 +0000

    tds: Unify some compile time Windows check

    Checking _WIN32 is enough.
    All compilers, all versions of Windows (even 64 bit) defines it.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 10 22:25:29 2024 +0000

    ci: Disable MSSQL 2017

    Apparently the server is refusing any connection.
    Maybe a temporary issue in the registered server in Docker Hub.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 10 20:32:33 2024 +0000

    ctlib: Improve some log messages

    More verbose message if conversion fails during bulk transfer.
    Fix action name in ct_con_props.

    Changes initially from John J. Boia.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 8 19:42:54 2024 +0000

    odbc: Use bool for condition in test parser

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 8 19:04:56 2024 +0000

    tds: Avoids a call to strlen in tds_submit_rpc

    tds_put_string can compute the length for us.
    In other places we use that computation other times so it's worth
    keeping.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 8 16:59:46 2024 +0000

    odbc: Make common test library build more similar

    Cmake already included more sources in common library, do
    the same for Autoconf.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 8 16:58:02 2024 +0000

    odbc: Remove global variable in freeclose test

    Move fake_sock inside fake_thread_proc function.
    Reduces visibility and global space pollution.
    No functional change, the variable was not used globally.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 8 15:49:08 2024 +0000

    odbc: Use bool for ini_override variable

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 8 15:48:31 2024 +0000

    odbc: Avoid pointer to static string

    Minor optimisation, no reason to have a static pointer to
    a static buffer.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 8 13:03:22 2024 +0000

    ctlib: Add support for setting hints for bulk copy

    This is an extension as Sybase does not support hints.
    Microsoft supports hints using bcp_control.
    Hints are passed as a string using blk_props.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 8 11:37:46 2024 +0000

    server: Pass correct packet size environment in test server

    Sybase and Microsoft use different packet sizes.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 8 11:38:28 2024 +0000

    server: Return 0 rows during login

    There's no rows involved.
    No functional changes, clients were happy even before.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 8 11:36:47 2024 +0000

    server: Pass -1 as length to tds_put_string

    tds_put_string will compute string length using strlen, this
    simplify calling the function.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 8 11:34:39 2024 +0000

    server: Support no-ASCII characters in environment names

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 8 11:11:38 2024 +0000

    server: Fix tds_send_login_ack product name length

    This length was recently broken.
    Not an issue for FreeTDS as, for some implementation bug, that
    length is not used but MS drivers are complaining.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 8 11:10:09 2024 +0000

    server: Update wrong comment in code

    Order was reversed.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Fri May 10 10:21:51 2024 -0400

    read.c (tds_get_n): Avoid potential hangs on short replies.

    Don't bother trying to receive data following a packet marked as last;
    rather, bail if still short.  Whenever bailing, close the socket on
    the way out to contain the damage from having fallen out of sync.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 7 16:26:26 2024 +0000

    tds: Minor style updates

    Fix some comments.
    Make tds_get_usmallint more similar to tds_get_uint.
    Remove end of function comment for tds_peek, we don't use such
    comments (and the function is small).
    Remove double separation lines (spaces).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 7 14:13:52 2024 +0000

    odbc: Fix compatibility with MS BCPHINTS definition

    The MS value is 10 or 11 depending on Unicode settings.
    For some reason FreeTDS implementation used the value 6 which
    clash with some MS ABI definition.
    Keep compatibility but update definitions for new programs.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 7 11:03:01 2024 +0000

    server: Update prelogin reply

    Include MARS, allows TDS 7.2.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 7 12:49:31 2024 +0000

    ci: Enable CT-Library tests for GH Linux action

    Tests were disabled due to concurrently issues in cancel test.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 7 12:19:07 2024 +0000

    ci: Enable ODBC tests for GH Linux action

Author: Mikhail Terekhov <termim@gmail.com>
Date:   Wed Dec 4 00:44:52 2024 -0500

    ci: Add Windows action

Author: Mikhail Terekhov <termim@gmail.com>
Date:   Wed Dec 4 00:36:46 2024 -0500

    ci: Add MacOS action

Author: Mikhail Terekhov <termim@gmail.com>
Date:   Sun Dec 1 13:48:50 2024 -0500

    ci: Add Linux action

    Add build action for Linux.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 6 13:30:01 2024 +0000

    odbc: Set bcp hints to check bcp_control

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Dec 6 13:28:08 2024 +0000

    odbc: Reduce line size

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Dec 5 18:12:50 2024 +0000

    Make TDSBCPINFO::hint a DSTR

    Allows more flexibility, not just a constant string.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Dec 4 13:33:41 2024 +0000

    server: Improve sending data

    Fix column metadata encoding for TDS 7.2+.
    Reuse functions to send data instead of doing it manually.
    Better error handling.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Dec 5 07:10:25 2024 +0000

    tds: Small comment improve

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Dec 4 13:32:20 2024 +0000

    server: Better support for string conversion and UTF-8

    Do the conversion and take it into account computing protocol
    lengths.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Dec 4 13:30:20 2024 +0000

    server: Set SO_REUSEADDR option

    Allows to reuse the TCP port quicker.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Dec 4 13:29:31 2024 +0000

    tds: Add and reuse TDS_END_LEN_STRING utility

    Allows to easily convert and send strings.
    TDS_END_LEN did not take into account if it was a string or just
    a bunch of bytes sending the length.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 3 15:52:52 2024 +0000

    Use proper TDS_DONE_* constants calling tds_send_done_token

    Just style change, more readable.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Dec 3 15:52:11 2024 +0000

    Move TDS_DONE_* definitions to proto.h

    These definitions are related to the protocol so move them
    to the proper header.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Dec 2 23:05:47 2024 +0000

    server: Avoid leaks in tds_get_query_head

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Dec 2 23:05:15 2024 +0000

    server: Make specific row header function static

    Export only tds_send_table_header.

Author: Funda Wang <fundawang@yeah.net>
Date:   Tue Oct 1 14:26:57 2024 +0800

    odbc: Avoid version for ODBC driver

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Nov 7 20:24:07 2024 +0000

    odbc: Fix SQLGetInfo SQL_DRIVER_HSTMT and SQL_DRIVER_HDESC

    Although not supported without Driver Manager these options
    should return the internal pointers so if we don't have
    Driver Manager just return same pointers checking only
    the type of handle.

Author: Michael Kaufmann <mail@michael-kaufmann.ch>
Date:   Mon Oct 28 09:33:55 2024 +0100

    Use "TDS server" instead of "Adaptive Server" in error messages

    FreeTDS works with both Adaptive Server and Microsoft SQL Server, so a generic
    term should be used that works for both servers.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Oct 26 19:15:01 2024 +0100

    odbc: Remove spaces at end of line

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 6 20:07:05 2024 +0100

    misc: Allows to compile out-of-tree by prepare_win32.sh script

    Instead of having to build the distribution and unpack it allows
    to use main directory.
    This makes easier to share source files between Linux build and
    Windows build.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 6 20:04:24 2024 +0100

    odbc: Fix typo in comment

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 6 17:08:58 2024 +0100

    Update .gitignore files

    Remove some obsolete files.
    Limit most file ignore to current directory.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 6 17:56:16 2024 +0100

    apps: Add missing ignore file

    Ignore compiled defncopy test.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 6 13:14:34 2024 +0100

    server: Reply correct version for TDS 7.4

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 6 13:13:11 2024 +0100

    server: Update some code style

    Type and function name in a separate line.
    No block for a single statement.
    Bracket on the same line for "while", "if" and "for".

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 6 11:47:13 2024 +0100

    odbc: Do not undefine NDEBUG in tests, already in common.h

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 6 08:52:09 2024 +0100

    odbc: Update testodbc style

    Remove obsolete TODO note.
    Use standard bool type instead of crafting one.
    Avoid useless pointer.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 6 07:43:56 2024 +0100

    tds: Rename tds_g_append_mode to tds_append_mode

    The "tds_g_" prefix were used only for this variable.
    Make code more coherent.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 6 04:25:08 2024 +0100

    tds: Use bool for tds_write_dump

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Oct 5 21:41:55 2024 +0100

    tds: Rename "tmp" to "status"

    Although temporary no reason to not have a more meaningful name.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Oct 5 17:30:31 2024 +0100

    server: Use bool for tds_lastpacket

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Oct 5 15:34:30 2024 +0100

    odbc: Use bool for in_row variables

    Just a style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Sep 25 22:12:13 2024 +0100

    Ignore query errors during connection initial setup

    Not all servers support the queries we try.
    In particular some not Sybase server seems to reject most of them.
    In case of failure execute one query at a time ignoring errors if
    we don't need a correct result.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Sep 19 11:46:35 2024 +0100

    odbc: Separate UnixODBC part from connectparam.c

    That part of code is really Driver Manager dependent and
    pretty independent.

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

    ct_describe: Issue an error for unsupported server types.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Tue May 21 15:38:29 2024 -0400

    tds: Change column_bindlen field to signed type

    All usages assume a signed types.
    This change comes from a discussion in
    https://github.com/FreeTDS/freetds/pull/581

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Sep 10 19:58:07 2024 +0100

    ctlib: Write a function to reuse setting boolean configuration

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Sep 10 19:33:25 2024 +0100

    ctlib: Use bool instead of short to store boolean values for CS_CONFIG

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

    ctlib: Conditionally distinguish NULL and empty results.

    Introduce a new CS_NOTE_EMPTY_DATA ct_config property.  Its default
    value (CS_FALSE) indicates that ct_get_data should continue to report
    a length of zero for empty results; setting it to CS_TRUE directs it
    to report negative lengths for them.  This distinction is particularly
    helpful when running against MS SQL Server, which allows character and
    binary data to be empty.  In contrast, Sybase servers represent empty
    results via single pad bytes (space or NUL as appropriate), which
    count as empty to them because they ignore trailing padding.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Wed Aug 28 16:48:41 2024 -0400

    tds_setup_connection: Further conditionalize queries by product.

    Skip NVC and UVC queries under SQL Anywhere too and SPID query under
    OpenServer too.  To that end, pull out local is_anywhere and
    is_openserver variables.

Author: Maksim Korotkov <m.korotkov@postgrespro.ru>
Date:   Mon Aug 26 11:47:35 2024 +0300

    pool: avoided potential NULL dereference

    The result of tds_alloc_login() is usually checked against NULL before use.

    Found by Postgres Professional with ISP RAS Svace

Author: Maksim Korotkov <m.korotkov@postgrespro.ru>
Date:   Mon Aug 26 15:43:47 2024 +0300

    defncopy: avoid potential null dereference
    The tds_getpassarg() function may return a NULL value,
    which must be carefully checked before it is used.

    Found by Postgres Professional with ISPRAS Svace

Author: Maksim Korotkov <m.korotkov@postgrespro.ru>
Date:   Mon Aug 26 12:01:24 2024 +0300

    ctlib: fixed logic operator precedence

    Possible wrong assignment due to logic ops precedence.
    Changed by analogy to src/ctlib/blk.c

    Found by Postgres Professional with ISP RAS Svace

Author: Maksim Korotkov <m.korotkov@postgrespro.ru>
Date:   Mon Aug 26 11:02:03 2024 +0300

    server: login: fixed incorrect error handling

    Found by Postgres Professional with ISP RAS Svace

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Sep 10 16:17:58 2023 +0100

    replacements: Always provides poll

    Include poll.h if available so poll is available even if system
    provides it.
    For this reason remove inclusion of poll.h in various source
    files.
    Also move definition for poll replacement in poll.c to reduce
    include/freetds/replacements/poll.h.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jul 24 09:45:28 2024 +0100

    Disable Nagle's algorithm for socketpair

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Sep 10 16:17:58 2023 +0100

    Check POLLHUP with POLLIN

    Windows does not set POLLIN when the socket is closed
    on the other end but only POLLHUP.
    Check for both flags otherwise we are not able to detect
    the other end has disconnected.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jul 23 22:21:07 2024 +0100

    pool: Ignore extension in login packet

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jul 23 08:40:45 2024 +0100

    pool: Disable nagle algorithm on user socket

    Not giving any improvement, just delay.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Jul 22 21:25:37 2024 +0100

    tds: Add tds_socket_set_nodelay

    Extract from src/tds/net.c to be reused.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Mon Jul 22 14:26:44 2024 -0400

    tds_lookup_host: Fall back on unsupported address families.

    If getaddrinfo with AI_ADDRCONFIG enabled fails with an error pointing
    to that flag (EAI_FAMILY or, if defined, EAI_ADDRFAMILY), try again
    without it rather than immediately bailing.  The result will be useful
    only in corner cases (IPv6 loopback addresses on otherwise IPv4-only
    hosts or vice versa), but the portconf unit test otherwise fails on
    IPv4-only or IPv6-only hosts supporting AI_ADDRCONFIG.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jul 20 12:05:30 2024 +0100

    odbc: Improve cancel test, cancel previous used now idle statement

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jul 20 12:15:53 2024 +0100

    ci: Add Visual Studio 2022

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jul 21 08:21:33 2024 +0100

    ci: Do not automatically start MSSQL 2017

    This conflict with manually launching specific versions, for
    instance MSSQL 2019 start is failing for this reason.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jul 21 08:32:44 2024 +0100

    ci: Remove warning

    Specifically:
      Manually-specified variables were not used by the project:
        ENABLE_MSDBLIB

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Jul 19 07:45:10 2024 +0100

    odbc: Improve cancel test, check cancelling not active statement

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Jul 19 14:58:25 2024 +0100

    odbc: Fix bug cancelling not active statements

    Do not use ODBC_EXIT_ to avoid crashes.
    Return SQL_SUCCESS as MS ODBC (and specifications).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Jul 18 17:18:12 2024 +0100

    odbc: Reuse SWAP_STMT macro, move on common.[ch]

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Jul 18 10:18:45 2024 +0100

    odbc: Add test case to cancel test

    Check that SQLCancel sends a cancellation for the same thread.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Jul 18 17:18:24 2024 +0100

    odbc: Fix typo in comment

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Jul 19 08:13:54 2024 +0100

    ci: Remove obsolete comment from Appveyor script

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Thu Jul 18 15:08:54 2024 -0400

    Inform CMake of some accidentally Autotools-only tests.

    Add rpc_fail and row_count for ctlib and charconv and nulls for tds.
    Along the way, formally swap the order of ctlib's data and datafmt
    tests to match Makefile.am and facilitate future comparison.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Jul 18 15:47:12 2024 +0100

    pool: Remove warning if assert is compiled out

    Variable "tds" initialised but not used.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Jul 18 15:46:36 2024 +0100

    Remove warning compiling without --enable-extra-checks option

    Some macro expanded in src/tds/login.c gave warnings of variable
    not used.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jul 17 15:22:58 2024 +0100

    odbc: Removed now unused hinstFreeTDS variable

    Code requiring that variable is not compiled anymore due
    to previous cleanup.

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

    odbc: Accommodate Windows static builds

    src/odbc/win*.c: Accommodate static builds, with no hinstFreeTDS; in
    particular, never attempt to show FreeTDS dialog boxes there.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jul 17 10:58:09 2024 +0100

    odbc: Add Encrypt and HostNameInCertificate settings

    Supported by newer MS ODBC drivers.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jul 17 08:14:55 2024 +0100

    tds: Add new option for certificate name

    Allows to override server name to match into certificate.
    It makes easier, for instance, to connect to a server using IP.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jul 17 10:47:19 2024 +0100

    tds: Fix typo in comment

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jul 16 21:48:03 2024 +0100

    tds: Minor additional log

    "login" field should always be valid in tds_verify_certificate
    however it does not hurt adding an error log.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jul 16 21:47:18 2024 +0100

    tds: Reuse code to get TDSSOCKET from TDSCONNECTION

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jul 16 15:13:36 2024 +0100

    odbc: Use size_t for string length

    Mostly style, paths are not that big to make a difference.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jul 16 15:12:07 2024 +0100

    odbc: Update function declaration style

    More coherent with other declarations.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jul 16 13:04:27 2024 +0100

    odbc: Use bool for check_lib result

    Style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jul 13 10:34:52 2024 +0100

    odbc: Use "odbc_" prefix instead of "_"

    C99 compliance.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Tue May 21 15:38:29 2024 -0400

    Fix miscellaneous one-off warnings.

    * odbc.h: For Clang, substitute __attribute__((visibility("default")))
      for __attribute__((externally_visible)), which it at least
      historically didn't support.
    * tds5_bcp_add_variable_columns: Explicitly obtain high offset bits by
      shifting rather than dividing to avoid spurious signed-vs.-unsigned
      comparison warnings.
    * gssapi.c: Eliminate various warnings on macOS:
      - Additionally suppress __API_DEPRECATED right before including
        gssapi_krb5.h (which is at least the last explicitly included
        system header).
      - tds_gss_get_auth: Use central GSS_KRB5_NT_PRINCIPAL_NAME on macOS.
        It's available there with existing build settings, and avoids
          ld: warning: alignment (2) of atom
          '_tds_gss_get_auth_ver100.nt_principal' is too small and may
          result in unaligned pointers
        which could otherwise crop up dozens of times when
        targeting (legacy) Intel hardware.
    * ctlib/unittests/t0009.c: Pre-zero compute_col3.  Optimized builds
      with Clang or LLVM-based ICC can otherwise yield a Valgrind warning
      concerning a strcmp call that reads slightly past the trailing NUL.
    * odbc/unittests/rowset.c: Suppress Visual Studio's deprecation
      warning for (CHK)SQLSetStmtOption.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jul 13 12:17:46 2024 +0100

    odbc: Reuse cleanup code parsing connection string, check for error

    Reuse cleanup code in odbc_parse_connect_string.
    Code had a potential leak, remove and check it.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Jul 15 12:31:21 2024 +0100

    odbc: Split lines too long

    Just style change

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Fri May 10 10:29:56 2024 -0400

    tds_iconv: Accommodate FreeBSD/Citrus iconv.

    Accommodate iconv implementations (such as the Citrus one used by modern
    FreeBSD systems) that ever indicate invalid input by reporting a positive
    count of irreversible characters rather than by setting errno to EILSEQ.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jul 13 14:21:36 2024 +0100

    odbc: Add flag to reduce memory allocation for error messages

    Do not copy error strings if not necessary.
    This can help in case if errors like out of memory.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jul 13 12:50:59 2024 +0100

    odbc: Split lines too long

    Just style change

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jul 13 12:15:03 2024 +0100

    odbc: Split lines too long

    Just style change

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jul 13 10:32:51 2024 +0100

    Remove useless spaces

    Just style changes.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jul 13 10:32:27 2024 +0100

    Use new guard for alternative_character_sets.h

    Not updated when guard style were changed.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Jul 12 15:31:49 2024 +0100

    tds: Add missing option to log message

    Encryption options are now four, missed "strict".

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Jul 12 15:30:37 2024 +0100

    tds: Use bool for tds_alloc_login

    Just style change

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jul 10 13:12:56 2024 +0100

    Missing update for SQL Server version related to TDS protocol

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jul 10 08:01:17 2024 +0100

    Update SQL Server version related to TDS protocol

    Add more recent versions to the list.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jul 7 12:10:36 2024 +0100

    ctlib: Unify tests includes

    Include always "common.h" at the beginning.
    Add more common headers in common.h.
    Include ctpublic.h before other headers. This is different from
    other tests but it was the way done before (included before
    common.h). As public header it should not depend on config.h
    included before or after.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jul 7 12:50:33 2024 +0100

    Unify header guards definitions

    Headers guards are quite inconsistent amongst sources, using
    lower or upper cases, file names or not, directory or not,
    tds/freetds prefixed or not.
    Use a simple _tdsguard_XXXXX_ schema were XXXXX is randomly generated.
    The only exceptions are, for compatibility reasons, public
    installed headers which are unchanged.

    Script I used to generate guards:

      #!/usr/bin/env python3
      import uuid
      import string

      b = string.ascii_lowercase + string.ascii_uppercase + string.digits
      n = uuid.uuid4().int
      print(f"_tdsguard_{''.join([b[n // (62**x) % 62] for x in range(21,-1,-1)])}_")

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Tue May 21 15:32:58 2024 -0400

    tds: Avoid potential zero-byte allocations (whose behavior is undefined)

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Tue May 21 15:32:58 2024 -0400

    query.c (tds_convert_string): Clear *out_len if allocation fails

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Tue May 21 15:32:58 2024 -0400

    dblib: Remove leak in dbpivot

    * dbpivot.c (make_col_name): Elide gratuitous calls to strdup, which
      resulted in leaks because string_value already allocates memory.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Tue May 21 15:32:58 2024 -0400

    tds: Remove possible leak

    mem.c (tds_init_login): Don't leak lc_all when unable to populate
    client_charset.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jul 6 17:09:55 2024 +0100

    utils: Separate check for SO_NOSIGPIPE, more systems

    Make check for this feature consistent sharing into a header.
    Do not consider only MacOS but also FreeBSD and NetBSD.
    Exclude Symbian (from curl project
    "This isn't actually supported under Symbian OS").

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Jul 4 02:56:14 2024 +0100

    ctlib: Add test for failure converting binary to char

    This tests previous commit.
    Make sure no leaks happens in the future and conversion
    fails as expected.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Wed Jul 3 14:33:05 2024 -0400

    tds_convert_to_binary: Don't leak allocations on syntax errors.

    If tds_char2hex reported a syntax error and we'd (as usual) allocated
    a buffer, free it on the way out so that callers won't have to account
    for this corner case themselves, taking care to avoid leaving a
    dangling pointer in the conversion-result union.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jul 3 21:42:55 2024 +0100

    ctlib: Exclude some tests under Sybase

    Not all cs_convert sub-tests are passing, there are minor
    differences, especially when the conversion fails for
    overflows/underflows.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jul 3 21:42:35 2024 +0100

    ctlib: Add some tests for cs_convert covering previous change

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Wed Jul 3 14:20:00 2024 -0400

    _cs_convert: Cap binary/image copying to the destination length.

    Excessively long input already yielded an error, but would previously
    overrun the destination buffer along the way.

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

    {dblib,odbc}/unittests/common.h: Allow FREETDS_SRCDIR overrides.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jun 22 09:03:41 2024 +0100

    Make sure strings in old login structure have correct size

    Old strings inside login packet have a structure with a
    single byte as size at the end, make sure the length can
    fit into a single byte.

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

    Add missing include

    src/utils/unittests/challenge.c: #include <freetds/sysdep_private.h>
    to ensure the availability of strcasecmp.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Jun 18 08:31:00 2024 +0100

    Add missing argument to function declaration

    ANSI C should always have arguments.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Jun 17 07:37:13 2024 +0100

    Bump some TDS version for testing

    We didn't have any explicit 7.4 which is now very common
    (it was implicitly used by "auto").

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Mon May 13 16:41:58 2024 -0400

    odbc stats.c: Stick fully with the designated database.

    The precise database name has no bearing on this test's effectiveness.
    However, the test cases that explicitly specified a catalog (in ODBC
    parlance) to TestTable historically insisted on using freetds_test,
    and this test's only provision for lacking such a database was
    attempting to create it itself despite not necessarily having
    sufficient privileges.

    Bypass potential optimizations by formally changing to master before
    explicitly supplying the specified database name, with the help of a
    set_dbname copied from connect2.c.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jun 16 19:24:14 2024 +0100

    Support "strict" encryption

    Force naked TLS, supported by MSSQL 2022.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jun 16 19:05:34 2024 +0100

    Use better type for tds_connect_and_login

    Just style, TDSRET is the same as int.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Jun 5 07:29:30 2024 +0100

    Avoid misaligned access using sanitizer

    To write network data some macros handling misaligned access
    are used.
    Code correctly detect architectures handling correctly not
    aligned access and use it. However instrumented code could
    detect this as errors.
    Use a different way able to tell compiler that these misaligned
    access are what we want.

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

    cspublic.h: Formally define BLK_VERSION_{155,157,160}

    ... at least in the absence of CS_NO_LARGE_IDENTIFIERS; the
    corresponding CS_VERSION_* identifiers will otherwise be undefined
    anyway.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Jun 1 18:14:50 2024 +0100

    Add test for nvarchar(max) and bulk copy

    Data include empty and NULL data.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Fri May 10 10:05:28 2024 -0400

    tds_select: Treat EAGAIN and EINPROGRESS like EINTR.

    Call the registered interrupt handler (if any) for all three.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Mon May 13 16:39:57 2024 -0400

    tds/unittests/freeze.c: Suppress SIGPIPE (helpful on macOS).

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Mon May 13 17:18:25 2024 -0400

    Regroup pointer comparisons to avoid subtraction.

    The compiler always insists on treating the difference between two
    pointers as potentially negative, yielding warnings when comparing it to
    an integer that has (or will soon have) a pointer-width unsigned type.
    Equivalent pointer-to-pointer comparisons yield no such warnings and are
    still clear.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Thu May 9 14:23:58 2024 -0400

    tds_setup_connection: Skip nvc/uvc check under OpenServer.

    OpenServer instances may well report "Unknown language request" for
    it, resulting in outright login failures.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Mon May 13 11:49:03 2024 -0400

    _blk_get_col_data: Consistently return TDS_FAIL on failure.

    Most failure scenarios accidentally returned CS_FAIL, which ironically
    corresponds to TDS_SUCCESS.

Author: john-kendall <john@capps.com>
Date:   Thu May 23 11:15:26 2024 -0700

    datacopy: Increase CREATE TABLE command buffer to accommodate larger queries

    datacopy fails on tables with an unusually high number of columns.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat May 25 11:55:23 2024 +0100

    Support very old Sybase ASE versions

    On these old versions EXECUTE statement with string is not supported,
    and neither UNIVARCHAR.

Author: Anton Savelyev <antonsv@google.com>
Date:   Tue May 7 21:19:33 2024 +0000

    Update -v license text to print full text.

    The license text has been taken from the top of
    the file.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri May 17 10:34:01 2024 +0100

    Change some file license from GPL to LGPL

    These files were wrongly licensed, they are designed to be used
    by other code that needs to be LGPL.
    I'm the single owner of these files so no extra need for
    permissions.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun May 5 19:13:04 2024 +0100

    Support Sybase server not configured with UTF-8 charset

    If server is configured to not use UTF-8 UNIVARCHAR type is not
    available. Split query to check types and handle results
    separately.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Apr 28 13:47:14 2024 +0100

    Use CONVERT function instead of CAST for login query check

    CONVERT is more portable amongst different SQL Server implementation.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Mar 29 11:20:06 2024 +0000

    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.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 31 18:13:39 2024 +0100

    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.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Mar 30 17:24:40 2024 +0000

    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.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Mar 30 21:15:20 2024 +0000

    defncopy: Trim spaces around nullable flags

    This fix detection of nullable columns for Sybase.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Mar 24 09:58:01 2024 +0000

    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.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Mar 30 10:40:54 2024 +0000

    defncopy: Fix MS column length for N(VAR)CHAR types

    The length from sp_help is in bytes, not in code units.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Mar 28 16:36:19 2024 +0000

    defncopy: Use memory instead of temporary file

    Index script is not that huge, just allocate in memory.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Mar 27 16:44:46 2024 +0000

    odbc: Make odbc_buf structure private

    No reason to have it public.
    Only used for tests.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Mar 28 16:35:28 2024 +0000

    ctlib: Fix crash using ct_command with CS_MORE option

    The tds_realloc call was wrong passing the wrong pointer.
    Add test to check CS_MORE option calling ct_command.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Mar 23 18:19:16 2024 +0000

    defncopy: Reuse tds_strndup

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Mar 23 18:18:26 2024 +0000

    Move tds_strndup to utils

    Allows to reuse on applications easily.

Author: Tao Zuhong <taozuhong@users.noreply.github.com>
Date:   Mon Mar 4 16:47:28 2024 +0800

    dblib: Add port setting

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Mar 1 19:21:50 2024 +0000

    Use TDS 7.1 if MARS is not supported

    This fix some compatibility with some old MSSQL 2000 server.
    We try to negotiate a more recent protocol but if the server does
    not support at least TDS 7.2 the DONE token will be shorter causing
    FreeTDS to wait for more bytes than sent.
    This happens if we give a wrong password logging in to MSSQL 2000
    server.
    From MSSQL 2005 MARS is returned and we can assume larer DONE
    token.

Author: chenall <chenall@users.noreply.github.com>
Date:   Tue Feb 20 11:23:18 2024 +0800

    datacopy: allow when dest_collen > src_collen

    It is beneficial to migrate from the old database to the new one.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 17 16:59:23 2023 +0000

    tds: Update comment on tds_config_verstr function

    Encoded version uses bytes, not nibbles.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 3 21:18:22 2023 +0000

    Fix compilation for Android

    Fix last commit supposed to fix compilation on recent Android
    systems.
    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.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Dec 3 08:58:39 2023 +0000

    Do not try to use pthread_cond_timedwait_relative_np on newer Android

    API was deprecated, do not use (still available on Apple).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Nov 24 19:12:44 2023 +0000

    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.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 26 21:52:25 2023 +0000

    odbc: Use tds_dstr_buf to retrieve internal string buffer

    Do not use tds_dstr_cstr and a cast if the intention is to use
    the internal string buffer.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 26 21:52:11 2023 +0000

    odbc: Use bool for odbc_get_dsn_info

    Just style change.
    More clear only true/false.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 26 14:04:01 2023 +0000

    odbc: Use bool for write_all_strings

    Just minor style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 26 13:38:41 2023 +0000

    odbc: Update some driver registration field for Windows

    We support ODBC 3.50, also this patch SQLGetInfo SQL_DRIVER_ODBC_VER
    attribute.
    All SQL server drivers support SQLLevel 1, not 2.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 26 06:05:07 2023 +0000

    odbc: Check errors from SQLInstallDriverExW and SQLRemoveDriver

    These 2 functions can return TRUE (in theory success) even if
    the function didn't do anything.
    For instance this happens if the functions are called from
    not administrator user trying to install/remove the ODBC driver.
    So check if errors happened using SQLInstallerErrorW.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 25 20:33:52 2023 +0000

    utils: Add executable file to git ignore list

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Nov 24 08:11:36 2023 +0000

    odbc: Return better error for invalid character set

    Do not return memory error which is pretty misleading.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Nov 23 19:49:53 2023 +0000

    tds: Set control method for final OpenSSL BIO

    OpenSSL sometimes calls this callback failing if not present.
    This fixes https://github.com/FreeTDS/freetds/issues/513.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 12 16:19:48 2023 +0000

    cmake: Be consistent with install destination

    Reported by Rüdiger Ihle.
    TYPE clause for INSTALL was introduced in CMake 3.14, also
    it's more consistent with other lines.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Feb 1 19:06:38 2019 +0000

    Use Unicode and wide characters for file paths for Windows

    Allows to use path names with any characters.
    Add macros in include/utils/path.h to deal with different types
    and functions.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 12 10:46:15 2023 +0000

    cmake: Generates now missing include/freetds/sysconfdir.h

    This file is generated usually by Automake but in case of
    using CMake better to use this last one.
    Fixes building with CMake under Linux and other Unices.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 12 10:44:58 2023 +0000

    cmake: Improve GNU compatibility

    Use GNUInstallDirs module to get more accurate GNU Coding Standards
    (https://www.gnu.org/prep/standards/html_node/Directory-Variables.html)
    like Autoconf script.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Feb 1 19:06:38 2019 +0000

    Move tds_new macros to include/freetds/macros.h

    These macros are pretty generic, not related to TDS.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 11 22:59:21 2023 +0000

    ctlib: Test and fix ct_callback errors

    Some more tests on errors returned.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Feb 1 19:06:38 2019 +0000

    Separate utilities that deal with paths

    More into src/utils directory.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Nov 10 14:29:22 2023 +0000

    Remove the need for override of sysconfdir.h

    It's generated by Autoconf but not needed for Windows.
    Under Windows the default configuration path is always the root.
    The sysconfdir.h is only included by include/freetds/configs.h.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Nov 9 11:29:26 2023 +0000

    ctlib: Make switch cases more explicit

    Mainly style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Nov 9 11:28:46 2023 +0000

    ctlib: Test and fix cs_convert errors

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Nov 8 14:00:53 2023 +0000

    misc: Windows compatibility

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Nov 8 14:02:41 2023 +0000

    apps: Remove warning compiling fisql utility

    If readline was not present this warning was displayed:

    fisql.c:106:31: warning: unused parameter 's' [-Wunused-parameter]
      106 | fisql_add_history(const char *s)
          |                   ~~~~~~~~~~~~^

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Nov 6 14:47:05 2023 +0000

    misc: Handle closure from socket

    Do not exit all program.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 5 16:24:41 2023 +0000

    misc: Add debug/dump options

    -d enables debug output. By default reduce the verbosity of the
    program.
    -D adds support to dump all traffic to a capture file.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 5 18:22:09 2023 +0000

    misc: Add code to write a TCP flow on a capture file

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 5 17:26:07 2023 +0000

    ci: Distribute also OpenSSL libraries

    Make easier deploy and usage.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 5 16:25:10 2023 +0000

    misc: Update a comment

    Lot of limitations removed.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 5 13:11:39 2023 +0000

    misc: Handle termination more cleanly

    Detect signals and exit more cleanly.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 4 12:24:33 2023 +0000

    misc: Use threads to handle more connections

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 4 12:24:33 2023 +0000

    misc: Remove usage of global variables

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 4 12:24:33 2023 +0000

    misc: Remove some possible leaks

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 4 12:24:33 2023 +0000

    misc: Use less global variables

    Pass parameters to get_packet and put_packet instead of use
    globals.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 4 12:24:33 2023 +0000

    misc: Factor out a function to initialize TLS

    Avoids duplicating the same things for client and for server.
    At the end of handshake change pull/push functions to
    avoid retaining a pointer to a structure in the stack, simplify
    normal push/pull and remove state variable.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 4 12:24:33 2023 +0000

    misc: Handle errors more cleanly

    If we want to handle more connections in a single process
    we cannot exit the process for every error we get.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 4 12:24:33 2023 +0000

    misc: Remove some global usage

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Nov 5 09:54:24 2023 +0000

    misc: Separate code to handle a TDS session

    Prepare to handle more connections.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 4 22:58:49 2023 +0000

    misc: Fix typo in message

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 4 12:26:25 2023 +0000

    Fix typo in xINT64_C macros definitions

    These fallback definitions should not be used but fix anyway.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Nov 4 12:25:23 2023 +0000

    replacements:  Reuse UINT64_C macro

    Simplify definition.
    Also remove obsolete comment on 64-bit compatibility.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 5 08:13:44 2020 +0000

    misc: Handle all traffic in bounce utility

    Do not only handle packets during login but also data ones.
    Detect if data will be encrypted or not after login.
    Do not use sleep for synchronisation but use poll to avoid
    delays.
    Improve also a bit resource management (although the program
    is still limited to one single connection).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Dec 5 08:13:44 2020 +0000

    misc: Better error management in bounce utility

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Oct 16 10:47:11 2019 +0100

    misc: Prepare to forward traffic to the server

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Nov 3 17:10:30 2023 +0000

    misc: Change style of hexdump for bounce utility

    Use dots for not printable.
    Add a 8 byte separator for hexadecimal part.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Nov 3 15:41:07 2023 +0000

    misc: Allows to specify a server name for bounce utility

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Nov 3 15:42:05 2023 +0000

    Minor comments updates

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Nov 1 18:14:03 2023 +0000

    Remove some "unused parameter" warning

    These came out on Windows and/or if you don't enable extra checks.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Nov 1 10:09:28 2023 +0000

    Add -Wunused-parameter warning by default

    If GCC is detected add this flag to get these warnings.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Oct 19 11:52:37 2023 +0100

    Remove warnings using -Wunused-parameter option

    The warnings show if a parameter is not used.
    Add a TDS_UNUSED to mark a parameter as intentional not used
    (usually due to ABI a function needs to have that parameter).

Author: coffeegreg <86416144+coffeegreg@users.noreply.github.com>
Date:   Tue Oct 10 22:10:55 2023 +0200

    dblib: allow encryption option

    The goal is to allow access to the "encryption" configuration option
    (freetds.conf setting) without the need for a freetds.conf file.
    Added a new DBSETENCRYPTION and DBSETLENCRYPTION using dbsetlname
    (dblib.c) to handle "off/request/require" values.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Oct 28 20:40:00 2023 +0100

    odbc: Define maximum value for SQL_ATTR_QUERY_TIMEOUT

    More compatible with Microsoft driver.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 29 10:49:41 2023 +0000

    pool: Remove warning compiling

    Due to recent change:

    config.c:95:53: warning: passing argument 3 of ‘tds_read_conf_section’ from incompatible pointer type [-Wincompatible-pointer-types]
       95 |                 tds_read_conf_section(in, "global", pool_parse, params);
          |                                                     ^~~~~~~~~~
          |                                                     |
          |                                                     void (*)(const char *, const char *, void *)

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Oct 11 10:13:21 2023 +0100

    ctlib: Make cs_convert more verbose in case of errors

    Print input and output buffers as soon as we provide an output.
    Print output buffer also in case of length mismatch.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Oct 28 17:08:48 2023 +0100

    tds: Return success/failure from tds_parse_conf_section

    This will allows to check error setting some value in TDS_LOGIN
    structure.
    Using valid_configuration would be confusing as that flag is used
    to store error reading from configuration file (so for
    TDS_CONNECTION).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Oct 27 16:25:59 2023 +0100

    ctlib: Reuse res_type_str in rpc_fail test

    printable_ret was doing the same thing, returning a string description
    for a CT-Library result.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Oct 27 09:58:05 2023 +0100

    Import a script to generate constants in numeric.c

    Explain where these magic constants came from.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Oct 27 05:29:51 2023 +0100

    odbc: Fix getting SQL_ATTR_METADATA_ID attribute

    Returned wrong field due to typo.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Oct 21 11:45:16 2023 +0100

    tds: Optimise numeric precision change in case of 32 bit architectures

    Use 64 bit multiply instead of 64 bit divide.
    Do do the multiplication in a portable way (we need to get a 128 bit)
    we use simple 32 x 32 -> 64 multiplications.
    We keep division optimisation in case of x86 architecture.
    Remove also pretty obsolete optimisation for Watcom C compiler.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Oct 21 22:04:41 2023 +0100

    Use 64 bit constants

    Nowadays all compilers should support 64 bit constants, no
    need for complicated code.
    Makes sure UINT64_C and INT64_C are defined.
    Avoids having to include <freetds/sysdep_types.h>, just use
    <freetds/sysdep_private.h>.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Oct 26 07:31:56 2023 +0100

    build: Avoid some warnings from CMake

    Specifically:

      CMake Deprecation Warning at CMakeLists.txt:3 (cmake_minimum_required):
        Compatibility with CMake < 3.5 will be removed from a future version
        of CMake.
        Update the VERSION argument <min> value or use a ...<max> suffix to
        tell CMake that the project does not need compatibility with older
        versions.

      CMake Warning (dev) at CMakeLists.txt:1 (project):
        cmake_minimum_required() should be called prior to this top-level
        project() call.  Please see the cmake-commands(7) manual for usage
        documentation of both commands.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Oct 26 08:17:34 2023 +0100

    odbc: Minor style changes to test64 test

    Use macro instead of constant to understand why that number is used.
    Added a comment on why test is skipped.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Oct 25 23:08:03 2023 +0100

    tds: Use same condition syntax checking for full packet

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Oct 25 21:42:29 2023 +0100

    dblib: Use bool for row_error

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Oct 18 19:08:57 2023 +0100

    ctlib: Check datatype returned by ct_data_info in test

    Datatype should be CS_TEXT_TYPE.
    Also add a compatibility check to compile with Sybase libraries.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Oct 18 18:54:52 2023 +0100

    ctlib: Use client type, not propagate TDS one

    Clients are expecting CT-Library types.

    This was addressed also by NCBI patches.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Oct 25 10:43:16 2023 +0100

    ctlib: Remove leak in errors test

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 24 20:00:26 2023 +0100

    ctlib: Test and fix ct_con_props errors

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 24 19:50:09 2023 +0100

    ctlib: Test ct_cursor errors

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 24 19:31:26 2023 +0100

    ctlib: Test ct_command errors

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 24 19:21:33 2023 +0100

    ctlib: Test ct_connect errors

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 24 13:09:06 2023 +0100

    ctlib: Test and fix ct_dynamic errors

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 24 12:17:14 2023 +0100

    ctlib: Test and fix cs_locale and related errors

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 24 08:16:09 2023 +0100

    ctlib: Test and fix blk_init errors

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 24 07:11:27 2023 +0100

    ctlib: Makes sure we don't use a negative number as string length

    Do not allow negative number to be used as buffer length but returns
    error instead.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 24 21:05:11 2023 +0100

    ctlib: Factor out a check_last_message to reduce checks in errors test

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 24 13:41:34 2023 +0100

    ctlib: Use macros to list all sub tests in errors test

    Makes easier to add a new test.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Oct 23 14:52:16 2023 +0100

    ctlib: Improve cs_config error reporting and compatibility

    Return proper errors.
    Do not add terminator setting CS_USERDATA.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 24 08:14:52 2023 +0100

    ctlib: Factor out and reuse check_fail macro in errors test

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 24 08:17:08 2023 +0100

    ctlib: Minor compatibility with tests and Sybase/SAP libraries

    To use BCP applications need to set CS_BULK_LOGIN property.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 22 21:11:46 2023 +0100

    apps: Simplify some expression reusing "meta" variable

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 22 19:33:49 2023 +0100

    odbc: Convert value to type used in format

    Mainly style, code generated is the same but "%u" format
    is assuming unsigned int to use that explicitly.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 22 19:32:00 2023 +0100

    odbc: Remove unused assign

    Just assigned again on next line.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Oct 21 11:48:24 2023 +0100

    odbc: Make explicit how data are bound in bcp test

    Mainly style change, easier to understand how data will start.
    Also avoids double cast.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Oct 21 12:18:37 2023 +0100

    odbc: Fix an issue compiling bcp test on 32 systems with unixODBC

    UnixODBC can define ODBCINT64 with a structure with 2 fields
    instead of just an integer if HAVE_LONG_LONG is not defined.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Oct 21 11:47:35 2023 +0100

    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.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Oct 19 18:10:55 2023 +0100

    odbc: Fix type setting

    The code was falling through the cases potentially setting
    wrong types.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Oct 19 16:29:10 2023 +0100

    ctlib: More debugging on not implemented bcp_colfmt_ps

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Oct 19 16:27:37 2023 +0100

    Remove some unused parameters

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Oct 19 11:51:39 2023 +0100

    Remove main arguments if not used

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Oct 19 10:17:24 2023 +0100

    utils: Remove not used "len" parameter from tds_des_set_key

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Oct 19 06:41:51 2023 +0100

    tds: Optimise scale down of numeric types

    Instead of using divisions, if possible, multiple by the reverse.
    This is what modern compiler does when they see a constant but
    it's pretty impossible that they use this technique using divisors
    from an array.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Oct 18 18:54:20 2023 +0100

    Remove warning using "-Wold-style-declaration" option

    Move "static" and "inline" modifiers before others.
    Just style change.

Author: Sergey Sikorskiy <ssikorsk@ncbi.nlm.nih.gov>
Date:   Mon Jun 4 11:13:37 2018 -0400

    ct.c (ct_describe): Populate datafmt->format per Valgrind.

Author: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>
Date:   Mon Jun 4 11:13:37 2018 -0400

    cs.c (cs_convert): Fix *resultlen for conversions to SYBIMAGE.

    When converting to SYBIMAGE, set *resultlen to the number of bytes
    actually used, not the destination's full capacity.

    Frediano: Added test and fixed conversion is padding was specified.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Oct 16 21:26:36 2023 +0100

    Minor compatibility for C++

    At the moment config.h is used only in C files but just for
    potential compatibility do not define "inline" if used for C++.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Jul 11 07:37:20 2021 +0100

    Include stdint.h in Visual Studio if available

    Check proper version of Visual Studio even for older versions.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Oct 16 21:17:55 2023 +0100

    dblib: Correct application names in tests

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Oct 16 21:16:28 2023 +0100

    dblib: Minor updates for empty_rowsets.c

    Minor style change for empty loop.
    Better check for error from dbresults.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Feb 1 19:06:38 2019 +0000

    Do not use extern "C" around headers

    Although this include file is not used by C++ code avoid to have
    extern "C" around include file which could be an issue if some
    include have C++ code.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 15 17:41:26 2023 +0100

    odbc: Remove unused definition

    TDS_SDIR_SEPARATOR not used in common.c.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 15 17:40:15 2023 +0100

    tds: Limit some variable scope

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 15 05:37:24 2023 +0100

    tds: Avoid warning using poll() function

    Due to some signed/not-signed calling poll with int type was
    causing a warning under Linux.
    All systems use unsigned number for length of poll

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 15 05:15:21 2023 +0100

    odbc: Avoid conversion warnings from SQLCHAR* to LPCSTR

    The two pointers differs in sign so add a cast to remove the
    warning.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Oct 14 20:42:21 2023 +0100

    Remove some conversion warnings for Windows

    Convert pointer to TDS_UINTPTR to avoid size warning.
    Avoid warning converting unsigned long to unsigned (even if on
    Windows are the same).
    TDS_SYS_SOCKET is defined a 64 bit for 64 bit, convert to int
    (handles are not so large anyway to require 64 bit).

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Oct 13 13:02:18 2023 +0100

    Fix minor potential script issues using "echo" command

    Allows to start error with dash and having do not interpret escape
    sequences.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Oct 13 11:37:58 2023 +0100

    tds: Fix conversion from NUMERIC -0 number to integers

    The weird number encoding failed to be converted to integers
    and was detected as overflow.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Fri Oct 13 09:24:14 2023 +0100

    tds: Report error from string_to_int8, do not override it

    Code similar to other similar funcions like string_to_int.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Oct 9 19:57:13 2023 +0100

    ctlib: Add test for errors

    Check some errors from some functions to make sure they are
    consistent with proprietary library.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Oct 9 19:33:45 2023 +0100

    ctlib: Allows to check last message in tests

    Add some utilities to save last message received from library.
    This will allow to check them after calling various CT-Library
    APIs.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Oct 11 11:44:47 2023 +0100

    dblib: Add test for process limits

    Check that when limit is reached a proper error is reported.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Oct 11 12:21:33 2023 +0100

    Improve previous patch

    Do not use TDS_DBG_FUNC but TDS_DBG_INFO1, FUNC is intended for
    function tracing like entering and exiting from a function.
    Rollback some not needed changes.
    Remove some obsolete code not even compiling (dbpivot.c).
    Allows longer lines.
    Use more proprietary compatible errors.
    Handle error for user API better passing context and connection.

Author: Pavel Ivanov <ivanovp@ncbi.nlm.nih.gov>
Date:   Mon Jun 4 11:13:37 2018 -0400

    Don't log directly to stdout or stderr.

    * Substitute tdsdump_log, _csclient_msg, or dbperror as appropriate,
      introducing some new error codes for the latter two functions.
    * Make _csclient_msg non-static to allow use throughout ctlib.
    * From cs_convert, call _csclient_msg in addition to tdsdump_log.

    Co-Authored-By: Aaron M. Ucko <ucko@ncbi.nlm.nih.gov>

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Oct 11 13:38:47 2023 +0100

    ctlib: Add generic utilities to check function returns in tests

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Oct 11 10:11:04 2023 +0100

    ctlib: Fix message number for idle state error

    The message number is specified as a byte.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Oct 10 10:56:35 2023 +0100

    Use replacement getopt in tests

    Make Windows version more compatible.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Oct 9 10:47:12 2023 +0100

    ctlib: Remove duplicated code for handling errors in tests

    Most of code printing errors and warnings was duplicated, reuse
    code in common.c.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Oct 9 10:28:22 2023 +0100

    ctlib: Cleanup DIRNAME from tests code

    Not used.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Oct 9 10:16:02 2023 +0100

    ctlib: Pass correct pointer calling ct_exit in tests

    Silly mistake.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 8 22:58:00 2023 +0100

    ctlib: Assure context is de-initialised before calling cs_ctx_drop in tests

    Avoids cs_ctx_drop failures.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 8 22:56:51 2023 +0100

    ctlib: Format message number from tests using hexadecimal

    The message number is composed by 4 parts (each one byte) so
    formatting as hexadecimal makes it more readable.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 8 22:55:52 2023 +0100

    ctlib: Remove warning using proprietary library for tests

    ct_command accept a no-constant pointer for SQL command.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 8 19:44:16 2023 +0100

    ctlib: Format message number from tests using hexadecimal

    The message number is composed by 4 parts (each one byte) so
    formatting as hexadecimal makes it more readable.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Oct 8 19:42:54 2023 +0100

    tds: Use bool in norm_fmt function

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Oct 4 10:35:38 2023 +0100

    Use bool for some tds_cursor_XXX functions

    Just style change.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Sep 28 09:13:22 2023 +0100

    Remove confusing warnings during compilation

    Strip ar warnings from nightly tests.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Sep 28 08:39:38 2023 +0100

    tds: Minor updates on convert code

    Remove unused forward declarations.
    Remove obsolete comment.
    Reduce the scope of some variables.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Sep 27 13:13:00 2023 +0100

    odbc: Reuse code in connection_string_parse test

    Most of the code was just repeated.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Wed Sep 27 12:33:01 2023 +0100

    odbc: Add test for connection string parsing

    Check parsing of not semicolon terminated parameter.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Sep 26 20:21:17 2023 +0100

    tls: Add a test for OpenSSL hostname check

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Sep 26 20:58:18 2023 +0100

    tls: Fix certificate hostname check for OpenSSL

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Sep 26 14:17:16 2023 +0100

    Really minor code space updates

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Sep 26 13:02:19 2023 +0100

    Fix typo in log (interupt -> interrupt)

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Sep 26 13:01:51 2023 +0100

    Minor updates to manual files

    All changes from Debian packages.
    Minor typos.
    Minor formatting.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Sep 26 13:00:27 2023 +0100

    Typos: information is uncountable in English

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Sep 26 11:38:01 2023 +0100

    Update Autoconf to 2.71

    Add some compatibility for MacOS.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Sep 25 12:58:44 2023 +0100

    dblib: Update dbcolptr

    Minor style change, more similar to dbacolptr.
    Potentially caching some values.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Sep 25 12:58:04 2023 +0100

    dblib: Use bool for dbacolptr

    Minor style change

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sun Sep 24 09:54:22 2023 +0100

    odbc: Remove obsolete commented out code

    These settings were deprecated years ago, not reasons to keep them.

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Sep 23 14:27:27 2023 +0100

    doc: Update news page, add new release

Merge: 3107082a 369aed00
Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Sat Sep 23 10:59:17 2023 +0100

    Merge branch 'Branch-1_4'

Merge: cd75e139 dfe6ff23
Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Thu Sep 21 17:41:26 2023 +0100

    Merge branch 'Branch-1_4'

Merge: 68ebee23 3d3e006c
Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Mon Sep 18 17:53:47 2023 +0100

    Merge branch 'Branch-1_4'

Author: Frediano Ziglio <freddy77@gmail.com>
Date:   Tue Sep 12 14:45:24 2023 +0100

    cmake: Add ENABLE_MSDBLIB option

    Similar to configure --enable-msdblib.
    For compatibility with configure the option is disable by default.

