summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormikl <>2008-09-03 09:31:33 +0000
committermikl <>2008-09-03 09:31:33 +0000
commit797fc77c7e768cac2ad1f7caf8f6af104eafeaa8 (patch)
tree9f8a1eee5321045dae3f2269ee6398daf8b3a187
parent704d4a34fde6dad47bcdf37a2d03d42e17b32e03 (diff)
Workaround for slow meta data retrieval in MySQL<5.1.21
-rw-r--r--HISTORY1
-rw-r--r--framework/Data/Common/Mysql/TMysqlMetaData.php4
2 files changed, 4 insertions, 1 deletions
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);