Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select SERVERPROPERTY('productversion') panics #22

Closed
dimdin opened this issue May 2, 2014 · 1 comment
Closed

select SERVERPROPERTY('productversion') panics #22

dimdin opened this issue May 2, 2014 · 1 comment
Assignees

Comments

@dimdin
Copy link
Collaborator

dimdin commented May 2, 2014

it works with a cast: select cast(SERVERPROPERTY('productversion') as nvarchar(max))

panics with SQL Server 2005 when processing the column metadata:

github.com/denisenkom/go-mssqldb.badStreamPanic(0x3abe80, 0xc210036070)
/Users/din/go/src/github.com/denisenkom/go-mssqldb/error.go:39 +0x49
github.com/denisenkom/go-mssqldb.(_tdsBuffer).ReadFull(0xc21004e300, 0xc21000bc40, 0x1a2, 0x1a2)
/Users/din/go/src/github.com/denisenkom/go-mssqldb/buf.go:144 +0x78
github.com/denisenkom/go-mssqldb.(_tdsBuffer).readUcs2(0xc21004e300, 0xd1, 0x67b770, 0x60)
/Users/din/go/src/github.com/denisenkom/go-mssqldb/buf.go:182 +0x73
github.com/denisenkom/go-mssqldb.(*tdsBuffer).BVarChar(0xc21004e300, 0x62, 0x1f49)
/Users/din/go/src/github.com/denisenkom/go-mssqldb/buf.go:172 +0x43
github.com/denisenkom/go-mssqldb.parseColMetadata72(0xc21004e300, 0xc21004f5a0, 0x1, 0x1)
/Users/din/go/src/github.com/denisenkom/go-mssqldb/token.go:227 +0x1c3
github.com/denisenkom/go-mssqldb.processResponse(0xc2100462a0, 0xc21006e2c0, 0x0, 0x0)

@denisenkom denisenkom self-assigned this May 3, 2014
@denisenkom
Copy link
Owner

SERVERPROPERTY returns sql_variant which wasn't supported, now it is supported.

odeke-em pushed a commit to orijtech/go-mssqldb that referenced this issue Jul 26, 2020
odeke-em pushed a commit to orijtech/go-mssqldb that referenced this issue Jul 26, 2020
odeke-em pushed a commit to orijtech/go-mssqldb that referenced this issue Jul 26, 2020
odeke-em pushed a commit to orijtech/go-mssqldb that referenced this issue Jul 26, 2020
odeke-em pushed a commit to orijtech/go-mssqldb that referenced this issue Jul 26, 2020
add ref (SHA, branch, or tag) to the github migration source
prochac pushed a commit to prochac/go-mssqldb that referenced this issue Sep 30, 2022
* match int parameter sizes to caller types

* update tests

* match int size to process bitness

* remove go1.8 variation

* fix lint issues

* add Close calls back

* fix bulkcopy

* check rows err

* add build tag for 1.10

* PR feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants