Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/Gemstone.Data/AdoDataConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1181,11 +1181,14 @@ public async IAsyncEnumerable<DataRow> RetrieveDataAsAsyncEnumerable(DataTable s
if (!reader.HasRows)
yield break;

// Clone schema so concurrent callers sharing the same schema instance do not share row storage
DataTable table = schema.Clone();

while (await reader.ReadAsync(cancellationToken).ConfigureAwait(false))
{
DataRow row = schema.NewRow();
DataRow row = table.NewRow();

foreach (DataColumn col in schema.Columns)
foreach (DataColumn col in table.Columns)
row[col.ColumnName] = reader[col.ColumnName];

yield return row;
Expand Down
Loading