Commit ce1e5f0f authored by Benjamin Eberlei's avatar Benjamin Eberlei

DBAL-34 - MySQLPlatform::getListTableForeignKeys() bug with MySQL < 5.1.16

parent 8a8ee96f
...@@ -129,10 +129,10 @@ class MySqlPlatform extends AbstractPlatform ...@@ -129,10 +129,10 @@ class MySqlPlatform extends AbstractPlatform
" c.table_name = '$table' */ WHERE k.table_name = '$table'"; " c.table_name = '$table' */ WHERE k.table_name = '$table'";
if ($database) { if ($database) {
$sql .= " AND k.table_schema = '$database' AND c.constraint_schema = '$database'"; $sql .= " AND k.table_schema = '$database' /*!50116 AND c.constraint_schema = '$database' */";
} }
$sql .= " AND `REFERENCED_COLUMN_NAME` is not NULL"; $sql .= " AND k.`REFERENCED_COLUMN_NAME` is not NULL";
return $sql; return $sql;
} }
......
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