Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: YanDJ on March 31, 2020, 02:03:51 am

Title: [RESOLVED][SQL Fragment] GROUP_CONCAT Limitation (group_concat_max_len)
Post by: YanDJ on March 31, 2020, 02:03:51 am
Hello,

I generate automaticaly ours design with EA and an SQL Fragment.
I am able to retrieve an list of tag value with the same name and rename as "dependencies" with the following code:
Code: [Select]
GROUP_CONCAT( DISTINCT optag4.value ORDER BY optag4.ElementID DESC SEPARATOR ', ') AS dependencies,
But the query works well but when I have too many characters (> 1024 char) the GROUP_CONCAT stop concat all my tag value with the same name.
I found that in mySQL, I have to write in my query :
Code: [Select]
SET SESSION group_concat_max_len = 1000000;
But when I try to set, the querry do nothing and return nothing.

Has anyone ever had this problem before?

Thank You

Yan

EDIT: The subject have been resolved by changing the configuration of the server :
I've changed the file "my.ini" in the repository C:\ProgramData\MySQL\MySQL Server 8.0

To add the line :
Code: [Select]
group_concat_max_len=25000
Title: Re: [SQL Fragment] GROUP_CONCAT Limitation (group_concat_max_len)
Post by: Eve on March 31, 2020, 08:36:01 am
I found that in mySQL, I have to write in my query :
Code: [Select]
SET SESSION group_concat_max_len = 1000000;
You will need to execute that in the MySQL admin console (or whatever it's called). EA won't execute it for you.
Title: Re: [SQL Fragment] GROUP_CONCAT Limitation (group_concat_max_len)
Post by: YanDJ on April 02, 2020, 03:57:38 am
Ok thank you for the informations Eve, we will try to change it in ours server.
Yan
Title: Re: [SQL Fragment] GROUP_CONCAT Limitation (group_concat_max_len)
Post by: Modesto Vega on April 03, 2020, 03:21:12 am
Have you tried creating a MySQL store procedure or, even better, a view and calling it from Sparx?