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 --- HISTORY | 1 + framework/Data/Common/Mysql/TMysqlMetaData.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index 7c515716..2312a853 100644 --- a/HISTORY +++ b/HISTORY @@ -19,6 +19,7 @@ BUG: Ticket#904 - TDbConnection: Add emulate prepares workaround for boolean com BUG: Ticket#908 - TDbCache::init / Exception (Knut) ENH: Added Prado.Validation.validateControl(id) on client side to validate a specific control (Michael) ENH: Added MessageSource_Database to I18N (uses TDbConnection) (Michael) +ENH: Workaround for slow meta data retrieval in MySQL<5.1.21 (Michael) ENH: Ticket#823 - PromptText/PromptValue only populated if there is data (Knut) ENH: Ticket#876 - Assign empty string to CssUrl on TTabPanel to avoid loading extra css (GoDZilla, Knut) ENH: Ticket#890 - Minor optimization: Use $var===null over is_null($var) (Knut) 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