Skip to content

Commit

Permalink
Put rewind in while loop
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ext-simba-lf committed Oct 25, 2024
1 parent ed590bc commit 221f90b
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Snowflake.Data/Core/ResultSetUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,11 @@ internal static int CalculateUpdateCount(this SFBaseResultSet resultSet)
var index = resultSet.sfResultSetMetaData.GetColumnIndexByName("rows_loaded");
if (index >= 0)
{
int rewindCount = 1;
while (resultSet.Next())
{
updateCount += resultSet.GetInt64(index);
rewindCount++;
}

while (rewindCount > 0)
{
resultSet.Rewind();
rewindCount--;
}
while (resultSet.Rewind()) {}
}
break;
case SFStatementType.COPY_UNLOAD:
Expand Down

0 comments on commit 221f90b

Please sign in to comment.