summaryrefslogtreecommitdiff
path: root/framework/Data/Common/Mysql/TMysqlMetaData.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-04-15 08:34:36 +0200
committerDavid <ottodavid@gmx.net>2014-08-21 17:32:54 +0200
commit37e772cb8582fe772dbea72286874cf5335dd895 (patch)
tree0caa9178c23fcb293fb7d399a0c56b12b4aecd2c /framework/Data/Common/Mysql/TMysqlMetaData.php
parent7c3aec7ca2c88cec72cae7b8758ddefd2b34f6dd (diff)
Fix #519
(cherry picked from commit 3abca1f10ace63b2daa93870f17049c047b53abe)
Diffstat (limited to 'framework/Data/Common/Mysql/TMysqlMetaData.php')
-rw-r--r--framework/Data/Common/Mysql/TMysqlMetaData.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/framework/Data/Common/Mysql/TMysqlMetaData.php b/framework/Data/Common/Mysql/TMysqlMetaData.php
index 820c23d6..b3ee3d08 100644
--- a/framework/Data/Common/Mysql/TMysqlMetaData.php
+++ b/framework/Data/Common/Mysql/TMysqlMetaData.php
@@ -76,6 +76,9 @@ class TMysqlMetaData extends TDbMetaData
{
list($schemaName,$tableName) = $this->getSchemaTableName($table);
$find = $schemaName===null ? "`{$tableName}`" : "`{$schemaName}`.`{$tableName}`";
+ $colCase = $this->getDbConnection()->getColumnCase();
+ if($colCase != TDbColumnCaseMode::Preserved)
+ $this->getDbConnection()->setColumnCase('Preserved');
$this->getDbConnection()->setActive(true);
$sql = "SHOW FULL FIELDS FROM {$find}";
$command = $this->getDbConnection()->createCommand($sql);
@@ -88,6 +91,8 @@ class TMysqlMetaData extends TDbMetaData
}
if($index===0)
throw new TDbException('dbmetadata_invalid_table_view', $table);
+ if($colCase != TDbColumnCaseMode::Preserved)
+ $this->getDbConnection()->setColumnCase($colCase);
return $tableInfo;
}