View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
1793 | RackTables | default | public | 2017-10-03 09:59 | 2017-10-09 18:41 |
Reporter | Jolrael | Assigned To | infrastation | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Percona XtraDB Cluster | ||||
Product Version | 0.20.14 | ||||
Target Version | 0.21.1 | Fixed in Version | 0.21.1 | ||
Summary | 1793: Tables without primary/unique keys give issue on Percona XtraDB Cluster | ||||
Description | We run a database cluster of Percona XtraDB Cluster with Galera (version 5.7.17-29.20-3.xenial). When trying to load a database dump of Racktables from another server, we get an error: ERROR 1105 (HY000) at line 43: Percona-XtraDB-Cluster prohibits use of DML command on a table (racktables_db.Atom) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER This has to do with tables without a primary key, which is not very well supported in a clustered environment. In order to be able to use this type of clustered database, the desired solution would be to add at least one unique (primary) key to the tables that current don't have one. As far as I can tell, the following tables don't seem to have any unique key at this moment: Atom Location ObjectHistory Rack RackObject Row I guess simply adding an (tableName_)id column with autoincrement to these tables would probably fix this. | ||||
Steps To Reproduce | - Setup a Percona XtraDB Galera cluster - Load a database dump of racktables with at least some data in for instance the 'Atom' table | ||||
Tags | No tags attached. | ||||
Thank you for reporting this. Location, Rack, RackObject and Row are views, they are based on the Object table, which already has a primary key. I am not sure why this makes a problem in Percona. The Atom table in fact could benefit from a multiple-column primary key without an additional column, I will consider this change for the next release. For the ObjectHistory table I can add a new column to serve as a primary key as you suggest. | |
Ah good point; I just ran a query to find out which table didn't have any unique keys, but I didn't filter out the views :-P | |
RackTables 0.21.1 will have unique keys in the Atom and ObjectHistory tables, if you encounter another issue specific to Percona please open a new issue. Thanks for the report. | |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-10-03 09:59 | Jolrael | New Issue | |
2017-10-03 16:08 | infrastation | Note Added: 0003725 | |
2017-10-03 16:38 | Jolrael | Note Added: 0003727 | |
2017-10-03 16:55 | infrastation | Status | new => acknowledged |
2017-10-03 16:55 | infrastation | Target Version | => 0.21.1 |
2017-10-09 18:41 | infrastation | Assigned To | => infrastation |
2017-10-09 18:41 | infrastation | Status | acknowledged => closed |
2017-10-09 18:41 | infrastation | Resolution | open => fixed |
2017-10-09 18:41 | infrastation | Fixed in Version | => 0.21.1 |
2017-10-09 18:41 | infrastation | Note Added: 0003739 |