@marciofoz opened this Issue on March 28th 2018

Hi!
I'm using Matomo 3.3 with Percona XtraDB Cluster with 3 nodes. When I insert a new site, I see in mysql log this warning: WSREP: Percona-XtraDB-Cluster doesn't recommend use of DML command on a table (piwik3.piwik3_plugin_setting) without an explicit primary key with pxc_strict_mode = PERMISSIVE.

Checking the table structure:
show create table piwik3_site_setting;
piwik3_site_setting | CREATE TABLE piwik3_site_setting (
idsite int(10) unsigned NOT NULL,
plugin_name varchar(60) NOT NULL,
setting_name varchar(255) NOT NULL,
setting_value longtext NOT NULL,
KEY idsite (idsite,plugin_name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |

Second developer: "Percona XtraDB Cluster cannot properly propagate certain write operations to tables that do not have primary keys defined"

I ask if this situation maybe considered an enhacement for futures releases of Matomo, modifying the actual structure of the table and adding the primary key.

Thank you.

@robocoder commented on March 29th 2018 Contributor

See #11596

@marciofoz commented on March 29th 2018

Hi @robocoder
Tks by the reply.
How I can run all tests to check if the database still updated?
I tried:
php /var/www/html/piwik/console core:update
Everything is already up to date.

Or must run only the script #11596 ? (how do it?)

@marciofoz commented on April 4th 2018

Hi @robocoder.
For the purpose of testing, I run manually:

mysql> ALTER TABLE log_profiling ADD COLUMN log_profiling_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT AFTER sum_time_ms, ADD PRIMARY KEY (log_profiling_id);

mysql> ALTER TABLE site_setting ADD COLUMN site_setting_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT AFTER setting_value, ADD PRIMARY KEY (site_setting_id);

mysql> ALTER TABLE plugin_setting ADD COLUMN plugin_setting_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT AFTER user_login, ADD PRIMARY KEY (plugin_setting_id);

BR

This Issue was closed on April 4th 2018
Powered by GitHub Issue Mirror