From 94e94e0a8566f23d16658a04c55b0bbfdd6689aa Mon Sep 17 00:00:00 2001 From: "godzilla80@gmx.net" <> Date: Sun, 14 Feb 2010 01:22:57 +0000 Subject: Merge Branches & Trunk /trunk:r2680,2692,2707-2736 /branches/3.1:r2682-2686,2694-2702,2705,2738-2762 --- framework/Data/Common/Mysql/TMysqlMetaData.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'framework/Data/Common/Mysql/TMysqlMetaData.php') diff --git a/framework/Data/Common/Mysql/TMysqlMetaData.php b/framework/Data/Common/Mysql/TMysqlMetaData.php index ae552cf3..fad33cea 100644 --- a/framework/Data/Common/Mysql/TMysqlMetaData.php +++ b/framework/Data/Common/Mysql/TMysqlMetaData.php @@ -4,7 +4,7 @@ * * @author Wei Zhuo * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2008 PradoSoft + * @copyright Copyright © 2005-2008 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ * @package System.Data.Common.Mysql @@ -110,7 +110,7 @@ class TMysqlMetaData extends TDbMetaData //find SET/ENUM values if($this->isEnumSetType($info['DbType'])) - $info['DbTypeValues'] = preg_split('/\s*,\s*|\s+/', preg_replace('/\'|"/', '', $match[1])); + $info['DbTypeValues'] = preg_split("/[',]/S", $match[1], -1, PREG_SPLIT_NO_EMPTY); //find column size, precision and scale $pscale = array(); @@ -212,9 +212,9 @@ class TMysqlMetaData extends TDbMetaData if($this->getServerVersion()<5.01) return false; if($schemaName!==null) - $sql = "SHOW FULL TABLES FROM `{$schemaName}` LIKE ':table'"; + $sql = "SHOW FULL TABLES FROM `{$schemaName}` LIKE :table"; else - $sql = "SHOW FULL TABLES LIKE ':table'"; + $sql = "SHOW FULL TABLES LIKE :table"; $command = $this->getDbConnection()->createCommand($sql); $command->bindValue(':table', $tableName); @@ -246,8 +246,8 @@ class TMysqlMetaData extends TDbMetaData if($row['Key_name']==='PRIMARY') $primary[] = $row['Column_name']; } - // 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) + // 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 @@ -353,4 +353,4 @@ EOD; return false; } } - + -- cgit v1.2.3