Skip to content

Commit

Permalink
Fixed bug if multiple bulk inserts are used in the same batch
Browse files Browse the repository at this point in the history
  • Loading branch information
roji committed Mar 6, 2022
1 parent 96cc0f2 commit f60ca2d
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,14 @@ private void AppendBulkInsertCommandText(int lastIndex)

if (resultsContainPositionMapping)
{
ResultsPositionalMappingEnabled ??= new BitArray(CommandResultSet.Count);
if (ResultsPositionalMappingEnabled is null)
{
ResultsPositionalMappingEnabled = new BitArray(CommandResultSet.Count);
}
else
{
ResultsPositionalMappingEnabled.Length = CommandResultSet.Count;
}

for (var i = lastIndex - _bulkInsertCommands.Count; i < lastIndex; i++)
{
Expand Down

0 comments on commit f60ca2d

Please sign in to comment.