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 (n8n-io#10965)
  • Loading branch information
netroy committed Sep 25, 2024
1 parent afbe884 commit 62159bd
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 62159bd

Please sign in to comment.