Fix issue where only 25 group members were returned

This is because GROUP_CONCAT defaults to 1024. uuid is 40 chars.
1024/40 = ~25
This commit is contained in:
Girish Ramakrishnan
2022-06-22 17:54:52 -07:00
parent 3a63158763
commit 94a196bfa0

View File

@@ -61,8 +61,9 @@ async function initialize() {
// note the pool also has an 'acquire' event but that is called whenever we do a getConnection()
connection.on('error', (error) => debug(`Connection ${connection.threadId} error: ${error.message} ${error.code}`));
connection.query('USE ' + gDatabase.name);
connection.query(`USE ${gDatabase.name}`);
connection.query('SET SESSION sql_mode = \'strict_all_tables\'');
connection.query('SET SESSION group_concat_max_len = 65536'); // GROUP_CONCAT has only 1024 default
});
}