diff --git a/changelogs/fragments/109-enable-load-data-local-infile.yml b/changelogs/fragments/109-enable-load-data-local-infile.yml new file mode 100644 index 0000000..e2eefa3 --- /dev/null +++ b/changelogs/fragments/109-enable-load-data-local-infile.yml @@ -0,0 +1,2 @@ +minor_changes: + - roles/proxysql - Add support for setting enable_load_data_local_infile (https://github.com/ansible-collections/community.proxysql/pull/109). diff --git a/roles/proxysql/defaults/main.yml b/roles/proxysql/defaults/main.yml index 58b008d..acd74d4 100644 --- a/roles/proxysql/defaults/main.yml +++ b/roles/proxysql/defaults/main.yml @@ -166,3 +166,6 @@ proxysql_mysql_query_digests_max_query_length: 65000 proxysql_mysql_stats_time_backend_query: false proxysql_mysql_stats_time_query_processor: false proxysql_mysql_verbose_query_error: false + +# misc +proxysql_mysql_enable_load_data_local_infile: false diff --git a/roles/proxysql/vars/main.yml b/roles/proxysql/vars/main.yml index 83d1983..e023b03 100644 --- a/roles/proxysql/vars/main.yml +++ b/roles/proxysql/vars/main.yml @@ -365,7 +365,14 @@ _proxysql_mysql_client_found_rows: variable: "client_found_rows" variable_value: "{{ proxysql_mysql_client_found_rows | to_json }}" -proxysql_mysql_variables: "{{ _proxysql_mysql_variables | combine((proxysql_version is version('2.4.0', '<')) | ternary(_proxysql_mysql_client_found_rows, {})) }}" +_proxysql_enable_load_data_local_infile: + enable_load_data_local_infile: + variable: "enable_load_data_local_infile" + variable_value: "{{ proxysql_mysql_enable_load_data_local_infile }}" + +proxysql_mysql_variables: "{{ _proxysql_mysql_variables + | combine((proxysql_version is version('2.4.0', '<')) | ternary(_proxysql_mysql_client_found_rows, {})) + | combine((proxysql_version is version('2.3.0', '>=')) | ternary(_proxysql_enable_load_data_local_infile, {})) }}" proxysql_mysql_options: mysql_threads: