Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
d32a4c9d
Commit
d32a4c9d
authored
Nov 28, 2008
by
Dries Buytaert
Browse files
- Patch
#337926
by hswong3i: by default, force lower-case database tables/columns.
parent
77c5b369
Changes
3
Hide whitespace changes
Inline
Side-by-side
includes/database/mysql/database.inc
View file @
d32a4c9d
...
...
@@ -29,6 +29,8 @@ public function __construct(Array $connection_options = array()) {
PDO
::
MYSQL_ATTR_USE_BUFFERED_QUERY
=>
TRUE
,
// Because MySQL's prepared statements skip the query cache, because it's dumb.
PDO
::
ATTR_EMULATE_PREPARES
=>
TRUE
,
// Force column names to lower case.
PDO
::
ATTR_CASE
=>
PDO
::
CASE_LOWER
,
));
// Force MySQL to use the UTF-8 character set by default.
...
...
includes/database/pgsql/database.inc
View file @
d32a4c9d
...
...
@@ -30,6 +30,8 @@ public function __construct(Array $connection_options = array()) {
parent
::
__construct
(
$dsn
,
$connection_options
[
'username'
],
$connection_options
[
'password'
],
array
(
// Convert numeric values to strings when fetching.
PDO
::
ATTR_STRINGIFY_FETCHES
=>
TRUE
,
// Force column names to lower case.
PDO
::
ATTR_CASE
=>
PDO
::
CASE_LOWER
,
));
}
...
...
includes/database/sqlite/database.inc
View file @
d32a4c9d
...
...
@@ -31,7 +31,10 @@ public function __construct(Array $connection_options = array()) {
$this
->
transactionSupport
=
isset
(
$connection_options
[
'transactions'
])
?
$connection_options
[
'transactions'
]
:
TRUE
;
parent
::
__construct
(
'sqlite:'
.
$connection_options
[
'database'
],
''
,
''
,
$connection_options
);
parent
::
__construct
(
'sqlite:'
.
$connection_options
[
'database'
],
''
,
''
,
array
(
// Force column names to lower case.
PDO
::
ATTR_CASE
=>
PDO
::
CASE_LOWER
,
));
$this
->
exec
(
'PRAGMA encoding="UTF-8"'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment