jonatanklosko / wca_statistics

Build kit for generating cubing-related rankings
https://jonatanklosko.github.io/wca_statistics
MIT License
18 stars 29 forks source link

Increase the resulting string length of GROUP_CONCAT from 1024 to 4096 #14

Closed OldManLink closed 1 year ago

OldManLink commented 1 year ago

In the statistic most_attended_competitions_in_single_month the SQL function GROUP_CONCAT is used to create a list of attended competitions for the month, with URL links and human-readable names.

Unfortunately, the resulting string has a default length of 1024, which is no longer sufficient for the top two competitors, and their competition lists are truncated. GroupConcatBugBefore

This PR addresses the problem by adding an init_command to the SQL client initialisation code that sets the session variable group_concat_max_len to a larger value of 4096. This should be sufficient until someone manages to attend more than 47 competitions in a single month. GroupConcatBugAfter