Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2.0.12 Session variable group_concat_max_len #2745

Merged
merged 2 commits into from
May 11, 2020
Merged

Conversation

alpes214
Copy link
Contributor

@alpes214 alpes214 commented May 5, 2020

Description:
Track variable group_concat_max_len
Automated tests are updated.

Manual testing:

mysql> select * from performance_schema.session_variables where variable_name like '%group_concat_%';
+----------------------+----------------+
| VARIABLE_NAME        | VARIABLE_VALUE |
+----------------------+----------------+
| group_concat_max_len | 1024           |
+----------------------+----------------+
1 row in set (0.00 sec)

mysql> set group_concat_max_len=4096;
Query OK, 0 rows affected (0.00 sec)

mysql> select * from performance_schema.session_variables where variable_name like '%group_concat_%';
+----------------------+----------------+
| VARIABLE_NAME        | VARIABLE_VALUE |
+----------------------+----------------+
| group_concat_max_len | 4096           |
+----------------------+----------------+
1 row in set (0.00 sec)

@alpes214 alpes214 changed the title Session variable group_concat_max_len V2.0.12 Session variable group_concat_max_len May 5, 2020
@@ -3373,7 +3373,7 @@ bool MySQL_Thread::init() {

match_regexes=(Session_Regex **)malloc(sizeof(Session_Regex *)*4);
match_regexes[0]=new Session_Regex((char *)"^SET (|SESSION |@@|@@session.)SQL_LOG_BIN( *)(:|)=( *)");
match_regexes[1]=new Session_Regex((char *)"^SET (|SESSION |@@|@@session.)(SQL_MODE|TIME_ZONE|CHARACTER_SET_RESULTS|CHARACTER_SET_CLIENT|CHARACTER_SET_DATABASE|SESSION_TRACK_GTIDS|SQL_AUTO_IS_NULL|SQL_SELECT_LIMIT|SQL_SAFE_UPDATES|COLLATION_CONNECTION|CHARACTER_SET_CONNECTION|NET_WRITE_TIMEOUT|WSREP_SYNC_WAIT|TX_ISOLATION|MAX_JOIN_SIZE( *)(:|)=( *))");
match_regexes[1]=new Session_Regex((char *)"^SET (|SESSION |@@|@@session.)(SQL_MODE|TIME_ZONE|CHARACTER_SET_RESULTS|CHARACTER_SET_CLIENT|CHARACTER_SET_DATABASE|SESSION_TRACK_GTIDS|SQL_AUTO_IS_NULL|SQL_SELECT_LIMIT|SQL_SAFE_UPDATES|COLLATION_CONNECTION|CHARACTER_SET_CONNECTION|NET_WRITE_TIMEOUT|WSREP_SYNC_WAIT|TX_ISOLATION|GROUP_CONCAT_MAX_LEN|MAX_JOIN_SIZE( *)(:|)=( *))");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having a hardcoded list of variables, can we generate the list at runtime from mysql_tracked_variables ?
We can also have a mixed approach: some hardcoded variables + all the variables in mysql_tracked_variables , or some hardcoded variables + all the variables in mysql_tracked_variables that are handled by SETTING_VARIABLE , or some other way.
End goal: we should not modify this regex every time we want to track a new variable

@renecannao
Copy link
Contributor

This also needs to be ported to 2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants