camcam
camcam

Reputation: 2625

mysql can't change a session variable group_concat_max_len

In MySQL help it says that "Setting a session variable requires no special privilege, but a client can change only its own session variables, not those of any other client."

I try to increase the size of group_concat_max_len like this: SET @@group_concat_max_len = 9999;

In phpmyadmin, the response is positive: 'Your SQL query has been executed successfully'.

Then I check the value like this (in the same window, 2 seconds later):

SHOW SESSION VARIABLES;

And unfortunately, group_concat_max_len = 1024

I am not the admin of this MySQL server, but if changing session variable does not require special privilege, then it should work. On my localhost it works.

Is there any chance to set this variable or at least to know why it can't be changed?

Upvotes: 0

Views: 3492

Answers (1)

Eugen Rieck
Eugen Rieck

Reputation: 65274

In phpmyadmin it is not guaranteed, that 2 queries (even if they are separated only by a few seconds) go to the same session. So chances are, SET @@group_concat_max_len = 9999; went to one session, but SHOW SESSION VARIABLES; to another.

If you try from the mysql command line client, this will work as expected.

Upvotes: 2

Related Questions