-
Notifications
You must be signed in to change notification settings - Fork 17.5k
-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
database/sql: sqlite corruption #2622
Labels
Milestone
Comments
Yeah, I can reproduce this. The issue is that the gosqlite3 driver uses unsafe and in its Next(dest []interface{}) method, populates []byte pointing into memory that will go away when the Rows are closed. So far, that's fine. But then the Scan function, when scanning from a driver-owned []byte to a pointer to a client-owned []byte doesn't do a copy. That's the bug, I believe. I verified that scanning to a string is fine. |
> But then the Scan function, when scanning from a driver-owned []byte to a pointer to a client-owned []byte doesn't do a copy. Which is consistent with the documentation for Row.Scan(). Doesn't mean it's not a bug, of course. (BTW, the make() call in my/your example code is probably superfluous.) |
Fix in review here: http://golang.org/cl/5533077/ Verified that it fixes this issue. |
This issue was closed by revision 701f70a. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: