Invalidate cache on Rows.NextResultSet call#858
Invalidate cache on Rows.NextResultSet call#858kamilkoduo wants to merge 1 commit intojmoiron:masterfrom
Conversation
When reading multiple result sets from sqlx.Rows using StructScan, some information obtained usCCCing costly reflect operations is cached for performance optimisation. However, different result sets in a single sqlx.Rows object might have different structures, so cache should be invalidated and rebuild after each NextResultSet call. Now this method is not overwritten, so old cache interferes with new structures after first result set scan. Relates jmoiron#857
83d76fb to
a817d1d
Compare
|
@jmoiron Yeah, that's a real problem, it would be cool if you could merge one of these solutions |
|
@jmoiron Are you open to additional maintainers? There are a handful of really useful PRs that look straightforward and I'd be happy to help get them merged. This is a fantastic project and given its widespread use, keeping future changes in the original repo would be ideal. |
|
Hello, @ardan-bkennedy, and I recently stepped in to help maintain this project. |
|
I just found this issue and wonder if anyone would merge it? I tested the proposed changes in the referenced commit, and it works for all my queries. |
When reading multiple result sets from sqlx.Rows using StructScan, some information obtained usCCCing costly reflect operations is cached for performance optimisation.
However, different result sets in a single sqlx.Rows object might have different structures, so cache should be invalidated and rebuild after each NextResultSet call. Now this method is not overwritten, so old cache interferes with new structures after first result set scan.
Relates #857