From 797fc77c7e768cac2ad1f7caf8f6af104eafeaa8 Mon Sep 17 00:00:00 2001 From: mikl <> Date: Wed, 3 Sep 2008 09:31:33 +0000 Subject: Workaround for slow meta data retrieval in MySQL<5.1.21 --- framework/Data/Common/Mysql/TMysqlMetaData.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'framework/Data/Common') diff --git a/framework/Data/Common/Mysql/TMysqlMetaData.php b/framework/Data/Common/Mysql/TMysqlMetaData.php index aaebd8dc..15728ae9 100644 --- a/framework/Data/Common/Mysql/TMysqlMetaData.php +++ b/framework/Data/Common/Mysql/TMysqlMetaData.php @@ -246,7 +246,9 @@ class TMysqlMetaData extends TDbMetaData if($row['Key_name']==='PRIMARY') $primary[] = $row['Column_name']; } - if($this->getServerVersion() > 5) + // MySQL version was increased to >=5.1.21 instead of 5.x + // due to a MySQL bug (http://bugs.mysql.com/bug.php?id=19588) + if($this->getServerVersion() >= 5.121) $foreign = $this->getForeignConstraints($schemaName,$tableName); else $foreign = $this->findForeignConstraints($schemaName,$tableName); -- cgit v1.2.3