Skip to content

Commit e4101c1

Browse files
author
Paulo Jesus
committed
BUG#25966731 : ALLOW-NON-COMPATIBLE-TABLES OPTION DOES NOT EXIST
When adding nodes to a InnoDB Cluster using the appropriate AdminAPI operations, some checks are performed to verify the compatibility of the existing tables. If incompatible tables (e.g., MyISAM tables) are detected then an error is issued, however a message is logged referring an option not available for the AdminAPI operations: --allow-non-compatible-tables. This option is from mysqlprovision (internal tool) and should not be displayed to users. This patch fix this issue by removing the logged message including the option from mysqlprovision. New unit tests were added for regression.
1 parent 6c12ff2 commit e4101c1

File tree

5 files changed

+60
-1
lines changed

5 files changed

+60
-1
lines changed

python/mysql_gadgets/common/group_replication.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,6 @@ def check_compliance(req_checker, error_msgs=None):
10041004
if bad_engine or bad_pk:
10051005
error_msgs.append("Non-compatible tables found in database.")
10061006
_LOGGER.info(INNODB_RQD_MSG)
1007-
_LOGGER.info(SKIP_SCHEMA_MSG)
10081007
_LOGGER.info("")
10091008

10101009

unittest/scripts/js_devapi/scripts/dba_cluster_misconfigurations.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ session.runSql('SET sql_log_bin=1');
4242
// Regression for BUG#25974689 : CHECKS ARE MORE STRICT THAN GROUP REPLICATION
4343
var cluster = dba.createCluster('dev');
4444

45+
//@ Enable verbose
46+
// Regression for BUG#25966731 : ALLOW-NON-COMPATIBLE-TABLES OPTION DOES NOT EXIST
47+
dba.verbose = 1;
48+
49+
//@<ERR> Create cluster fails (one table is not compatible) - verbose mode
50+
// Regression for BUG#25966731 : ALLOW-NON-COMPATIBLE-TABLES OPTION DOES NOT EXIST
51+
var cluster = dba.createCluster('dev');
52+
53+
//@ Disable verbose
54+
// Regression for BUG#25966731 : ALLOW-NON-COMPATIBLE-TABLES OPTION DOES NOT EXIST
55+
dba.verbose = 0;
56+
4557
// Clean-up test schema with PK, PKE, and UK
4658
// Regression for BUG#25974689 : CHECKS ARE MORE STRICT THAN GROUP REPLICATION
4759
session.runSql('SET sql_log_bin=0');

unittest/scripts/js_devapi/validation/dba_cluster_misconfigurations.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,24 @@
1010
//@ Create cluster fails (one table is not compatible)
1111
||Dba.createCluster: ERROR: 1 table(s) do not have a Primary Key or Primary Key Equivalent (non-null unique key).
1212

13+
//@ Enable verbose
14+
||
15+
16+
//@<ERR> Create cluster fails (one table is not compatible) - verbose mode
17+
* Checking compliance of existing tables... FAIL
18+
ERROR: 1 table(s) do not have a Primary Key or Primary Key Equivalent (non-null unique key).
19+
pke_test.t3
20+
21+
Group Replication requires tables to use InnoDB and have a PRIMARY KEY or PRIMARY KEY Equivalent (non-null unique key). Tables that do not follow these requirements will be readable but not updateable when used with Group Replication. If your applications make updates (INSERT, UPDATE or DELETE) to these tables, ensure they use the InnoDB storage engine and have a PRIMARY KEY or PRIMARY KEY Equivalent.
22+
23+
24+
ERROR: Error starting cluster: The operation could not continue due to the following requirements not being met:
25+
Non-compatible tables found in database.
26+
==============================================================================
27+
28+
//@ Disable verbose
29+
||
30+
1331
//@ Create cluster succeeds (no incompatible table)
1432
||
1533

unittest/scripts/py_devapi/scripts/dba_cluster_misconfigurations.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@
4242
# Regression for BUG#25974689 : CHECKS ARE MORE STRICT THAN GROUP REPLICATION
4343
cluster = dba.create_cluster('dev')
4444

45+
#@ Enable verbose
46+
# Regression for BUG#25966731 : ALLOW-NON-COMPATIBLE-TABLES OPTION DOES NOT EXIST
47+
dba.verbose = 1
48+
49+
#@<ERR> Create cluster fails (one table is not compatible) - verbose mode
50+
# Regression for BUG#25966731 : ALLOW-NON-COMPATIBLE-TABLES OPTION DOES NOT EXIST
51+
cluster = dba.create_cluster('dev')
52+
53+
#@ Disable verbose
54+
# Regression for BUG#25966731 : ALLOW-NON-COMPATIBLE-TABLES OPTION DOES NOT EXIST
55+
dba.verbose = 0
56+
4557
# Clean-up test schema with PK, PKE, and UK
4658
# Regression for BUG#25974689 : CHECKS ARE MORE STRICT THAN GROUP REPLICATION
4759
session.run_sql('SET sql_log_bin=0')

unittest/scripts/py_devapi/validation/dba_cluster_misconfigurations.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,24 @@
1010
#@ Create cluster fails (one table is not compatible)
1111
||SystemError: RuntimeError: Dba.create_cluster: ERROR: 1 table(s) do not have a Primary Key or Primary Key Equivalent (non-null unique key).
1212

13+
#@ Enable verbose
14+
||
15+
16+
#@<ERR> Create cluster fails (one table is not compatible) - verbose mode
17+
* Checking compliance of existing tables... FAIL
18+
ERROR: 1 table(s) do not have a Primary Key or Primary Key Equivalent (non-null unique key).
19+
pke_test.t3
20+
21+
Group Replication requires tables to use InnoDB and have a PRIMARY KEY or PRIMARY KEY Equivalent (non-null unique key). Tables that do not follow these requirements will be readable but not updateable when used with Group Replication. If your applications make updates (INSERT, UPDATE or DELETE) to these tables, ensure they use the InnoDB storage engine and have a PRIMARY KEY or PRIMARY KEY Equivalent.
22+
23+
24+
ERROR: Error starting cluster: The operation could not continue due to the following requirements not being met:
25+
Non-compatible tables found in database.
26+
==============================================================================
27+
28+
#@ Disable verbose
29+
||
30+
1331
#@ Create cluster succeeds (no incompatible table)
1432
||
1533

0 commit comments

Comments
 (0)