Commit 92860711 authored by Nils Adermann's avatar Nils Adermann

MySQL getListTableForeignKeysSQL: use current database if null passed

parent 9e795469
......@@ -191,6 +191,8 @@ class MySqlPlatform extends AbstractPlatform
if ($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";
......
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