mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-27 12:51:26 -07:00
Cut column-statistics disabling
Thanks to our test-container, we now use the correspond mysql-client. So to test mysql 5.7 we use mysql-client-5.7 and to test mysql 8 we use mysql-client-8.
This commit is contained in:
parent
fbb0290e19
commit
8f0d1f5b14
5 changed files with 1 additions and 181 deletions
|
@ -36,12 +36,6 @@
|
||||||
command: "{{ mysql_command }} {{ db_latin1_name }} -e \"select * from testlatin1\""
|
command: "{{ mysql_command }} {{ db_latin1_name }} -e \"select * from testlatin1\""
|
||||||
register: output
|
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
|
- name: Encoding | Dumping a table in Latin1 database
|
||||||
mysql_db:
|
mysql_db:
|
||||||
login_user: '{{ mysql_user }}'
|
login_user: '{{ mysql_user }}'
|
||||||
|
@ -52,10 +46,6 @@
|
||||||
encoding: latin1
|
encoding: latin1
|
||||||
target: "{{ latin1_file1 }}"
|
target: "{{ latin1_file1 }}"
|
||||||
state: dump
|
state: dump
|
||||||
dump_extra_args: >-
|
|
||||||
{% if db_engine == 'mysql' %}
|
|
||||||
--column-statistics=0
|
|
||||||
{% endif %}
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
|
|
@ -27,72 +27,32 @@
|
||||||
- "CREATE TABLE db1.t2 (id int)"
|
- "CREATE TABLE db1.t2 (id int)"
|
||||||
- "CREATE VIEW db2.v1 AS SELECT id from db1.t1"
|
- "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
|
- name: Dumps errors | Full dump without compression
|
||||||
community.mysql.mysql_db:
|
community.mysql.mysql_db:
|
||||||
state: dump
|
state: dump
|
||||||
name: all
|
name: all
|
||||||
target: /tmp/full-dump.sql
|
target: /tmp/full-dump.sql
|
||||||
dump_extra_args: >-
|
|
||||||
{% if db_engine == 'mysql' %}
|
|
||||||
--column-statistics=0
|
|
||||||
{% endif %}
|
|
||||||
register: full_dump
|
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
|
- name: Dumps errors | Full dump with gunzip
|
||||||
community.mysql.mysql_db:
|
community.mysql.mysql_db:
|
||||||
state: dump
|
state: dump
|
||||||
name: all
|
name: all
|
||||||
target: /tmp/full-dump.sql.gz
|
target: /tmp/full-dump.sql.gz
|
||||||
dump_extra_args: >-
|
|
||||||
{% if db_engine == 'mysql' %}
|
|
||||||
--column-statistics=0
|
|
||||||
{% endif %}
|
|
||||||
register: full_dump_gz
|
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
|
- name: Dumps errors | Distinct dump without compression
|
||||||
community.mysql.mysql_db:
|
community.mysql.mysql_db:
|
||||||
state: dump
|
state: dump
|
||||||
name: db2
|
name: db2
|
||||||
target: /tmp/dump-db2.sql
|
target: /tmp/dump-db2.sql
|
||||||
dump_extra_args: >-
|
|
||||||
{% if db_engine == 'mysql' %}
|
|
||||||
--column-statistics=0
|
|
||||||
{% endif %}
|
|
||||||
register: dump_db2
|
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
|
- name: Dumps errors | Distinct dump with gunzip
|
||||||
community.mysql.mysql_db:
|
community.mysql.mysql_db:
|
||||||
state: dump
|
state: dump
|
||||||
name: db2
|
name: db2
|
||||||
target: /tmp/dump-db2.sql.gz
|
target: /tmp/dump-db2.sql.gz
|
||||||
dump_extra_args: >-
|
|
||||||
{% if db_engine == 'mysql' %}
|
|
||||||
--column-statistics=0
|
|
||||||
{% endif %}
|
|
||||||
register: dump_db2_gz
|
register: dump_db2_gz
|
||||||
|
|
||||||
- name: Dumps errors | Check distinct dumps are changed
|
- name: Dumps errors | Check distinct dumps are changed
|
||||||
|
@ -107,60 +67,30 @@
|
||||||
query:
|
query:
|
||||||
- "DROP TABLE db1.t1"
|
- "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
|
- name: Dumps errors | Full dump after drop t1 without compression
|
||||||
community.mysql.mysql_db:
|
community.mysql.mysql_db:
|
||||||
state: dump
|
state: dump
|
||||||
name: all
|
name: all
|
||||||
target: /tmp/full-dump-without-t1.sql
|
target: /tmp/full-dump-without-t1.sql
|
||||||
pipefail: true # This should do nothing
|
pipefail: true # This should do nothing
|
||||||
dump_extra_args: >-
|
|
||||||
{% if db_engine == 'mysql' %}
|
|
||||||
--column-statistics=0
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
register: full_dump_without_t1
|
register: full_dump_without_t1
|
||||||
ignore_errors: true
|
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
|
- name: Dumps errors | Full dump after drop t1 with gzip without the fix
|
||||||
community.mysql.mysql_db:
|
community.mysql.mysql_db:
|
||||||
state: dump
|
state: dump
|
||||||
name: all
|
name: all
|
||||||
target: /tmp/full-dump-without-t1.sql.gz
|
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
|
register: full_dump_without_t1_gz_without_fix
|
||||||
ignore_errors: true
|
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
|
- name: Dumps errors | Full dump after drop t1 with gzip with the fix
|
||||||
community.mysql.mysql_db:
|
community.mysql.mysql_db:
|
||||||
state: dump
|
state: dump
|
||||||
name: all
|
name: all
|
||||||
target: /tmp/full-dump-without-t1.sql.gz
|
target: /tmp/full-dump-without-t1.sql.gz
|
||||||
pipefail: true
|
pipefail: true
|
||||||
dump_extra_args: >-
|
|
||||||
{% if db_engine == 'mysql' %}
|
|
||||||
--column-statistics=0
|
|
||||||
{% endif %}
|
|
||||||
register: full_dump_without_t1_gz_with_fix
|
register: full_dump_without_t1_gz_with_fix
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
|
@ -175,59 +105,29 @@
|
||||||
- full_dump_without_t1_gz_with_fix.msg is search(
|
- full_dump_without_t1_gz_with_fix.msg is search(
|
||||||
'references invalid table')
|
'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
|
- name: Dumps errors | Distinct dump after drop t1 without compression
|
||||||
community.mysql.mysql_db:
|
community.mysql.mysql_db:
|
||||||
state: dump
|
state: dump
|
||||||
name: db2
|
name: db2
|
||||||
target: /tmp/dump-db2-without_t1.sql
|
target: /tmp/dump-db2-without_t1.sql
|
||||||
pipefail: true # This should do nothing
|
pipefail: true # This should do nothing
|
||||||
dump_extra_args: >-
|
|
||||||
{% if db_engine == 'mysql' %}
|
|
||||||
--column-statistics=0
|
|
||||||
{% endif %}
|
|
||||||
register: dump_db2_without_t1
|
register: dump_db2_without_t1
|
||||||
ignore_errors: true
|
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
|
- name: Dumps errors | Distinct dump after drop t1 with gzip without the fix
|
||||||
community.mysql.mysql_db:
|
community.mysql.mysql_db:
|
||||||
state: dump
|
state: dump
|
||||||
name: db2
|
name: db2
|
||||||
target: /tmp/dump-db2-without_t1.sql.gz
|
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
|
register: dump_db2_without_t1_gz_without_fix
|
||||||
ignore_errors: true
|
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
|
- name: Dumps errors | Distinct dump after drop t1 with gzip with the fix
|
||||||
community.mysql.mysql_db:
|
community.mysql.mysql_db:
|
||||||
state: dump
|
state: dump
|
||||||
name: db2
|
name: db2
|
||||||
target: /tmp/dump-db2-without_t1.sql.gz
|
target: /tmp/dump-db2-without_t1.sql.gz
|
||||||
pipefail: true
|
pipefail: true
|
||||||
dump_extra_args: >-
|
|
||||||
{% if db_engine == 'mysql' %}
|
|
||||||
--column-statistics=0
|
|
||||||
{% endif %}
|
|
||||||
register: dump_db2_without_t1_gz_with_fix
|
register: dump_db2_without_t1_gz_with_fix
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
|
|
|
@ -385,12 +385,6 @@
|
||||||
# ==========================================================================
|
# ==========================================================================
|
||||||
# Dump existing databases
|
# 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
|
- name: Dump existing databases
|
||||||
mysql_db:
|
mysql_db:
|
||||||
login_user: '{{ mysql_user }}'
|
login_user: '{{ mysql_user }}'
|
||||||
|
@ -403,10 +397,6 @@
|
||||||
- '{{ db3_name }}'
|
- '{{ db3_name }}'
|
||||||
state: dump
|
state: dump
|
||||||
target: '{{ dump1_file }}'
|
target: '{{ dump1_file }}'
|
||||||
dump_extra_args: >-
|
|
||||||
{% if db_engine == 'mysql' %}
|
|
||||||
--column-statistics=0
|
|
||||||
{% endif %}
|
|
||||||
register: dump_result
|
register: dump_result
|
||||||
|
|
||||||
- name: Assert successful completion of dump operation (existing database)
|
- name: Assert successful completion of dump operation (existing database)
|
||||||
|
@ -448,12 +438,6 @@
|
||||||
name: '{{ dump2_file }}'
|
name: '{{ dump2_file }}'
|
||||||
state: absent
|
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
|
- name: Dump existing databases
|
||||||
mysql_db:
|
mysql_db:
|
||||||
login_user: '{{ mysql_user }}'
|
login_user: '{{ mysql_user }}'
|
||||||
|
@ -463,10 +447,6 @@
|
||||||
name: all
|
name: all
|
||||||
state: dump
|
state: dump
|
||||||
target: '{{ dump2_file }}'
|
target: '{{ dump2_file }}'
|
||||||
dump_extra_args: >-
|
|
||||||
{% if db_engine == 'mysql' %}
|
|
||||||
--column-statistics=0
|
|
||||||
{% endif %}
|
|
||||||
register: dump_result
|
register: dump_result
|
||||||
|
|
||||||
- name: assert successful completion of dump operation
|
- name: assert successful completion of dump operation
|
||||||
|
|
|
@ -89,12 +89,6 @@
|
||||||
name: '{{ dump_file2 }}'
|
name: '{{ dump_file2 }}'
|
||||||
state: absent
|
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.
|
- name: Dump and Import | State dump without department table.
|
||||||
mysql_db:
|
mysql_db:
|
||||||
login_user: '{{ db_user }}'
|
login_user: '{{ db_user }}'
|
||||||
|
@ -112,9 +106,6 @@
|
||||||
skip_lock_tables: yes
|
skip_lock_tables: yes
|
||||||
dump_extra_args: >-
|
dump_extra_args: >-
|
||||||
--skip-triggers
|
--skip-triggers
|
||||||
{% if db_engine == 'mysql' %}
|
|
||||||
--column-statistics=0
|
|
||||||
{% endif %}
|
|
||||||
config_file: '{{ config_file }}'
|
config_file: '{{ config_file }}'
|
||||||
restrict_config_file: yes
|
restrict_config_file: yes
|
||||||
check_implicit_admin: no
|
check_implicit_admin: no
|
||||||
|
@ -131,12 +122,6 @@
|
||||||
name: '{{ db_file_name }}'
|
name: '{{ db_file_name }}'
|
||||||
state: file
|
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.
|
- name: Dump and Import | State dump with multiple databases in comma separated form for MySQL.
|
||||||
mysql_db:
|
mysql_db:
|
||||||
login_user: '{{ mysql_user }}'
|
login_user: '{{ mysql_user }}'
|
||||||
|
@ -147,10 +132,6 @@
|
||||||
state: dump
|
state: dump
|
||||||
target: '{{ dump_file1 }}'
|
target: '{{ dump_file1 }}'
|
||||||
check_implicit_admin: yes
|
check_implicit_admin: yes
|
||||||
dump_extra_args: >-
|
|
||||||
{% if db_engine == 'mysql' %}
|
|
||||||
--column-statistics=0
|
|
||||||
{% endif %}
|
|
||||||
register: dump_result1
|
register: dump_result1
|
||||||
|
|
||||||
- name: Dump and Import | Assert successful completion of dump operation (with multiple databases in comma separated form)
|
- name: Dump and Import | Assert successful completion of dump operation (with multiple databases in comma separated form)
|
||||||
|
@ -164,12 +145,6 @@
|
||||||
name: '{{ dump_file1 }}'
|
name: '{{ dump_file1 }}'
|
||||||
state: file
|
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
|
- name: Dump and Import | State dump with multiple databases in list form via check_mode
|
||||||
mysql_db:
|
mysql_db:
|
||||||
login_user: '{{ mysql_user }}'
|
login_user: '{{ mysql_user }}'
|
||||||
|
@ -181,10 +156,6 @@
|
||||||
- '{{ db_name2 }}'
|
- '{{ db_name2 }}'
|
||||||
state: dump
|
state: dump
|
||||||
target: '{{ dump_file2 }}'
|
target: '{{ dump_file2 }}'
|
||||||
dump_extra_args: >-
|
|
||||||
{% if db_engine == 'mysql' %}
|
|
||||||
--column-statistics=0
|
|
||||||
{% endif %}
|
|
||||||
register: dump_result
|
register: dump_result
|
||||||
check_mode: yes
|
check_mode: yes
|
||||||
|
|
||||||
|
@ -203,12 +174,6 @@
|
||||||
that:
|
that:
|
||||||
- stat_result.stat.exists is defined and not stat_result.stat.exists
|
- 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.
|
- name: Dump and Import | State dump with multiple databases in list form.
|
||||||
mysql_db:
|
mysql_db:
|
||||||
login_user: '{{ mysql_user }}'
|
login_user: '{{ mysql_user }}'
|
||||||
|
@ -220,10 +185,6 @@
|
||||||
- '{{ db_name2 }}'
|
- '{{ db_name2 }}'
|
||||||
state: dump
|
state: dump
|
||||||
target: '{{ dump_file2 }}'
|
target: '{{ dump_file2 }}'
|
||||||
dump_extra_args: >-
|
|
||||||
{% if db_engine == 'mysql' %}
|
|
||||||
--column-statistics=0
|
|
||||||
{% endif %}
|
|
||||||
register: dump_result2
|
register: dump_result2
|
||||||
|
|
||||||
- name: Dump and Import | Assert successful completion of dump operation (with multiple databases in list form)
|
- name: Dump and Import | Assert successful completion of dump operation (with multiple databases in list form)
|
||||||
|
@ -363,12 +324,6 @@
|
||||||
that:
|
that:
|
||||||
- "'{{ db_name2 }}' in mysql_result.stdout"
|
- "'{{ 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)
|
- name: Dump and Import | Test state=dump to backup the database of type {{ format_type }} (expect changed=true)
|
||||||
mysql_db:
|
mysql_db:
|
||||||
login_user: '{{ mysql_user }}'
|
login_user: '{{ mysql_user }}'
|
||||||
|
@ -378,10 +333,6 @@
|
||||||
name: '{{ db_name }}'
|
name: '{{ db_name }}'
|
||||||
state: dump
|
state: dump
|
||||||
target: '{{ db_file_name }}'
|
target: '{{ db_file_name }}'
|
||||||
dump_extra_args: >-
|
|
||||||
{% if db_engine == 'mysql' %}
|
|
||||||
--column-statistics=0
|
|
||||||
{% endif %}
|
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: Dump and Import | Assert output message backup the database
|
- name: Dump and Import | Assert output message backup the database
|
||||||
|
|
|
@ -63,7 +63,6 @@
|
||||||
--ignore-table=mysql.innodb_index_stats
|
--ignore-table=mysql.innodb_index_stats
|
||||||
--ignore-table=mysql.innodb_table_stats
|
--ignore-table=mysql.innodb_table_stats
|
||||||
--master-data=2
|
--master-data=2
|
||||||
{% if db_engine == 'mysql' %}--column-statistics=0{% endif %}
|
|
||||||
> {{ dump_path }}
|
> {{ dump_path }}
|
||||||
|
|
||||||
- name: Restore the dump to replica1
|
- name: Restore the dump to replica1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue