Commit 43bb31ee authored by Nils Adermann's avatar Nils Adermann Committed by Steve Müller

MySQL getListTableForeignKeysSQL: use current database if null passed

parent 3af9d3f6
...@@ -185,6 +185,8 @@ class MySqlPlatform extends AbstractPlatform ...@@ -185,6 +185,8 @@ class MySqlPlatform extends AbstractPlatform
if ($database) { if ($database) {
$sql .= " AND k.table_schema = '$database' /*!50116 AND c.constraint_schema = '$database' */"; $sql .= " AND k.table_schema = '$database' /*!50116 AND c.constraint_schema = '$database' */";
} else {
$sql .= " AND k.table_schema = DATABASE() /*!50116 AND c.constraint_schema = DATABASE() */";
} }
$sql .= " AND k.`REFERENCED_COLUMN_NAME` is not NULL"; $sql .= " AND k.`REFERENCED_COLUMN_NAME` is not NULL";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment