From 2f6d917af5b7367e2956a16f76909ac09110b853 Mon Sep 17 00:00:00 2001 From: webchick Date: Sun, 25 Dec 2011 00:40:22 -0800 Subject: Issue #1309278 by basic, Niklas Fiekas: Added Make PDO connection options configurable. --- sites/default/default.settings.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'sites/default') diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index f8894aaf5..d8ab0e62f 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -153,6 +153,29 @@ * @endcode * NOTE: MySQL and SQLite's definition of a schema is a database. * + * Advanced users can add or override initial commands to execute when + * connecting to the database server, as well as PDO connection settings. For + * example, to enable MySQL SELECT queries to exceed the max_join_size system + * variable, and to reduce the database connection timeout to 5 seconds: + * + * @code + * $databases['default']['default'] = array( + * 'init_commands' => array( + * 'big_selects' => 'SET SQL_BIG_SELECTS=1', + * ), + * 'pdo' => array( + * PDO::ATTR_TIMEOUT => 5, + * ), + * ); + * @endcode + * + * WARNING: These defaults are designed for database portability. Changing them + * may cause unexpected behavior, including potential data loss. + * + * @see DatabaseConnection_mysql::__construct + * @see DatabaseConnection_pgsql::__construct + * @see DatabaseConnection_sqlite::__construct + * * Database configuration format: * @code * $databases['default']['default'] = array( -- cgit v1.2.3