summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-01-20 09:16:23 +0100
committerAndrey Andreev <narf@devilix.net>2014-01-20 09:16:23 +0100
commit9039a35dfff691d82a8a00a9a550532385c4874e (patch)
treed1cc6f3b9bbeb67f0e30f8dd778d403b75d1f283
parent99e2f8e2397ec4bf3ce5637d5a660a122aaa7b1b (diff)
parent5cf7effebcd8f1abe823c6bc8e66e08a6a50c7dd (diff)
Merge pull request #2830 from abdmaster/fix/config/database_save_queries
Added [save_queries] config in config/database.php
-rw-r--r--application/config/database.php8
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 9 insertions, 0 deletions
diff --git a/application/config/database.php b/application/config/database.php
index f0b839757..62ff3e0a5 100644
--- a/application/config/database.php
+++ b/application/config/database.php
@@ -65,6 +65,13 @@
| ['autoinit'] Whether or not to automatically initialize the database.
| ['encrypt'] Whether or not to use an encrypted connection.
| ['compress'] Whether or not to use client compression (MySQL only)
+| ['save_queries'] TRUE/FALSE - save all executed queries.
+| Note: Useful for development when using with profiler. However,
+| when too many queries run, it leads to memory exhaust. So for production
+| mode it is better to set it FALSE. Also, if set to FALSE, the
+| $this->db->last_query() will return FALSE. This setting can
+| also be changed during runtime by using
+| $this->db->save_queries = TRUE|FALSE;
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
| - good for ensuring strict SQL while developing
| ['failover'] array - A array with 0 or more data for connections if the main should fail.
@@ -97,6 +104,7 @@ $db['default'] = array(
'autoinit' => TRUE,
'encrypt' => FALSE,
'compress' => FALSE,
+ 'save_queries' => TRUE,
'stricton' => FALSE,
'failover' => array()
);
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 237e237e2..2662b451d 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -160,6 +160,7 @@ Release Date: Not Released
- Added support for SQLite3 database driver.
- Added Interbase/Firebird database support via the *ibase* driver.
- Added ODBC support for ``create_database()``, ``drop_database()`` and ``drop_table()`` in :doc:`Database Forge <database/forge>`.
+ - Added **save_queries** config setting in *config/database.php*. Default is ``TRUE``.
- :doc:`Query Builder <database/query_builder>` changes include: