Fix crash when there are too many trade matches
Oops, the GROUP_CONCAT string was getting cut off! This caused an error trying to look up the name of an item ID that didn't exist, because the ID got truncated partway through.
This commit is contained in:
parent
4a352e04e0
commit
5865157a1b
1 changed files with 5 additions and 1 deletions
|
@ -139,8 +139,9 @@ const buildTradeMatchesLoader = (db) =>
|
||||||
})
|
})
|
||||||
.flat();
|
.flat();
|
||||||
|
|
||||||
const [rows, _] = await db.execute(
|
const [rows, _] = await db.query(
|
||||||
`
|
`
|
||||||
|
SET SESSION group_concat_max_len = 4096;
|
||||||
SELECT
|
SELECT
|
||||||
public_user_hangers.user_id AS public_user_id,
|
public_user_hangers.user_id AS public_user_id,
|
||||||
current_user_hangers.user_id AS current_user_id,
|
current_user_hangers.user_id AS current_user_id,
|
||||||
|
@ -186,6 +187,9 @@ const buildTradeMatchesLoader = (db) =>
|
||||||
e.currentUserId === currentUserId &&
|
e.currentUserId === currentUserId &&
|
||||||
e.direction === direction
|
e.direction === direction
|
||||||
);
|
);
|
||||||
|
if (entity && entity.publicUserId == "26378") {
|
||||||
|
console.log(entity);
|
||||||
|
}
|
||||||
return entity ? entity.itemIds.split(",") : [];
|
return entity ? entity.itemIds.split(",") : [];
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue