From 2c7b126f144ea55c6e8a9484397d8e67eba170ee Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 31 Oct 2019 16:39:04 +0100 Subject: install.php: Workaround for MariaDB on Debian 10 --- install.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install.php b/install.php index 38cc3a1e..e566b5a4 100644 --- a/install.php +++ b/install.php @@ -137,7 +137,10 @@ function tableGetConstraints($table, $column, $refTable, $refColumn) } return Database::queryFirst('SELECT b.CONSTRAINT_NAME, b.UPDATE_RULE, b.DELETE_RULE FROM information_schema.KEY_COLUMN_USAGE a - INNER JOIN information_schema.REFERENTIAL_CONSTRAINTS b USING (CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME) + INNER JOIN information_schema.REFERENTIAL_CONSTRAINTS b ON ( + a.CONSTRAINT_CATALOG = b.CONSTRAINT_CATALOG + AND a.CONSTRAINT_SCHEMA = b.CONSTRAINT_SCHEMA + AND a.CONSTRAINT_NAME = b.CONSTRAINT_NAME) WHERE a.TABLE_SCHEMA = :db AND a.TABLE_NAME = :table AND a.COLUMN_NAME = :column AND a.REFERENCED_TABLE_NAME = :refTable AND a.REFERENCED_COLUMN_NAME = :refColumn', compact('db', 'table', 'column', 'refTable', 'refColumn')); -- cgit v1.2.3-55-g7522