You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Let's say query1 should return 40 result rows.
But it returns only a partial set of the results (e.g. sometimes 8 results only) when timeout context is given.
To Reproduce
I
func withTimeout() {
var d1 int
cont, cancel := context.WithTimeout(context.Background(), time.Duration(300)*time.Minute)
defer cancel()
row, err := DB.QueryContext(cont, query1)
if err == nil {
for {
if !row.Next() {
logger.log("No more data")
break
} else {
row.Scan(&d1)
logger.log(d1)
}
}
}
}
func withoutTimeout() {
var d1 int
row, err := DB.QueryContext(context.Background(), query1)
if err == nil {
for {
if !row.Next() {
logger.log("No more data")
break
} else {
row.Scan(&d1)
logger.log(d1)
}
}
}
}
withTimeout() prints only some records.
withoutTimeout() prints all 40 records.
Note that even we give a large value for the timeout (e.g. 300 min), it still has not work.
Further technical details
SQL Server version: run in docker from mcr.microsoft.com/mssql/server:2019-latest
Operating system: Docker container
version: github.com/denisenkom/go-mssqldb v0.12.0
The text was updated successfully, but these errors were encountered:
Describe the bug
Let's say query1 should return 40 result rows.
But it returns only a partial set of the results (e.g. sometimes 8 results only) when timeout context is given.
To Reproduce
I
withTimeout() prints only some records.
withoutTimeout() prints all 40 records.
Note that even we give a large value for the timeout (e.g. 300 min), it still has not work.
Further technical details
SQL Server version: run in docker from mcr.microsoft.com/mssql/server:2019-latest
Operating system: Docker container
version: github.com/denisenkom/go-mssqldb v0.12.0
The text was updated successfully, but these errors were encountered: