6 Commits

Author SHA1 Message Date
Leon Stringer
37ae249dfa MDL-70181 database: Quote database object names
Table names and database name now enclosed in backticks.
admin/cli/mysql_collation.php failed if $CFG->prefix was blank with
MySQL 8.0 because table 'groups' conflicted with a new reserved word.

Note that this quotes both mysql_collation.php and mysql_compressed_rows.php
but only the former was mal-functioning.

The case of mysql_compressed_rows.php is a little bit special because
not all tables are processed, only those having big rows. And the groups
table is not one of them. In any case, better add the quotes there for
any future case.

Also, when testing this patch https://tracker.moodle.org/browse/MDL-71512
was discovered and will need to be fixed to make core 100% compliant
with MySQL 8.0 and MariaDB 10.6 and up.
2021-05-05 10:16:45 +02:00
Luca Bösch
3437a77552 MDL-59662 database: Typo in variable name. 2017-08-04 10:30:11 +02:00
Adrian Greeve
c05dc071b0 MDL-58729 database: Improve performance of CLI tool.
Imporve the speed with which mysql_collation converts to
a different collation.
2017-06-12 14:03:36 +08:00
Adrian Greeve
0bbefd81cd MDL-48228 database: Make utf8mb4 the default character set for mysql.
Thanks to Jetha Chan for providing the initial patch that this is
based on.
2017-03-01 09:03:12 +08:00
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
Petr Škoda
fdd57d4fdf MDL-34271 add new cli tool for mysql collation conversions 2012-07-12 14:39:36 +02:00