Drupal installer will fail when using Percona XtraDB Cluster if pxc_strict_mode is set to enforced.
If pxc_strict_mode is set to enforced (which is the default and wanted value in most case), Percona XtraDB Cluster will deny a request if an operation is performed on a table without an explicit primary key. See https://www.percona.com/doc/percona-xtradb-cluster/5.7/features/pxc-stri...
The Drupal install test table created by the install process is created without a primary key. In this case, the installer fails because Percona XtraDB Cluster deny the request.
Comments
Comment #2
Surian commentedIn attachment, a little patch to fix this issue.
Comment #4
WamFlying commentedApply the primary key principle, everywhere the drupal_install_test table is used.
Comment #5
tstoecklerPlease don't RTBC your own patch.
Also sending for a test on all supported DB drivers.
Comment #6
bpresles commentedThe provided patch is not working, as it keeps the id as NULLable, which is not allowed by Percona. This raises the following error: "ERROR 1171 (42000): All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead"
Therefore the SQL CREATE TABLE query must create the id column as NOT NULL.
Find attached an updated patch that fixes this issue.
Comment #8
andreperazzi commentedDrupal installation was failing for me when trying to set it up with Compose.io Mysql - it has replication on by default
This patch fixed the issue, thanks for sharing and looking forward to getting this merged
Comment #10
andyrigby commentedThe patch in #6 resolves the issue for us too. Thanks!
Comment #11
alexpottUnfortunately the patch doesn't apply to 8.6.x. The fix looks solid and makes sense. +1 for the direction.
Comment #12
bpresles commentedHere is a patch for Drupal 8.6.
Comment #13
bpresles commentedComment #14
bpresles commentedSorry I forgot to update the assertRaw() message in the InstallerTranslationTest's setUpSettings() message
Comment #17
matiasmirandaThe same occurs if you are using MySQL with group replication:
https://dev.mysql.com/doc/refman/8.0/en/group-replication-requirements.html
Comment #18
amateescu commentedThe patch looks great to me.
Comment #19
alexpottCommitted and pushed b6779d931c to 8.7.x and e721b52c8c to 8.6.x. Thanks!
Backported as this is a non-disruptive bug fix.