Skip to content

Commit a1b175c

Browse files
committed
Merge branch 'odbc-3.1'
2 parents 67e4df9 + 413342a commit a1b175c

File tree

2 files changed

+47
-18
lines changed

2 files changed

+47
-18
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ jobs:
4242
- uses: actions/checkout@v4
4343
- id: set-matrix
4444
name: build matrix
45-
uses: rusher/mariadb-test-build-matrix@main
45+
uses: mariadb-corporation/connector-ci-build-matrix@main
4646
with:
47-
additional-matrix: '[]'
47+
additional-matrix: '[{"name": "MariaDB 11.4 (local) - windows 2025", "os": "windows-2025", "db-type": "community", "db-tag": "11.4"},{"name": "MariaDB 11.4 32bits (local) - windows 2025", "os": "windows-2025", "db-type": "community", "db-tag": "11.4", "arch": "32"}]'
4848

4949
ci:
5050
name: ${{ matrix.name }}
@@ -60,7 +60,7 @@ jobs:
6060

6161
- name: Setup Test Environment
6262
id: setup-env
63-
uses: rusher/mariadb-test-setup@master
63+
uses: mariadb-corporation/connector-ci-setup@master
6464
with:
6565
node-version: ${{ matrix.node }}
6666
db-type: ${{ matrix.db-type }}
@@ -97,37 +97,66 @@ jobs:
9797
run: |
9898
choco install wixtoolset -y
9999
100-
- name: make windows
101-
if: ${{ startsWith(matrix.os, 'windows') }}
100+
- name: make windows 64bit
101+
if: ${{ startsWith(matrix.os, 'windows') && (matrix.arch != '32' || !matrix.arch) }}
102102
shell: powershell
103103
run: |
104104
cmake -DCONC_WITH_MSI=OFF -DCONC_WITH_UNIT_TESTS=OFF -DWITH_MSI=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=SCHANNEL . #-DDIRECT_LINK_TESTS=1 .
105105
cmake --build . --config RelWithDebInfo
106106
107+
- name: make windows 32bit
108+
if: ${{ startsWith(matrix.os, 'windows') && startsWith(matrix.arch, '32') }}
109+
run: |
110+
cmake -A Win32 -DCONC_WITH_MSI=OFF -DCONC_WITH_UNIT_TESTS=OFF -DWITH_MSI=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=SCHANNEL . #-DDIRECT_LINK_TESTS=1 .
111+
cmake --build . --config RelWithDebInfo
112+
107113
- name: Install generated MSI (Windows only)
108114
if: startsWith(matrix.os, 'windows')
109115
shell: powershell
110116
run: |
111-
pwd
112-
echo "--------------"
113-
ls ${{ github.workspace }}\packaging\windows\*.msi
114-
echo "--------------"
117+
$pwd= Get-Location
118+
$log= Join-Path $pwd "install.log"
119+
Write-Output $log
120+
ls ${{ github.workspace }}\packaging\windows
115121
Get-ChildItem -Path ${{ github.workspace }}\packaging\windows\mariadb-connector-odbc-*.msi
116-
echo "--------------"
117-
$log = "install.log"
118122
foreach ($msi in Get-ChildItem -Path ${{ github.workspace }}\packaging\windows\mariadb-connector-odbc-*.msi) {
119123
echo $msi
120124
echo "--------------"
121-
Start-Process msiexec.exe -ArgumentList "/i $($msi.FullName) /qn /norestart" -NoNewWindow -PassThru
122-
#$procLog = Start-Process "powershell" "Get-Content -Path `"$log`" -Wait" -NoNewWindow -PassThru
123-
#$procMain.WaitForExit()
124-
#$procLog.Kill()
125+
$procInstall= Start-Process msiexec.exe -ArgumentList "/i $($msi.FullName) /qn /norestart /L* `"$log`"" -NoNewWindow -PassThru
126+
Start-Sleep -Milliseconds 500
127+
if (Test-Path $log) {
128+
Get-Content -Path $log -Wait | ForEach-Object {
129+
if ($procInstall.HasExited) { break }
130+
$_
131+
}
132+
} else {
133+
echo "Log file still does not exist"
134+
Start-Sleep -Milliseconds 500
135+
}
125136
}
126-
echo "=========="
127-
Start-Sleep -Milliseconds 300
137+
Write-Host "Installer exit code: $($procInstall.ExitCode)"
138+
139+
- name: Create 64b DSN
140+
if: ${{ startsWith(matrix.os, 'windows') && (matrix.arch != '32' || !matrix.arch) }}
141+
shell: powershell
142+
run: |
128143
Get-OdbcDriver -Platform "64-bit"
129144
Add-OdbcDsn -Name $env:TEST_DSN -DriverName "MariaDB ODBC 3.2 Driver" -DsnType "User" -SetPropertyValue @( "SERVER=$env:TEST_SERVER", "DATABASE=$env:TEST_SCHEMA", "USER=$env:TEST_UID", "PASSWORD=$env:TEST_PASSWORD", "PORT=$env:TEST_PORT" )
130145
146+
- name: Create 32b DSN
147+
if: ${{ startsWith(matrix.os, 'windows') && startsWith(matrix.arch, '32') }}
148+
shell: powershell
149+
run: |
150+
Get-OdbcDriver -Platform "32-bit"
151+
$powershell32b = "$env:WINDIR\SysWOW64\WindowsPowerShell\v1.0\powershell.exe"
152+
$dsn= {
153+
Add-OdbcDsn -Name $env:TEST_DSN `
154+
-DriverName "MariaDB ODBC 3.1 Driver" `
155+
-DsnType "User" `
156+
-SetPropertyValue @( "SERVER=$env:TEST_SERVER", "DATABASE=$env:TEST_SCHEMA", "USER=$env:TEST_UID", "PASSWORD=$env:TEST_PASSWORD", "PORT=$env:TEST_PORT" )
157+
}
158+
& $powershell32b -NoProfile -Command $dsn
159+
131160
- name: Run test suite
132161
shell: bash
133162
run: |

test/catalog2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,7 @@ ODBC_TEST(odbc185)
14401440

14411441
OK_SIMPLE_STMT(hstmt1, "DROP TABLE IF EXISTS t_odbc185");
14421442
CHECK_STMT_RC(hstmt1, SQLExecDirectW(hstmt1,
1443-
W(L"CREATE TABLE t_odbc185 (ccol CHAR(32), vcfield VARCHAR(32) not null, tcol TEXT, ttcol TINYTEXT, mtcol MEDIUMTEXT,\
1443+
W(L"CREATE TABLE t_odbc185 (ccol CHAR(32), vcfield VARCHAR(32) NOT NULL, tcol TEXT, ttcol TINYTEXT, mtcol MEDIUMTEXT,\
14441444
ltcol LONGTEXT, ecol ENUM('enum val 1', 'enum val 2'), scol SET('set m1', 'set m3'))"), SQL_NTS));
14451445

14461446
/* It doesn't matter if we call SQLColumns or SQLColumnsW */

0 commit comments

Comments
 (0)