-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Slice Bounds Out of Range in packets.go #254
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
Comments
The following information would be helpful:
|
go version: 1.2.1 linux/amd64 I have narrowed down the replication conditions a bit. The query that is blowing up can either come up empty (return no rows) or return rows. The panics only seem to occur only when a query which returns rows follows a query which comes up empty. So:
The code is passing a prepared statement on a channel via a struct to a pool of workers (using a worker pool to limit connections to the database).
Here is the query. I've had to redact most of the field names and tables, but I have the type after each in comments. I have also tried explicitly CAST-ing the type in each field.
Please let me know if you need more information or if there is anything I can do to help. |
Hi @dethtron5000, sorry for the long wait. Update some hours later, this unfortunately reads a lot harsher than I intended, sorry. |
Closed for now because of inactivity |
I am getting the following panic after running
rows.Next()
. I've verified that the returned rows object is not nil prior to runningNext()
This seems to only occur when there are multiple goroutines trying to communicate with the database.It seems like the
pos
variable here is causing the issue:dest[i], isNull, n, err = readLengthEncodedString(data[pos:])
I can verify that pos exceeds the length of the data slice:
reading from position: 78 length: 76 capacity: 3274
Please let me know if there's anything else that can help you with this bug.
The text was updated successfully, but these errors were encountered: