Re: [go-nuts] Probable bug in database/sql

2024-02-22 Thread Marco De Zio
Thank you for the quick response! Let me elaborate a bit: my doubt arose from the hitEOF doc string which says that it's expected to be true when there are no more rows AND no errors where encountered; within Next, hitEOF is set to true when nextLocked's ok is false. That seems misleading to me

Re: [go-nuts] Probable bug in database/sql

2024-02-21 Thread Ian Lance Taylor
On Wed, Feb 21, 2024 at 4:27 PM Marco De Zio wrote: > > It seems to me that the second flag returned by Rows.nextLocked is wrongly > interpreted by Rows.Next as it sets rs.hitEOF = true when ok is false; also > Rows.nextLocked should set ok to true in some of the cases where right now > returns

[go-nuts] Probable bug in database/sql

2024-02-21 Thread Marco De Zio
It seems to me that the second flag returned by Rows.nextLocked is wrongly interpreted by Rows.Next as it sets rs.hitEOF = true when ok is false; also Rows.nextLocked should set ok to true in some of the cases where right now returns false. Reference in code: https://github.com/golang/go/blob