Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: duckdb/duckdb-odbc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.3.1.0
Choose a base ref
...
head repository: duckdb/duckdb-odbc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.3.2.0
Choose a head ref
  • 6 commits
  • 100 files changed
  • 4 contributors

Commits on Jul 3, 2025

  1. Support running with older C++ stdlib (1.3)

    This is a backport of the PR #169 to `v1.3-ossivalis` stable branch.
    
    This change adds `_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR` flag for Windows
    builds that prevents crashes when the host process, into which the
    ODBC driver is loaded, is run using older versions of C++ stdlib.
    
    Details: duckdb/duckdb#17991
    
    Testing: additional test run added that uses `msvcp140.dll` from VS2019
    instead of the system-provided one.
    staticlibs committed Jul 3, 2025
    Configuration menu
    Copy the full SHA
    16da2c1 View commit details
    Browse the repository at this point in the history
  2. Fix SQL_NUMERIC_STRUCT handling for neg decs (1.3)

    This is a backport of the PR #172 to `v1.3-ossivalis` stable branch.
    
      - Handle sign field (0=negative, 1=positive) when binding SQL_NUMERIC_STRUCT parameters
      - Fix SQLGetData conversion of large decimals by using TryCast instead of TryCastToDecimal
      - Add exception handling for std::stoi to prevent overflow with large decimal fractions
      - Add tests for negative decimals in both parameter binding and result retrieval
    kevinjamesus86 authored and staticlibs committed Jul 3, 2025
    Configuration menu
    Copy the full SHA
    1186c4f View commit details
    Browse the repository at this point in the history
  3. Increase column size for MSDASQL linked src (1.3)

    This is a backport of the PR #175 to `v1.3-ossivalis` stable branch.
    
    This change increases the max column size for `VARCHAR` and `VARBINARY`
    fields reported in `SQLDescribeCol` (or `SQLColAttribute`) call.
    
    Per ODBC spec this value is defined as:
    
    > The defined or maximum column size in characters of the column
    
    In DuckDB `VARCHAR` fields don't have the upper limit. We would like to
    return `std::numeric_limits<SQLINTEGER>::max()` as max size, but it
    appeared that `MSDASQL` provider cannot read strings when the declared
    column size is over `8000`, that is the max size of a `VARCHAR`
    (excluding `VARCHAR(MAX)`) in MSSQL.
    
    Testing: tested manually with local MSSQL; automated tests are
    problematic as `OPENROWSET` calls in MSSQL are disabled by default under
    `Ad Hoc Distributed Queries` permission.
    
    Fixes: #168
    staticlibs committed Jul 3, 2025
    Configuration menu
    Copy the full SHA
    5d3f605 View commit details
    Browse the repository at this point in the history
  4. Refactor internal functions (1.3)

    This is a backport of the PR #176 to `v1.3-ossivalis` stable branch.
    maiadegraaf authored and staticlibs committed Jul 3, 2025
    Configuration menu
    Copy the full SHA
    d07d86b View commit details
    Browse the repository at this point in the history
  5. Fix ODBC conformance for numeric types (1.3)

    This is a backport of the PR #177 to `v1.3-ossivalis` stable branch.
    
    This change addresses multiple ODBC specification conformance issues discovered
    during a thorough audit of GetColumnSize() and GetDisplaySize() implementations.
    
    Issues fixed:
    1. DECIMAL/NUMERIC precision and scale reporting
        - SQLColAttribute/SQLDescribeCol incorrectly reported column sizes
        - Fixed GetColumnSize() to return precision instead of precision+scale
    
    2. Signed/Unsigned integer display sizes
        - GetDisplaySize() now correctly distinguishes signed vs unsigned types
        - UTINYINT: 3 chars, USMALLINT: 5 chars, UINTEGER: 10 chars, UBIGINT: 20 chars
        - TINYINT: 4 chars, SMALLINT: 6 chars, INTEGER: 11 chars, BIGINT: 20 chars
    
    3. TIME/TIMESTAMP fractional seconds precision
        - Added GetTemporalPrecision() to detect precision from LogicalTypeId
        - Added missing type mappings for TIMESTAMP_MS, TIMESTAMP_SEC, TIMESTAMP_NS
        - Fixed GetColumnSize() to return full column size per ODBC spec:
        * TIME: 8 (base) or 9 + precision
        * TIMESTAMP: 19 (base) or 20 + precision
        - Fixed GetDisplaySize() to include fractional seconds in display size
        - Updated FillIRD() and SQLDescribeCol to set precision/scale for temporal types
    
    Implementation details:
    - include/api_info.hpp: Added GetTemporalPrecision(), updated size calculations
    - src/api_info.cpp: Added missing timestamp variant type mappings
    - src/common/duckdb_odbc.cpp: Set temporal precision/scale in IRD
    - src/prepared.cpp: Handle temporal types in SQLDescribeCol
    - test/: Added comprehensive test coverage for all fixes
    
    All changes verified against DuckDB behavior and ODBC specification.
    All 79 tests passing with new test coverage added.
    kevinjamesus86 authored and staticlibs committed Jul 3, 2025
    Configuration menu
    Copy the full SHA
    34a5b40 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2025

  1. Configuration menu
    Copy the full SHA
    f72b8c3 View commit details
    Browse the repository at this point in the history
Loading