Commit 4b3298eb authored by catch's avatar catch

Issue #1171866 by sun: Fixed Enforced fetching of fields/columns in lowercase...

Issue #1171866 by sun: Fixed Enforced fetching of fields/columns in lowercase breaks third-party integration.
parent 3cc02967
...@@ -55,8 +55,6 @@ public function __construct(array $connection_options = array()) { ...@@ -55,8 +55,6 @@ public function __construct(array $connection_options = array()) {
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => TRUE, PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => TRUE,
// Because MySQL's prepared statements skip the query cache, because it's dumb. // Because MySQL's prepared statements skip the query cache, because it's dumb.
PDO::ATTR_EMULATE_PREPARES => TRUE, PDO::ATTR_EMULATE_PREPARES => TRUE,
// Force column names to lower case.
PDO::ATTR_CASE => PDO::CASE_LOWER,
); );
parent::__construct($dsn, $connection_options['username'], $connection_options['password'], $connection_options['pdo']); parent::__construct($dsn, $connection_options['username'], $connection_options['password'], $connection_options['pdo']);
......
...@@ -390,7 +390,7 @@ public function indexExists($table, $name) { ...@@ -390,7 +390,7 @@ public function indexExists($table, $name) {
// Returns one row for each column in the index. Result is string or FALSE. // Returns one row for each column in the index. Result is string or FALSE.
// Details at http://dev.mysql.com/doc/refman/5.0/en/show-index.html // Details at http://dev.mysql.com/doc/refman/5.0/en/show-index.html
$row = $this->connection->query('SHOW INDEX FROM {' . $table . "} WHERE key_name = '$name'")->fetchAssoc(); $row = $this->connection->query('SHOW INDEX FROM {' . $table . "} WHERE key_name = '$name'")->fetchAssoc();
return isset($row['key_name']); return isset($row['Key_name']);
} }
public function addPrimaryKey($table, $fields) { public function addPrimaryKey($table, $fields) {
......
...@@ -71,8 +71,6 @@ public function __construct(array $connection_options = array()) { ...@@ -71,8 +71,6 @@ public function __construct(array $connection_options = array()) {
PDO::ATTR_EMULATE_PREPARES => TRUE, PDO::ATTR_EMULATE_PREPARES => TRUE,
// Convert numeric values to strings when fetching. // Convert numeric values to strings when fetching.
PDO::ATTR_STRINGIFY_FETCHES => TRUE, PDO::ATTR_STRINGIFY_FETCHES => TRUE,
// Force column names to lower case.
PDO::ATTR_CASE => PDO::CASE_LOWER,
); );
parent::__construct($dsn, $connection_options['username'], $connection_options['password'], $connection_options['pdo']); parent::__construct($dsn, $connection_options['username'], $connection_options['password'], $connection_options['pdo']);
......
...@@ -73,8 +73,6 @@ public function __construct(array $connection_options = array()) { ...@@ -73,8 +73,6 @@ public function __construct(array $connection_options = array()) {
'pdo' => array(), 'pdo' => array(),
); );
$connection_options['pdo'] += array( $connection_options['pdo'] += array(
// Force column names to lower case.
PDO::ATTR_CASE => PDO::CASE_LOWER,
// Convert numeric values to strings when fetching. // Convert numeric values to strings when fetching.
PDO::ATTR_STRINGIFY_FETCHES => TRUE, PDO::ATTR_STRINGIFY_FETCHES => TRUE,
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment