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

Disabling variables from MySQL_Variables #2894

Closed
wants to merge 115 commits into from

Conversation

renecannao
Copy link
Contributor

Port to v2.1.0 of PR #2866

pravus and others added 30 commits April 3, 2020 07:23
Added signal handler installation when running in the foreground
Fix pxc_maint_mode failback when writer_is_also_reader=2
Fix shunning reader when node goes to MAINTENANCE
This will enable aux threads by default as per
#2638
add workdir as environment variable
Fix issue 2727: Error setting MYSQL_OPTION_MULTI_STATEMENTS
renecannao and others added 29 commits May 29, 2020 22:12
fix unquoted table name leading to sql errors
Ignore last semicolon from SET statements #2838
Fixes #2850: Segfaults due to access to 'GloMyLogger' and 'GloMTH' when already deinitialized
Fixes #2834: Segfault due to invalid access to threads during startup / shutdown
Prevent crash if CHARACTER_SET_CONNECTION is not initialized yet #2863
Extended `mysql_variable_st` to add a new variable `is_global_variable`.
Using this variable we define the global variables.
Modified `mysql_tracked_variables[]` to also specify `is_global_variable`.

Removed `default_charset` from `MySQL_Threads_Handler::variables` to use `mysql_tracked_variables[]` instead.
Removed `default_charset` also from `mysql_thread_variables_names[]`.

Fixed `MySQL_Threads_Handler::get_variable_string()` : it was *not* returning `mysql-default_` variables.

`MySQL_Threads_Handler::set_variable()` adds `mysql-default_` variables only if `is_global_variable` is set.
In `MySQL_Threads_Handler::set_variable()` replaced a `strcasecmp()` with `strcmp()` for `mysql-default_` variables.

`MySQL_Threads_Handler::get_variables_list()` returns only `mysql-default_` variables with `is_global_variable` enabled.

`MySQL_Threads_Handler::has_variable()` for `mysql-default_` variables returns true only if variable has `is_global_variable` enabled.

`MySQL_Thread::refresh_variables()` does not refresh `mysql-default_` variables if `is_global_variable` is not enabled.

`MySQL_Thread::MySQL_Thread()` initializes to NULL all `mysql_thread___default_variables[]` variables.

Completely disabled in `ProxySQL_Admin::flush_mysql_variables___database_to_runtime()` the logic applied to all charset variables.
In the same methos was implemented the logic described in #1785 :
`mysql-default_charset` and `mysql-default_collation_connection` must be compatible:
* if only one is present, the other is configured automatically
* if not compatible, `mysql-default_charset` is configured from `mysql-default_collation_connection`
…hanged.

If mysql-default_charset is changed but mysql-default_collation_connection it is not,
use mysql-default_charset to tune mysql-default_collation_connection.
@renecannao renecannao closed this Jun 15, 2020
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.

10 participants