Skip to content

Commit

Permalink
fix(MySQL Node): Fix "Maximum call stack size exceeded" error when ha…
Browse files Browse the repository at this point in the history
…ndling a large number of rows
  • Loading branch information
netroy committed Sep 25, 2024
1 parent 5ce05b3 commit 3ac9f94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/nodes-base/nodes/MySql/v1/MySqlV1.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export class MySqlV1 implements INodeType {
{ itemData: { item: index } },
);

collection.push(...executionData);
collection = collection.concat(executionData);

return collection;
},
Expand Down
6 changes: 3 additions & 3 deletions packages/nodes-base/nodes/MySql/v2/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export function prepareOutput(
) => NodeExecutionWithMetadata[],
itemData: IPairedItemData | IPairedItemData[],
) {
const returnData: INodeExecutionData[] = [];
let returnData: INodeExecutionData[] = [];

if (options.detailedOutput) {
response.forEach((entry, index) => {
Expand All @@ -154,7 +154,7 @@ export function prepareOutput(
itemData,
});

returnData.push(...executionData);
returnData = returnData.concat(executionData);
});
} else {
response
Expand All @@ -164,7 +164,7 @@ export function prepareOutput(
itemData: Array.isArray(itemData) ? itemData[index] : itemData,
});

returnData.push(...executionData);
returnData = returnData.concat(executionData);
});
}

Expand Down

0 comments on commit 3ac9f94

Please sign in to comment.