From 060652700636e1632a1332cdc9b7ce09c566275e Mon Sep 17 00:00:00 2001 From: Markus Bergholz Date: Mon, 23 May 2022 19:46:02 +0200 Subject: [PATCH] Fix removed client_found_rows mysql variable (#101) (#102) * Fix removed client_found_rows mysql variable As of ProxySQL 2.4.0, client_found_rows variable has been removed. SEE: https://github.com/sysown/proxysql/commit/02915a9eae20ee32555922fcb046403852e1f923 * Add changelog fragment Co-authored-by: Jonathan Piron --- changelogs/fragments/101-removed-mysql-variable.yml | 2 ++ roles/proxysql/vars/main.yml | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/101-removed-mysql-variable.yml diff --git a/changelogs/fragments/101-removed-mysql-variable.yml b/changelogs/fragments/101-removed-mysql-variable.yml new file mode 100644 index 0000000..81dea44 --- /dev/null +++ b/changelogs/fragments/101-removed-mysql-variable.yml @@ -0,0 +1,2 @@ +bugfixes: + - roles/proxysql - As of ProxySQL 2.4.0, `client_found_rows` mysql variable has been removed (https://github.com/ansible-collections/community.proxysql/pull/101). diff --git a/roles/proxysql/vars/main.yml b/roles/proxysql/vars/main.yml index ffc02dc..fcf8612 100644 --- a/roles/proxysql/vars/main.yml +++ b/roles/proxysql/vars/main.yml @@ -104,16 +104,13 @@ proxysql_admin_variables: variable: "web_port" variable_value: "{{ proxysql_admin_web_port }}" -proxysql_mysql_variables: +_proxysql_mysql_variables: autocommit_false_is_transaction: variable: "autocommit_false_is_transaction" variable_value: "{{ proxysql_mysql_autocommit_false_is_transaction | to_json }}" autocommit_false_not_reusable: variable: "autocommit_false_not_reusable" variable_value: "{{ proxysql_mysql_autocommit_false_not_reusable | to_json }}" - client_found_rows: - variable: "client_found_rows" - variable_value: "{{ proxysql_mysql_client_found_rows | to_json }}" commands_stats: variable: "commands_stats" variable_value: "{{ proxysql_mysql_commands_stats | to_json }}" @@ -376,6 +373,13 @@ proxysql_mysql_variables: variable: "wait_timeout" variable_value: "{{ proxysql_mysql_mysql_wait_timeout }}" +_proxysql_mysql_client_found_rows: + 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_mysql_options: mysql_threads: variable: "threads"