Skip to content

Commit a3e80f8

Browse files
committed
Handle MS SQL version stings with - in it
Handle - in RTM-CU3-GDR in Microsoft SQL Server 2017 (RTM-CU3-GDR) (KB4052987) - 14.0.3015.40 (X64)
1 parent 27e92ea commit a3e80f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mssql_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func serverVersion(db *sql.DB) (sqlVersion, sqlPartNumber, osVersion string, err
172172
for i := range a {
173173
a[i] = strings.Trim(a[i], " \t")
174174
}
175-
l1 := strings.SplitN(a[0], "-", -1)
175+
l1 := strings.SplitN(a[0], "- ", -1)
176176
if len(l1) != 2 {
177177
return "", "", "", errors.New("SQL Server version first line must have - in it: " + v)
178178
}

0 commit comments

Comments
 (0)