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

Improvements on how MySQL variables are processed #3702

Merged
merged 19 commits into from Jan 10, 2022
Merged

Conversation

renecannao
Copy link
Contributor

No description provided.

generate_set_session_csv will be able to automatically generate
a long list of SET statements for testing purpose
Deprecated variables:
- net_write_timeout

Renamed set_testing-t.csv to set_testing-t.csv.obsolete , and removed net_write_timeout from set_testing-t.csv

Variables added to ignore list:
- net_write_timeout
- net_buffer_length
- read_buffer_size
- read_rnd_buffer_size

Added support for quoting with backtick

Renamed `enum variable_name` into `enum mysql_variable_name` for better readibility

`enum mysql_variable_name` has variable names alphabetically ordered after SQL_NAME_LAST_LOW_WM

`mysql_tracked_variables` has variable names alphabetically ordered after SQL_NAME_LAST_LOW_WM

A lot of new variables added in `mysql_tracked_variables` , although not all tracked yet (TODO)

In `MySQL_Variables::MySQL_Variables()`:
- if `internal_variable_name` in `mysql_tracked_variables` is NULL , it will be automatically initialized
- it performs some sanity check between `enum mysql_variable_name` and `mysql_tracked_variables`

Testing:
- refactored code in set_testing-t.cpp and set_testing-multi-t.cpp
- added set_testing-240-t.cpp to test improvements in 2.4.0
- generate_set_session_csv to automatically create set_testing-240.csv used by set_testing-240-t
@renecannao renecannao marked this pull request as draft November 23, 2021 19:57
@renecannao
Copy link
Contributor Author

retest this please

1 similar comment
@renecannao
Copy link
Contributor Author

retest this please

Better parsing of SET SQL_LOG_BIN .
SQL_LOG_BIN is now managed by the same functions that handle boolean variables
instead of the now deprecated MySQL_Session::handler_WCD_SS_MCQ_qpo_Parse_SQL_LOG_BIN()

For naming convention, enum value SQL_LOG_BIN was renamed to SQL_SQL_LOG_BIN

In MySQL_Thread we also deprecated match_regexes[0] , previously
used to parse `set sql_log_bin`.

Functions Variable::fill_server_internal_session() and
Variable::fill_client_internal_session() seems to handle sql_log_bin as a
special value. This exception was removed.

Fixed a bug in MySQL_Session::generate_proxysql_internal_session_json() where
when backend variables needed to be generated, fill_client_internal_session()
was incorrectly called instead of fill_server_internal_session() , leading to
incorrect values reported by `PROXYSQL INTERNAL SESSION`
Changing mysql port back from 3306 to 13306 on
test_com_reset_connection_com_change_user-t.cpp
New variables supported:
- lc_messages
- lc_time_names
- max_execution_time
- optimizer_prune_level
- optimizer_search_depth
- sort_buffer_size
- timestamp
- tmp_table_size
@renecannao
Copy link
Contributor Author

renecannao commented Dec 20, 2021

This PR will:
Closes #2200
Closes #2202
Closes #2702
Closes #3705
Closes #3659
Closes #3260
Closes #3184
Closes #2943
Closes #2808
Closes #3653
Closes #2937
Closes #2587
Closes #2428
Closes #2390
Closes #2129
Closes #1414

If max_execution_time is too small, the TAP test may fails because the
queries will timeout
- long_query_time
- max_heap_table_size
- max_sort_length
- optimizer_switch
- sql_big_selects

Also fixed several bugs in previous commit

Note: sql_big_selects is still not fully supported when
combined with max_join_size
New variables supported:
- lc_messages
- lc_time_names
- long_query_time
- max_execution_time
- max_heap_table_size
- max_sort_length
- optimizer_prune_level
- optimizer_search_depth
- optimizer_switch
- sort_buffer_size
- sql_big_selects
- timestamp
- tmp_table_size

Note: sql_big_selects is still not fully supported when
combined with max_join_size.

In set testing TAP ,set large max_execution_time.
If max_execution_time is too small, the TAP test may fails because the
queries will timeout.
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.

None yet

1 participant