diff --git a/.github/workflows/WindowsSigningPowerBI.yml b/.github/workflows/WindowsSigningPowerBI.yml deleted file mode 100644 index 5805654a..00000000 --- a/.github/workflows/WindowsSigningPowerBI.yml +++ /dev/null @@ -1,170 +0,0 @@ -name: Windows Sign Binaries for Power BI - -on: - workflow_dispatch: - release: - types: - - published - - prereleased - -permissions: - contents: write - -concurrency: - group: windows-sign-powerbi-${{ github.head_ref }} - cancel-in-progress: true - -defaults: - run: - shell: powershell - working-directory: run - -jobs: - build_and_test: - - strategy: - fail-fast: false - matrix: - os: [windows-2025] - odbc_provider: [MDAC] - build_type: [Release] - architecture: [x64] - wsl_distribution: [Ubuntu-24.04] - - runs-on: ${{ matrix.os }} - - steps: - - - name: Create directories - working-directory: ${{ github.workspace }} - run: | - new-item ${{ github.workspace }}\run -itemtype directory - new-item ${{ github.workspace }}\build -itemtype directory - new-item ${{ github.workspace }}\prefix -itemtype directory - new-item ${{ github.workspace }}\install -itemtype directory - new-item ${{ github.workspace }}\package -itemtype directory - - - name: Clone the repo - uses: actions/checkout@v4 - with: - path: source - submodules: true - - - name: Set up Visual Studio shell - uses: egor-tensin/vs-shell@v2 - with: - arch: ${{ matrix.architecture }} - - - name: Configure with CMake - run: > - cmake -S ${{ github.workspace }}/source -B ${{ github.workspace }}/build - -A ${{ fromJSON('{"x86": "Win32", "x64": "x64"}')[matrix.architecture] }} - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - -DODBC_PROVIDER=${{ matrix.odbc_provider }} - -DCH_ODBC_RUNTIME_LINK_STATIC=OFF - -DCH_ODBC_PREFER_BUNDLED_THIRD_PARTIES=ON - -DTEST_DSN_LIST="ClickHouse DSN ANSI;ClickHouse DSN Unicode" - -DBUILD_TESTING=NO - -DCH_ODBC_DEFAULT_SQL_COMPATIBILITY_SETTINGS=YES - -DCH_ODBC_VERSION_SUFFIX="-powerbi" - - - name: Build - run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build_type }} - - - name: Package - id: package - run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build_type }} --target package - - - name: Print wix.log on Package failure - if: failure() && steps.package.outcome == 'failure' - run: | - $logPath = "${{ github.workspace }}/build/_CPack_Packages/win64/WIX/wix.log" - if (Test-Path $logPath) { - Write-Host "=== wix.log ===" - Get-Content $logPath - } else { - Write-Host "wix.log not found at $logPath" - } - - - name: Create pkcs11properties.cfg file - run: | - $content = @" - name=signingmanager - library="C:\\Program Files\\DigiCert\\DigiCert Keylocker Tools\\smpkcs11.dll" - slotListIndex=0 - "@ - - Write-Host "Writing pkcs11properties.cfg file" - $content | Out-File -FilePath ${{ github.workspace }}\run\pkcs11properties.cfg -Encoding ASCII - Get-Content ${{ github.workspace }}\run\pkcs11properties.cfg - - - name: Create signing certificate - run: | - [System.IO.File]::WriteAllBytes("${{ github.workspace }}\run\Certificate_pkcs12.p12", [System.Convert]::FromBase64String("${{ secrets.SM_CLIENT_CERT_FILE_B64 }}")) - - - name: Download Keylocker tools - env: - SM_API_KEY: ${{ secrets.SM_API_KEY }} - run: > - Invoke-WebRequest - https://one.digicert.com/signingmanager/api-ui/v1/releases/Keylockertools-windows-x64.msi/download - -H @{"x-api-key" = $env:SM_API_KEY} - -o Keylockertools-windows-x64.msi - - - name: Install Keylocker tools - run: | - Start-Process msiexec.exe -ArgumentList '/i Keylockertools-windows-x64.msi /passive /quiet /norestart' -Wait - - - name: Check Keylocker tools - run: | - & "C:\Program Files\DigiCert\DigiCert Keylocker Tools\smctl.exe" --version - - - name: Sync the certificates - env: - SM_API_KEY: ${{ secrets.SM_API_KEY }} - PKCS11_CONFIG: "${{ github.workspace }}\\run\\pkcs11properties.cfg" - SM_CLIENT_CERT_FILE: "${{ github.workspace }}\\run\\Certificate_pkcs12.p12" - SM_CLIENT_CERT_PASSWORD: ${{ secrets.SM_CLIENT_CERT_PASSWORD }} - SM_HOST: ${{ secrets.SM_HOST }} - SM_TLS_SKIP_VERIFY: false - DIGICERT_KEY_ALIAS: ${{ secrets.DIGICERT_KEY_ALIAS }} - SM_LOG_LEVEL: TRACE - run: > - & "C:\Program Files\DigiCert\DigiCert Keylocker Tools\smctl.exe" windows certsync - - - name: Check the installer - run: | - ls (Get-ChildItem -Path "${{ github.workspace }}/build" -Filter "clickhouse-odbc-*.msi" | Select-Object -First 1).FullName - - - name: Sign the installer - env: - SM_API_KEY: ${{ secrets.SM_API_KEY }} - PKCS11_CONFIG: "${{ github.workspace }}\\run\\pkcs11properties.cfg" - SM_CLIENT_CERT_FILE: "${{ github.workspace }}\\run\\Certificate_pkcs12.p12" - SM_CLIENT_CERT_PASSWORD: ${{ secrets.SM_CLIENT_CERT_PASSWORD }} - SM_HOST: ${{ secrets.SM_HOST }} - SM_TLS_SKIP_VERIFY: false - DIGICERT_KEY_ALIAS: ${{ secrets.DIGICERT_KEY_ALIAS }} - SM_LOG_LEVEL: TRACE - run: > - & "C:\Program Files\DigiCert\DigiCert Keylocker Tools\smctl.exe" sign - --fingerprint ${{ secrets.DIGICERT_FINGERPRINT }} - --input (Get-ChildItem -Path "${{ github.workspace }}/build" -Filter "clickhouse-odbc-*.msi" | Select-Object -First 1).FullName - - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: clickhouse-odbc-windows-${{ matrix.architecture }}-${{ matrix.build_type }} - path: ${{ github.workspace }}/build/clickhouse-odbc-* - - - name: Upload artifacts as release assets - if: ${{ github.event_name == 'release' && matrix.build_type == 'Release' }} - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ github.workspace }}/build/clickhouse-odbc-*.msi - overwrite: true - tag: ${{ github.ref }} - file_glob: true - diff --git a/CMakeLists.txt b/CMakeLists.txt index 521c8463..5646a02d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,9 +68,6 @@ option (CH_ODBC_THIRD_PARTY_LINK_STATIC "Link with third party libraries statica set (CH_ODBC_DEFAULT_DSN_ANSI "ClickHouse DSN (ANSI)" CACHE STRING "Default ANSI DSN name") set (CH_ODBC_DEFAULT_DSN_UNICODE "ClickHouse DSN (Unicode)" CACHE STRING "Default Unicode DSN name") -set (CH_ODBC_VERSION_SUFFIX "" CACHE STRING "Project version (e.g. `-powerbi`)") -option (CH_ODBC_DEFAULT_SQL_COMPATIBILITY_SETTINGS "Enable SqlCompatibilitySettings by default" OFF) - if (MSVC) # This default encoding mode will be overriden by UNICODE, in the corresponding cases. #add_compile_definitions (SBCS _SBCS) @@ -96,9 +93,6 @@ else() link_libraries(global-group) endif() -if (CH_ODBC_DEFAULT_SQL_COMPATIBILITY_SETTINGS) - add_compile_definitions(SQL_COMPATIBILITY_SETTINGS_BY_DEFAULT) -endif () # Make sure that all optimized builds have NDEBUG macro set. foreach (config Release RelWithDebInfo MinSizeRel) @@ -307,18 +301,6 @@ if (CH_ODBC_ENABLE_INSTALL) set (CPACK_PROJECT_CONFIG_FILE "${PROJECT_SOURCE_DIR}/CPackLists.txt") - # CPACK_SYSTEM_NAME does not work because cpack is not included yet, including it in advance - # brings another set of problems that are not worth fixing at the moment - set (CH_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}") - if (CH_SYSTEM_NAME MATCHES "Windows") - if (CMAKE_SIZEOF_VOID_P EQUAL 8) - set (CH_SYSTEM_NAME "win64") - else () - set (CH_SYSTEM_NAME "win32") - endif () - endif () - set (CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}${CH_ODBC_VERSION_SUFFIX}-${CH_SYSTEM_NAME}") - set (CPACK_PACKAGE_VENDOR "ClickHouse, Inc.") set (CPACK_PACKAGE_DESCRIPTION "The official ODBC driver implementation for accessing ClickHouse as a data source.") set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "ClickHouse ODBC Driver (${ARCH_BITS}-bit)") diff --git a/driver/config/ini_defines.h b/driver/config/ini_defines.h index 7b734b05..09543da6 100755 --- a/driver/config/ini_defines.h +++ b/driver/config/ini_defines.h @@ -57,11 +57,7 @@ #define INI_AUTO_SESSION_ID_DEFAULT "off" #define INI_CLIENT_NAME_DEFAULT "" #define INI_COMPRESSION_DEFAULT "1" -#ifdef SQL_COMPATIBILITY_SETTINGS_BY_DEFAULT -# define INI_SQL_COMPATIBILITY_SETTINGS_DEFAULT "1" -#else -# define INI_SQL_COMPATIBILITY_SETTINGS_DEFAULT "0" -#endif +#define INI_SQL_COMPATIBILITY_SETTINGS_DEFAULT "0" #ifdef NDEBUG # define INI_DRIVERLOG_DEFAULT "off" diff --git a/driver/connection.h b/driver/connection.h index a843acd9..5fd18729 100644 --- a/driver/connection.h +++ b/driver/connection.h @@ -10,12 +10,6 @@ #include #include -#ifdef SQL_COMPATIBILITY_SETTINGS_BY_DEFAULT -static constexpr bool sql_compatibility_settings_default = true; -#else -static constexpr bool sql_compatibility_settings_default = false; -#endif - class DescriptorRecord; class Descriptor; class Statement; @@ -50,7 +44,7 @@ class Connection bool auto_session_id = false; std::string client_name; bool enable_http_compression = true; - bool sql_compatibility_settings = sql_compatibility_settings_default; + bool sql_compatibility_settings = false; public: std::unique_ptr session; diff --git a/driver/platform/config_cmake.h.in b/driver/platform/config_cmake.h.in index 3499295a..8a263a69 100644 --- a/driver/platform/config_cmake.h.in +++ b/driver/platform/config_cmake.h.in @@ -5,7 +5,7 @@ #define VERSION_PATCH @PROJECT_VERSION_PATCH@ #define VERSION_TWEAK @PROJECT_VERSION_TWEAK@ #define VERSION_EXTRA "" -#define VERSION_STRING "@PROJECT_VERSION@@CH_ODBC_VERSION_SUFFIX@" +#define VERSION_STRING "@PROJECT_VERSION@" #define SYSTEM_STRING "@CMAKE_SYSTEM@" #define ODBC_PROVIDER "@ODBC_PROVIDER@"