This should resolve all problem on developer machines when switching branches or when restoring previous Moodle databases. It also prevents any potential problems during upgrades such as concurrent DB modification and resolves chicken egg problems in future caching upgrades.
By using a pivoting strategy, we modify the list
of params (QM and NAMED supported) into a
subquery, so the 1000 limit in Oracle (ORA-01795)
is not thrown anymore.
Let's verify how all databases perform with a big
number of parameters (10000) using IN() SQL clauses.
Both using QM and NAMED parameters.
Ideally only Oracle fails, and only it will need fixing.
This is necessary because PHP in Windows does not have any certificates and some *nix systems have outdated or missing ca bundles too.
The order is:
1/ dataroot/moodleorgca.crt always wins - needs to be added manually by admin
2/ php.ini setting "curl.cainfo" is next
3/ on Windows libdir/cacert.pem is used because it does not have any default cert bundles
4/ system default is the last - the previous value, ok for properly configured *nix systems
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.
Done in a separate commit, coz this driver is not
truly supported, but considering it as a reference
for people developing drivers... it's better to
have it supporting the databasemeta cache.
These changes give about a 10% speed-up in this function. The significant changes are:
1. Simplify the if logic to remove unnecssary cases.
2. Dont pass default argument values to htmlspecialchars, just using the
defaults is faster.
3. I can confirm that /i regex is faster than the equivalent regex without the i.
I also added more unit tests to test the edge cases.
This helps synchronise time on the client side with time on the server.
If you wait until a js_init_call runs, you might have had to wait an
unknown number of seconds while all the JS loads. Therefore, we capture
the current time as soon as possible in <head>.
This is a bit like adding .jsenabled to <body> as soon as possible, to
reduce visual flicker.