Commit Graph

206 Commits

Author SHA1 Message Date
David Monllao
a696bb9ebd MDL-51374 dml: Identifying the cache with connection data 2016-03-16 17:17:39 +08:00
David Monllao
ad90c7a5d5 MDL-51374 dml: Delete selectively instead of purge for tmptables 2016-03-16 10:48:41 +08:00
Simey Lameze
87a3e50192 MDL-51374 core_dml: change database layer to pass table name as parameter 2016-03-15 14:43:45 +08:00
Simey Lameze
26e7eceefc MDL-51374 cache: add temp_tables cache definition
Also a helper method get_temp_tables_cache() has been created for temporary tables cache operations.
2016-03-15 10:57:43 +08:00
Russell Smith
d22a01fd99 MDL-53213 caching: Faster databasemeta caching for all databases. 2016-02-28 17:03:14 +11:00
Mark Nelson
62d020ea22 MDL-49824 core_dml: final deprecation of set_logging() 2016-01-06 10:31:38 +08:00
Rajesh Taneja
e487a51db3 MDL-52060 phpunit: Keep track of modified database for reset
Keep list of modified tables, so they can be reset
without any guess work
2015-12-22 15:37:40 +08:00
Mark Nielsen
d494306de7 MDL-52060 phpunit: Prevent querying database metadata 2015-12-22 13:40:38 +08:00
Marina Glancy
1766e6a17f MDL-52284 core: PHP7 engine errors have type Throwable 2015-12-10 10:49:37 +08:00
Tony Levi
d74b7e424f MDL-52284 core: compatibility with Exception/Throwable changes in PHP7 2015-12-10 10:49:36 +08:00
Mark Nelson
17a3781259 MDL-49551 core_dml: deprecated set_logging() 2015-04-13 19:30:08 -07:00
Marina Glancy
253b93f720 Merge branch 'wip_MDL-48083_m28_rollback' of git://github.com/skodak/moodle 2014-11-06 11:42:10 +08:00
Petr Skoda
5cf50f96e7 MDL-48083 dml: Empty buffers on forced rollback 2014-11-06 15:52:37 +13:00
Eloy Lafuente (stronk7)
bacbb4e279 MDL-47874 dml: add support for replace_all_text to oracle
And, at the same time, fix the implementation so all databases
will be using sql_substr() instead of harcoded "SUBSTRING".
2014-11-02 18:26:18 +01:00
Marina Glancy
3b4db5bdf5 MDL-44725 dml: added sql_intersect() 2014-09-03 13:33:58 +08:00
Petr Skoda
349f98ad3e MDL-45941 implement support for message sending from DB transactions and fix other problems
This patch includes following fixes:
 - messages may be now sent when database transactions active
 - consistent return status on failure from message_send(), false is
   returned only when message not created in message(_read)? table,
   processor failure results in debugging message only and messages
   are not marked as read
 - message_sent is triggered always with id from message table
 - logic for marking messages as viewed was standardised
 - message_viewed event is triggered consistently
 - improved performance when fetching user preferences
 - full unit tests coverage for send_message() function
 - fixed multiple other smaller issues discovered by unit tests
2014-06-17 16:09:43 +12:00
Tim Hunt
5bcfd504df MDL-45618 Fix @since PHPdoc tags. 2014-05-19 17:03:04 +01:00
Eloy Lafuente (stronk7)
6dcea23522 Merge branch 'w04_MDL-34055_m27_insertrecords' of https://github.com/skodak/moodle 2014-01-28 10:43:51 +01:00
Petr Škoda
cc5dba8e54 MDL-34055 add bulk DB->insert_records() method
This patch was inspired by patch by Simon Coggins from Totara.
2014-01-28 10:41:43 +08:00
Sam Hemelryk
068ffec81b Merge branch 'w04_MDL-43761_m27_sqlinstall' of https://github.com/skodak/moodle 2014-01-27 14:30:57 +13:00
David Monllao
a922209e84 MDL-43758 performance: New metric, time spent by the database
This patch adds a new performance metric to the performance
info shown by MDL_PERF* vars, the time spent by the database,
it was one of the wonderful @poltawski ideas. To be more specific
the value displayed is the sum of the time elapsed between query_start()
and query_end().
2014-01-24 16:07:01 +08:00
Petr Skoda
3f17d7091b MDL-43761 refactor db manager code to send arrays of SQL to the dml driver 2014-01-24 13:45:07 +08:00
Dan Poltawski
c582565a06 MDL-43395 dml: warn about invalid limit params
Help developers to find bugs by throwing a DEBUG_DEVELOPER message
rather than ignoring this case completely.
2014-01-13 08:42:07 +08:00
Sam Hemelryk
9d771f9529 Merge branch 'MDL-39725_analyze' of https://github.com/mr-russ/moodle
Conflicts:
	lib/dml/moodle_database.php
2013-12-17 09:31:19 +13:00
Russell Smith
814c9438a0 MDL-39725 database: Add statistics collection functions 2013-12-10 20:31:47 +11:00
Petr Škoda
6c3ae510f1 MDL-31625 fix multiple global search-replace issues
Includes following fixes:
* support for MS SQL Server
* optional trimming of of oversized VARCHAR fields
* conversion to forms library
* full localisation
* other cleanup
2013-12-06 09:51:49 +08:00
Petr Škoda
302506e03a MDL-42493 revert nasty DB meta caching hack that was trying to work around shutdown issues
The original problem was resolved via new core shutdown handler support.
2013-10-25 21:20:06 +02:00
Petr Škoda
38fc013025 MDL-42040 refactor core Moodle shutdown handlers logic 2013-10-04 11:36:46 +02:00
Petr Škoda
d79d5ac276 MDL-31501 rework user session architecture
List of changes:
 * New OOP API using PHP namespace \core\session\.
 * All handlers now update the sessions table consistently.
 * Experimental DB session support in Oracle.
 * Full support for session file handler (filesystem locking required).
 * New option for alternative session directory.
 * Official memcached session handler support.
 * Workaround for memcached version with non-functional gc.
 * Improved security - forced session id regeneration.
 * Improved compatibility with recent PHP releases.
 * Fixed borked CSS during install in debug mode.
 * Switched to file based sessions in new installs.
 * DB session setting disappears if DB does not support sessions.
 * DB session setting disappears if session handler specified in config.php.
 * Fast purging of sessions used in request only.
 * No legacy distinction -  file, database and memcached support the same functionality.
 * Session handler name included in performance info.
 * Fixed user_loggedin and user_loggedout event triggering.
 * Other minor bugfixing and improvements.
 * Fixed database session segfault if MUC disposed before $DB.

Limitations:
 * Session access time is now updated right after session start.
 * Support for $CFG->sessionlockloggedinonly was removed.
 * First request does not update userid in sessions table.
 * The timeouts may break badly if server hosting forces PHP.ini session settings.
 * The session GC is a lot slower, we do not rely on external session timeouts.
 * There cannot be any hooks triggered at the session write time.
 * File and memcached handlers do not support session lock acquire timeouts.
 * Some low level PHP session functions can not be used directly in Moodle code.
2013-09-21 13:11:56 +02:00
Petr Škoda
d11b8d0c63 MDL-40808 remove unused DML strings 2013-07-25 12:02:29 +02:00
Petr Škoda
17601a7e12 MDL-39985 add explicit MariaDB support 2013-07-24 10:45:20 +08:00
Petr Škoda
d8a1f4263a MDL-39846 implement new event dispatching and base event class 2013-07-19 08:43:27 +02:00
Eloy Lafuente (stronk7)
bae2846c2c MDL-39390 delete old moodle_database column cache
With MDL-39389 all the remaining drivers have been moved
from the in-memory, per-request ::columns cache to
the MUC (databasemeta) alternative.

That makes the old cache unused, so this is, simply about to
delete it, and warn in upgrade notes for potential sites
using custom moodle_database drivers.
2013-04-28 18:33:33 +02:00
Petr Škoda
e788339786 MDL-37742 add debugging message when $DB->sql_empty() used 2013-03-26 22:12:17 +01:00
Petr Škoda
77a5c09354 MDL-37742 simplify dirty one-space oracle hack 2013-03-24 13:43:18 +01:00
Tim Hunt
74fa94b26a MDL-37585 Make $DB->set_debug(true) show run time of each query. 2013-01-21 08:48:15 +00:00
Petr Škoda
bef1207302 MDL-36211 prevent session problems in installer 2012-11-21 08:34:28 +01:00
Petr Škoda
46a86dbbc2 MDL-36211 do not lock sessions for guests and not-logged-in users 2012-11-17 10:42:47 +01:00
Dan Poltawski
92c99211af MDL-25290 MUC - add dbname to settings hash 2012-11-01 10:41:18 +08:00
Sam Hemelryk
9381983e5b MDL-25290 conversion: Added db column cache to pgsql + mysql 2012-10-19 08:08:59 +08:00
Petr Škoda
cabc411215 MDL-35129 implement new export_table_recordset()
This is necessary because MySQL get_recordset_sql() stores the data in memory, unfortunately the alternative resultset iteration blocks concurrent access - that is why we need new method for export.
2012-09-15 11:29:33 +02:00
Dan Poltawski
f5d7fe4c9e MDL-34159 - add comment lost from previous commit 2012-07-10 12:59:06 +08:00
Dan Poltawski
4afbd0c834 Merge branch 'w28_MDL-34159_m24_wherelist' of git://github.com/skodak/moodle 2012-07-10 12:52:14 +08:00
Petr Skoda
63224dee44 MDL-33568 improve DB->count_records*()
Now always returns integer and invalid queries are detected.
2012-07-06 08:09:11 +02:00
Petr Škoda
7f22fb4dd9 MDL-34159 improve where_clause_list performance 2012-07-06 07:57:08 +02:00
Petr Skoda
00902cd974 MDL-32003 fix phpdocs and use __DIR__ for includes in dml layer
DML layer is not supposed to use $CFG,
it is better to rely on __DIR__ in self-contained libs…
2012-06-17 22:56:28 +02:00
Dan Poltawski
85b0540605 Merge branch 'wip-MDL-32395-m23' of git://github.com/samhemelryk/moodle 2012-04-16 10:32:09 +08:00
Sam Hemelryk
9315a5fb59 MDL-32395 dml: Minor phpdoc fixes 2012-04-11 09:47:50 +12:00
Petr Skoda
7620602cc2 MDL-32323 improve transaction handling in PHPUnit test cases 2012-04-10 15:27:10 +02:00
Dan Poltawski
2511b0742a Merge branch 'MDL-32028' of git://github.com/nebgor/moodle 2012-03-27 14:46:52 +08:00