diff --git a/tests/integration/targets/test_mysql_db/tasks/encoding_dump_import.yml b/tests/integration/targets/test_mysql_db/tasks/encoding_dump_import.yml index fc7b7d8..02e5df2 100644 --- a/tests/integration/targets/test_mysql_db/tasks/encoding_dump_import.yml +++ b/tests/integration/targets/test_mysql_db/tasks/encoding_dump_import.yml @@ -36,12 +36,6 @@ command: "{{ mysql_command }} {{ db_latin1_name }} -e \"select * from testlatin1\"" register: output -# With MySQL 8, new options have been added. For instance, when attempt to dump -# a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' -# in information_schema (1109)". -# Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple -# major relase :( So I add --column-statistics=0 as a workaround... -# TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Encoding | Dumping a table in Latin1 database mysql_db: login_user: '{{ mysql_user }}' @@ -52,10 +46,6 @@ encoding: latin1 target: "{{ latin1_file1 }}" state: dump - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: result - assert: diff --git a/tests/integration/targets/test_mysql_db/tasks/issue_256_mysqldump_errors.yml b/tests/integration/targets/test_mysql_db/tasks/issue_256_mysqldump_errors.yml index 8bc7fdf..ea1768a 100644 --- a/tests/integration/targets/test_mysql_db/tasks/issue_256_mysqldump_errors.yml +++ b/tests/integration/targets/test_mysql_db/tasks/issue_256_mysqldump_errors.yml @@ -27,72 +27,32 @@ - "CREATE TABLE db1.t2 (id int)" - "CREATE VIEW db2.v1 AS SELECT id from db1.t1" - # With MySQL 8, new options have been added. For instance, when attempt to dump - # a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' - # in information_schema (1109)". - # Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple - # major relase :( So I add --column-statistics=0 as a workaround... - # TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dumps errors | Full dump without compression community.mysql.mysql_db: state: dump name: all target: /tmp/full-dump.sql - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: full_dump - # With MySQL 8, new options have been added. For instance, when attempt to dump - # a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' - # in information_schema (1109)". - # Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple - # major relase :( So I add --column-statistics=0 as a workaround... - # TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dumps errors | Full dump with gunzip community.mysql.mysql_db: state: dump name: all target: /tmp/full-dump.sql.gz - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: full_dump_gz - # With MySQL 8, new options have been added. For instance, when attempt to dump - # a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' - # in information_schema (1109)". - # Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple - # major relase :( So I add --column-statistics=0 as a workaround... - # TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dumps errors | Distinct dump without compression community.mysql.mysql_db: state: dump name: db2 target: /tmp/dump-db2.sql - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: dump_db2 - # With MySQL 8, new options have been added. For instance, when attempt to dump - # a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' - # in information_schema (1109)". - # Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple - # major relase :( So I add --column-statistics=0 as a workaround... - # TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dumps errors | Distinct dump with gunzip community.mysql.mysql_db: state: dump name: db2 target: /tmp/dump-db2.sql.gz - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: dump_db2_gz - name: Dumps errors | Check distinct dumps are changed @@ -107,60 +67,30 @@ query: - "DROP TABLE db1.t1" - # With MySQL 8, new options have been added. For instance, when attempt to dump - # a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' - # in information_schema (1109)". - # Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple - # major relase :( So I add --column-statistics=0 as a workaround... - # TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dumps errors | Full dump after drop t1 without compression community.mysql.mysql_db: state: dump name: all target: /tmp/full-dump-without-t1.sql pipefail: true # This should do nothing - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: full_dump_without_t1 ignore_errors: true - # With MySQL 8, new options have been added. For instance, when attempt to dump - # a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' - # in information_schema (1109)". - # Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple - # major relase :( So I add --column-statistics=0 as a workaround... - # TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dumps errors | Full dump after drop t1 with gzip without the fix community.mysql.mysql_db: state: dump name: all target: /tmp/full-dump-without-t1.sql.gz - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: full_dump_without_t1_gz_without_fix ignore_errors: true - # With MySQL 8, new options have been added. For instance, when attempt to dump - # a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' - # in information_schema (1109)". - # Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple - # major relase :( So I add --column-statistics=0 as a workaround... - # TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dumps errors | Full dump after drop t1 with gzip with the fix community.mysql.mysql_db: state: dump name: all target: /tmp/full-dump-without-t1.sql.gz pipefail: true - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: full_dump_without_t1_gz_with_fix ignore_errors: true @@ -175,59 +105,29 @@ - full_dump_without_t1_gz_with_fix.msg is search( 'references invalid table') - # With MySQL 8, new options have been added. For instance, when attempt to dump - # a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' - # in information_schema (1109)". - # Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple - # major relase :( So I add --column-statistics=0 as a workaround... - # TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dumps errors | Distinct dump after drop t1 without compression community.mysql.mysql_db: state: dump name: db2 target: /tmp/dump-db2-without_t1.sql pipefail: true # This should do nothing - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: dump_db2_without_t1 ignore_errors: true - # With MySQL 8, new options have been added. For instance, when attempt to dump - # a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' - # in information_schema (1109)". - # Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple - # major relase :( So I add --column-statistics=0 as a workaround... - # TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dumps errors | Distinct dump after drop t1 with gzip without the fix community.mysql.mysql_db: state: dump name: db2 target: /tmp/dump-db2-without_t1.sql.gz - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: dump_db2_without_t1_gz_without_fix ignore_errors: true - # With MySQL 8, new options have been added. For instance, when attempt to dump - # a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' - # in information_schema (1109)". - # Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple - # major relase :( So I add --column-statistics=0 as a workaround... - # TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dumps errors | Distinct dump after drop t1 with gzip with the fix community.mysql.mysql_db: state: dump name: db2 target: /tmp/dump-db2-without_t1.sql.gz pipefail: true - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: dump_db2_without_t1_gz_with_fix ignore_errors: true diff --git a/tests/integration/targets/test_mysql_db/tasks/multi_db_create_delete.yml b/tests/integration/targets/test_mysql_db/tasks/multi_db_create_delete.yml index 51ac81e..0bd7d58 100644 --- a/tests/integration/targets/test_mysql_db/tasks/multi_db_create_delete.yml +++ b/tests/integration/targets/test_mysql_db/tasks/multi_db_create_delete.yml @@ -385,12 +385,6 @@ # ========================================================================== # Dump existing databases -# With MySQL 8, new options have been added. For instance, when attempt to dump -# a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' -# in information_schema (1109)". -# Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple -# major relase :( So I add --column-statistics=0 as a workaround... -# TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dump existing databases mysql_db: login_user: '{{ mysql_user }}' @@ -403,10 +397,6 @@ - '{{ db3_name }}' state: dump target: '{{ dump1_file }}' - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: dump_result - name: Assert successful completion of dump operation (existing database) @@ -448,12 +438,6 @@ name: '{{ dump2_file }}' state: absent -# With MySQL 8, new options have been added. For instance, when attempt to dump -# a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' -# in information_schema (1109)". -# Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple -# major relase :( So I add --column-statistics=0 as a workaround... -# TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dump existing databases mysql_db: login_user: '{{ mysql_user }}' @@ -463,10 +447,6 @@ name: all state: dump target: '{{ dump2_file }}' - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: dump_result - name: assert successful completion of dump operation diff --git a/tests/integration/targets/test_mysql_db/tasks/state_dump_import.yml b/tests/integration/targets/test_mysql_db/tasks/state_dump_import.yml index 376a5e7..b4f9cda 100644 --- a/tests/integration/targets/test_mysql_db/tasks/state_dump_import.yml +++ b/tests/integration/targets/test_mysql_db/tasks/state_dump_import.yml @@ -89,12 +89,6 @@ name: '{{ dump_file2 }}' state: absent -# With MySQL 8, new options have been added. For instance, when attempt to dump -# a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' -# in information_schema (1109)". -# Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple -# major relase :( So I add --column-statistics=0 as a workaround... -# TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dump and Import | State dump without department table. mysql_db: login_user: '{{ db_user }}' @@ -106,15 +100,12 @@ state: dump target: '{{ db_file_name }}' ignore_tables: - - "{{ db_name }}.department" + - "{{ db_name }}.department" force: yes master_data: 1 skip_lock_tables: yes dump_extra_args: >- --skip-triggers - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} config_file: '{{ config_file }}' restrict_config_file: yes check_implicit_admin: no @@ -131,12 +122,6 @@ name: '{{ db_file_name }}' state: file -# With MySQL 8, new options have been added. For instance, when attempt to dump -# a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' -# in information_schema (1109)". -# Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple -# major relase :( So I add --column-statistics=0 as a workaround... -# TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dump and Import | State dump with multiple databases in comma separated form for MySQL. mysql_db: login_user: '{{ mysql_user }}' @@ -147,10 +132,6 @@ state: dump target: '{{ dump_file1 }}' check_implicit_admin: yes - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: dump_result1 - name: Dump and Import | Assert successful completion of dump operation (with multiple databases in comma separated form) @@ -164,12 +145,6 @@ name: '{{ dump_file1 }}' state: file -# With MySQL 8, new options have been added. For instance, when attempt to dump -# a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' -# in information_schema (1109)". -# Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple -# major relase :( So I add --column-statistics=0 as a workaround... -# TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dump and Import | State dump with multiple databases in list form via check_mode mysql_db: login_user: '{{ mysql_user }}' @@ -181,10 +156,6 @@ - '{{ db_name2 }}' state: dump target: '{{ dump_file2 }}' - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: dump_result check_mode: yes @@ -203,12 +174,6 @@ that: - stat_result.stat.exists is defined and not stat_result.stat.exists -# With MySQL 8, new options have been added. For instance, when attempt to dump -# a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' -# in information_schema (1109)". -# Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple -# major relase :( So I add --column-statistics=0 as a workaround... -# TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dump and Import | State dump with multiple databases in list form. mysql_db: login_user: '{{ mysql_user }}' @@ -220,10 +185,6 @@ - '{{ db_name2 }}' state: dump target: '{{ dump_file2 }}' - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: dump_result2 - name: Dump and Import | Assert successful completion of dump operation (with multiple databases in list form) @@ -363,12 +324,6 @@ that: - "'{{ db_name2 }}' in mysql_result.stdout" -# With MySQL 8, new options have been added. For instance, when attempt to dump -# a MySQL 5.7 instance, mysqldump will throw "Unknown table 'COLUMN_STATISTICS' -# in information_schema (1109)". -# Unfortunatly, the mysql-client-5.7 is unavailable on Ubuntu for multiple -# major relase :( So I add --column-statistics=0 as a workaround... -# TODO : Remove this option in octobre 2023 when MySQL 5.7 will be End of Life. - name: Dump and Import | Test state=dump to backup the database of type {{ format_type }} (expect changed=true) mysql_db: login_user: '{{ mysql_user }}' @@ -378,10 +333,6 @@ name: '{{ db_name }}' state: dump target: '{{ db_file_name }}' - dump_extra_args: >- - {% if db_engine == 'mysql' %} - --column-statistics=0 - {% endif %} register: result - name: Dump and Import | Assert output message backup the database diff --git a/tests/integration/targets/test_mysql_replication/tasks/mysql_replication_initial.yml b/tests/integration/targets/test_mysql_replication/tasks/mysql_replication_initial.yml index 80a2939..1dd4c88 100644 --- a/tests/integration/targets/test_mysql_replication/tasks/mysql_replication_initial.yml +++ b/tests/integration/targets/test_mysql_replication/tasks/mysql_replication_initial.yml @@ -63,7 +63,6 @@ --ignore-table=mysql.innodb_index_stats --ignore-table=mysql.innodb_table_stats --master-data=2 - {% if db_engine == 'mysql' %}--column-statistics=0{% endif %} > {{ dump_path }} - name: Restore the dump to replica1