Added exceptions:
.+/prosody/status_checks - this was probably a table manually
created in sipwise system and not existing anywhere else.
.+/billing/test - this was probably a table manually created in
sipwise system and not existing anywhere else.
.+/ngcp/pt_checksums_sp.* - these were tables created by percona
tools created in sipwise and demo system and not existing anywhere
else.
Change-Id: Ie7461754e2e3baea770be5e60e2f1f658f13cfdb
The exception '.+/accounting/cdr_[0-9]{6}/.+' ignores all elements of a
table (columns, indexes, etc) but not the table itself. It cases error:
=======================
Element: tables/accounting/cdr_202205 is missing in json file
=======================
So fix the regex.
Change-Id: Ie5c23a89e85281b0d2a436cea3b888cad5974c11
Print known exceptions only if --debug option is used. No need to flood
output with useless messages.
Change-Id: I4460a370d44dc0f95beb654efc493270f11103d3
Release trunk/mr11.4 was switched to Debian/bookworm where Mariadb 10.11
is used and json/sql files were rebuilt so remove these exceptions.
Change-Id: I9a00e2394eec82a2c2b3ce518df3fa8f731c6e4f
In mariadb 10.6 utf8 was renamed to to utf8mb3:
https://jira.mariadb.org/browse/MDEV-8334
Now json files are built on mariadb 10.5 while on bookworm mariadb 10.11
is used. So until trunk is switched to bookworm we have to skip this
part.
Change-Id: I9a6c61a2250a61676df3dac7ed509442f39dd183
In mariadb 10.6 utf8 was renamed to to utf8mb3:
https://jira.mariadb.org/browse/MDEV-8334
Now json files are built on mariadb 10.5 while on bookworm mariadb 10.11
is used. So until trunk is switched to bookworm we have to skip this
part.
Change-Id: Ia28b9560f516af569c9e76c318d08765af42740f
The reason is partitioning mechanism so the tables are created without
partitioning but then partitions are created by ngcp-cleanup-acc tool
as well as history tables like <table_name>_<date>
So ignore create_options for the list of tables and <table_name>_<date>.
The list of tables are from templates.git:ngcp-cleanup-tools/acc-cleanup.conf
Change-Id: I3a720d7b5b34498abe6805278795825cb1c708c7
Now we have json file with schema description which is etalon one.
Remove comparing schemes between two instances.
Change-Id: I046cc30eed926b06a578c0572132b7e8ae42eb21
Previously we compared only schemes between sp1 and sp2 and didn't check
prx 3308 instances while it's quite important part.
So:
1. Adopt compare_dbs.pl script.
1.1 Add host and port as the connection parameters.
1.2 Do not specify connection of remote instance but get the list of
replicas and compare local schemes with remote ones.
1.3 Remove --schemes parameter and get the list of schemes from
replication filter.
1.4 Use replication filters for exceptions.
1.4.1 Change 'constraints' query so it matches
constraints/<schema_name>/<table_name> pattern.
1.5 Use names like <ngcp-hostname>:<port> instead of Schema[12].
2. Adopt ngcp-mysql-compare-dbs.
2.1 Get list of local mysql instances.
2.2 Remove usage of DB_BACKUP_LIST because compare_dbs.pl gets the list
of schemes.
Change-Id: I90eb0209d3b2a51cf4f9223c817b484d149db135
In the output it was look like:
columns/provisioning/voip_subscribers_pbx_hunt_policy/column_type
So it's hard to understand where is table name (voip_subscribers)
and where is column name (pbx_hunt_policy).
Use '/' so it will look readable.
Change-Id: I2e7ba54ab6a12b3cfc763964ac79feb7a057d63a
Before the logic was - compare 2 structures and if they are different
analyze every element and exception list.
But there is no sense to do this 1st comparison as they are always
different that's why we have exception list. So remove this module.
Also add perl:Depends to dependencies.
Change-Id: Ia7e1628108d823601a9cd6e6ce14310b9afba795
If formatter=tap is used - exit with 0 code so jenkins can parse tap
report.
If this option is not set - exit 0 if schemes are equal but exit 1 if
they are not.
Change-Id: Ie1f034205acde538187e016e51ebad1caf555d91
Currently we have diff in all tables of 'mysql' schema:
========================
Schema1: transactional=1
Schema2: page_checksum=1 transactional=1
========================
This is harmless diff investigated in TT#108653
So to skip all the specific entities instead of comparing every element
just use regex matching.
Change-Id: I3b9a38c3fbf055724139cbf4b476117b90edbefe
The prevalent convention in the project is to use «-» instead of «_» to
split words in options. Switch the options to that, and keep backwards
compatibility option alias that emits a deprecation warning while people
transition to the new names. The alias will be removed on the next LTS.
Clarify --help output.
Change-Id: Ic25ba7a152ce11c3be5106dc58d481add7ca02a8
Since Debian/bullseye there is diff:
===================================
17:11:02 not ok 1 Schema mysql, tables elements: global_priv.CREATE_OPTIONS are not equal:
17:11:02 ---
17:11:02 Schema1: transactional=1
17:11:02 Schema2: page_checksum=1 transactional=1
===================================
It's a harmless diff.
It seems mysqldump adds page_checksum for each non innodb tables by
default.
So add tables/mysql/global_priv/create_options exception.
Reformat output so it has the same format as exception so it's easier to
add the future exceptions.
Change-Id: I707b62b67016e2d67169de1c16e9e85e4f67671d
This reverts commit 930b1c89fc.
Extra things commited that shouldn't have been (experimental local tests).
Change-Id: I43857d0e0f15f7d03d644491e0664dc5824984d3
Sometimes there is divergence in schemes which are inevitable or
harmless.
So add exceptions' list which is easy to maintain. The format is the
following:
=================================
<element-type>/<schema-name>/<element-name>/<element-attribute>
Where:
element-type - tables, columns, views, etc
schema-name - name of the schema
element-name - name of the element (table, index, etc)
=================================
F.e.:
views/ldap/ldap_entries/view_definition
For columns columns/<schema-name>/<table-name>_<column-name>
columns/billing/table1_column1/is_nullable
Add 1st exception from TT#74728. The reason of this diff is that view
was created without schema name on sp1 but the replication statement was
written with schema name.
Change-Id: I29dd109cefb560fe89d92a430cd6522e4513f7d5
Use compare_dbs as a wrapper to check all the used schemes.
Add different formats of output to compare_dbs.pl - tap and human
readable one.
Process all the schemes in one run of compare_dbs.pl and do it in one db
connection.
If the tap formatter is used - output the result of all schemes in a
single file.
Change-Id: I2696680aa30b56658f130bd1cea116099c086753
The system test package is installed on a system so it's easier to
manage code and run the test as it's branched and no need to copy
scripts to system host.
Change-Id: I9ad3ff7fb16dd843d81a4c9ecfbbe1c0d42fe1c6