Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/cpp_extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,29 @@ jobs:
$dll = Join-Path $bin "arrow_flight_sql_odbc.dll"
if (Test-Path $dll) {
Write-Host "Found ODBC DLL: $dll"

# Verify ODBC driver registration values
$key = "HKLM:\SOFTWARE\ODBC\ODBCINST.INI\Apache Arrow Flight SQL ODBC Driver"
if (-not (Test-Path $key)) {
Write-Error "ODBC driver registry key not found: $key"
exit 1
}
$props = Get-ItemProperty $key
foreach ($name in "Driver", "Setup") {
Write-Host "$name = '$($props.$name)'"
if ($props.$name -ne $dll) {
Write-Error "Registry value '$name' should be '$dll'"
exit 1
}
}
if ($props.DriverODBCVer -ne "03.00") {
Write-Error "Registry value 'DriverODBCVer' should be '03.00', got '$($props.DriverODBCVer)'"
exit 1
}
if ($props.UsageCount -ne 1) {
Write-Error "Registry value 'UsageCount' should be 1, got '$($props.UsageCount)'"
exit 1
}
exit 0
}
}
Expand Down
3 changes: 3 additions & 0 deletions cpp/src/arrow/flight/sql/odbc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ if(ARROW_FLIGHT_SQL_ODBC_INSTALLER)

# Load CPack after all CPACK* variables are set
include(CPack)
# The component name is part of the CPack file ID referenced in
# install/windows/arrow-flight-sql-odbc.wxs (CM_FP_ArrowFlightSQLODBC.*).
# Update the .wxs if it is renamed.
cpack_add_component(ArrowFlightSQLODBC
DISPLAY_NAME "ODBC library"
DESCRIPTION "Apache Arrow Flight SQL ODBC library bin, required to install"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@

<RegistryKey Root="HKLM"
Key="Software\ODBC\ODBCINST.INI\Apache Arrow Flight SQL ODBC Driver">
<!-- CM_FP_arrow_flight_sql_odbc.bin.arrow_flight_sql_odbc.dll is a generated variable value from build\_CPack_Packages\win64\WIX\files.wxs -->
<!-- CM_FP_ArrowFlightSQLODBC.bin.arrow_flight_sql_odbc.dll is the file ID generated by CPack in
build\_CPack_Packages\win64\WIX\files.wxs. Its format is CM_FP_<CPack component name>.<install path>,
so it must be updated if the ArrowFlightSQLODBC component in odbc/CMakeLists.txt is renamed.
If the ID does not match, Driver and Setup are silently registered as empty. -->
<RegistryValue Type="string" Name="DriverODBCVer" Value="03.00"/>
<RegistryValue Type="string" Name="Driver" Value="[#CM_FP_arrow_flight_sql_odbc.bin.arrow_flight_sql_odbc.dll]"/>
<RegistryValue Type="string" Name="Setup" Value="[#CM_FP_arrow_flight_sql_odbc.bin.arrow_flight_sql_odbc.dll]"/>
<RegistryValue Type="string" Name="Driver" Value="[#CM_FP_ArrowFlightSQLODBC.bin.arrow_flight_sql_odbc.dll]"/>
<RegistryValue Type="string" Name="Setup" Value="[#CM_FP_ArrowFlightSQLODBC.bin.arrow_flight_sql_odbc.dll]"/>
<RegistryValue Type="integer" Name="UsageCount" Value="1"/>
</RegistryKey>
</Component>
Expand Down
Loading