Closed Aryex closed 1 week ago
I have noticed this problem and I am working on a fix.
The fix has been implemented as
bool TimestreamCursor::Increment() {
LOG_DEBUG_MSG("Increment is called");
if (curPos_ > 0 && iterator_ < rowVec_.end()) {
++iterator_;
}
curPos_++;
return curPos_ <= rowVec_.size();
}
An integration test has also been added to confirm the fix.
Describe the bug
Timestream cursor can advance pass the end, causing an error. See link.
Expected Behavior
When advanced pass the end, driver does not break.
Current Behavior
It breaks.
Reproduction Steps
Instantiate a TimestreamCursor and advance it pass the end.
Possible Solution
Check if cursor is at the end.
Additional Information/Context
No response
Timestream ODBC Driver Log
No response
Timestream ODBC Driver version
2.0.0
Host Operating System and version
N/A