summaryrefslogtreecommitdiff
path: root/framework/Data/Common/Mysql
diff options
context:
space:
mode:
authorchristophe.boulain <>2011-01-19 14:56:01 +0000
committerchristophe.boulain <>2011-01-19 14:56:01 +0000
commit95b032891d6617525636cc7b680117dbb14afba7 (patch)
tree0b9a8adf92176592894cb4f3d981c8a2e0c4f5ec /framework/Data/Common/Mysql
parentf01b9699967b8959ce8721c1e0e3d6edeb309c52 (diff)
Merge last changes on "Data" from trunk
Diffstat (limited to 'framework/Data/Common/Mysql')
-rw-r--r--framework/Data/Common/Mysql/TMysqlMetaData.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/Data/Common/Mysql/TMysqlMetaData.php b/framework/Data/Common/Mysql/TMysqlMetaData.php
index fad33cea..0e17f52c 100644
--- a/framework/Data/Common/Mysql/TMysqlMetaData.php
+++ b/framework/Data/Common/Mysql/TMysqlMetaData.php
@@ -263,7 +263,7 @@ class TMysqlMetaData extends TDbMetaData
*/
protected function getForeignConstraints($schemaName, $tableName)
{
- $andSchema = $schemaName !== null ? 'AND TABLE_SCHEMA = :schema' : '';
+ $andSchema = $schemaName !== null ? 'AND TABLE_SCHEMA LIKE :schema' : '';
$sql = <<<EOD
SELECT
CONSTRAINT_NAME as con,
@@ -275,7 +275,7 @@ class TMysqlMetaData extends TDbMetaData
`INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE`
WHERE
REFERENCED_TABLE_NAME IS NOT NULL
- AND TABLE_NAME = :table
+ AND TABLE_NAME LIKE :table
$andSchema
EOD;
$command = $this->getDbConnection()->createCommand($sql);