Reputation: 1
I'm having an issue with a query I wrote for a plugin I developed for CS:GO.
I'm using the following query:
SELECT FIND_IN_SET(total, (SELECT GROUP_CONCAT(total ORDER BY total DESC) FROM t_cache WHERE total != 0)) AS rank, steamID, total FROM t_cache
As shown in the image below, it only processes the first 129 people, and fails to FIND_IN_SET
the rest of the users where the points != 0.
I'd like to know if there's a limit for any of the functions I used; and if it can be fixed.
Upvotes: 0
Views: 532
Reputation: 15057
You can increase the max length of the function GROUP_CONCAT with:
Change group_concat_max_len in the /etc/my.cnf
OR only for this session
SET SESSION group_concat_max_len = 1000000;
OR Global for all
SET GLOBAL group_concat_max_len = 1000000;
Upvotes: 2