fix iterating over empty hydrating result set with buffering enabled
fix for tests
fixed rewind when buffering is not enabled
Merge pull request #4450 from mrsombre/hotfix/result-set-with-buffer

Fix iterating over empty result set with buffering enabled
Merge branch 'hotfix/4450'

Close #4450