Details
-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
None
-
1
Description
We have a use case with query results where we may end up calling NextBytes() on a query result after we've already exhausted all of the results.
Our use case means we have multiple places where we call NextBytes() and sometimes we end up exhausting the results, sometimes we don't. To avoid Closing the query results before results have exhausted (which results in the result must be closed before accessing the meta-data ) we want to clear out the results as part of a Close() wrapper.
Our Close() is attempting to just do a no-op iteration to clear the results but as mentioned earlier fi the results are already exhausted the NextBytes() op panics. Looks like the row streamer is nilled if the last NextBytes() returned nil which is the cause of the panic.
Would it be possible to add an additional check on this to continue to return nil on NextBytes() to avoid this panic.