summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-11-12 16:12:40 +0000
committerctrlaltca@gmail.com <>2011-11-12 16:12:40 +0000
commit32e370d09e9c3353847df679ef2ea22426dce33f (patch)
tree0de8366728e408e8133121c8f1ccb4aa8433b0d6
parent9dec2d59712639c2809975d982c56d1385fdc706 (diff)
fix for #284
-rw-r--r--framework/Data/Common/Mysql/TMysqlMetaData.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/framework/Data/Common/Mysql/TMysqlMetaData.php b/framework/Data/Common/Mysql/TMysqlMetaData.php
index 5eba540d..1d8c86a2 100644
--- a/framework/Data/Common/Mysql/TMysqlMetaData.php
+++ b/framework/Data/Common/Mysql/TMysqlMetaData.php
@@ -293,7 +293,7 @@ class TMysqlMetaData extends TDbMetaData
*/
protected function getForeignConstraints($schemaName, $tableName)
{
- $andSchema = $schemaName !== null ? 'AND TABLE_SCHEMA LIKE :schema' : '';
+ $andSchema = $schemaName !== null ? 'AND TABLE_SCHEMA LIKE :schema' : 'AND TABLE_SCHEMA LIKE DATABASE()';
$sql = <<<EOD
SELECT
CONSTRAINT_NAME as con,