1
0
mirror of https://github.com/moodle/moodle.git synced 2025-03-16 21:50:20 +01:00

153 Commits

Author SHA1 Message Date
Jun Pataleta
669de78352 MDL-66110 dml: Undo table name fix when table name's used as parameter 2019-08-22 16:16:08 +08:00
Ryan Wyllie
f12c591807 MDL-66110 dml: use fix_table_name for all mysql table names
Changed all of the places that were manually prefixing the table
name to instead fix the table name with the fix_table_name
function.
2019-08-22 16:03:33 +08:00
Ryan Wyllie
30d2b9cd31 MDL-66110 dml: Fix MySQL v8 compatibility with groups table
MySQL v8 has added "groups" to the reserved word list. That is used
as a table name in Moodle so we have to quote it with backticks in the
SQL so that MySQL knows it's being used as an identifier.
2019-08-13 09:35:19 +08:00
Matteo Scaramuccia
82c2d98fa2 MDL-61702 dml: MariaDB 10.3 supports only the Barracuda file format.
More details about this change also in https://tracker.moodle.org/browse/MDL-59099

Ref.: https://mariadb.com/kb/en/library/mariadb-1031-release-notes/#other-variables
2018-05-31 22:55:00 +02:00
David Monllao
17ed12eb17 Merge branch 'm35_MDL-59596_DDL_Issues_With_MariaDB_10p2_SQLMode' of https://github.com/scara/moodle 2018-05-28 08:15:09 +02:00
Matteo Scaramuccia
f6b16e95a8 MDL-59596 ddl: Added has_breaking_change_sqlmode() 2018-03-26 23:12:36 +02:00
David Monllao
c2e970779d MDL-53226 search_simpledb: Refine the patch
- Clumsy fallback only when there is no full-text search support
- Mimic solr tests
- pgsql tokenization using simple configuration
- workaround for mysql '*' search issue
- total results proper calculation
- SQL server FTS support
- Standarize dml full-text search checkings
- Upgrade note about the new dml method
- Set search_simpledb as default engine if no solr config
2018-03-20 18:49:38 +01:00
Matteo Scaramuccia
740a9315c3 MDL-59099 dml: MySQL8 supports only the Barracuda file format.
The following InnoDB file format configuration parameters were deprecated
in MySQL 5.7.7 and are now removed:
- innodb_file_format
- innodb_file_format_check
- innodb_file_format_max
- innodb_large_prefix

File format configuration parameters were necessary for creating tables
compatible with earlier versions of InnoDB in MySQL 5.1.
Now that MySQL 5.1 has reached the end of its product lifecycle,
the parameters are no longer required.

The FILE_FORMAT column was removed from the INNODB_SYS_TABLES and
INNODB_SYS_TABLESPACES Information Schema tables.

Ref: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-0.html
2017-10-27 17:38:36 +02:00
Matteo Scaramuccia
500d8650d2 MDL-59100 dml: Lower the case of INFORMATION_SCHEMA.* fields. 2017-10-21 14:30:38 +02:00
David Monllao
b1a9a6a19a Merge branch 'wip-MDL-60281-master' of git://github.com/marinaglancy/moodle 2017-10-17 09:45:44 +02:00
Marina Glancy
109fbd5a15 MDL-46269 dml: Add casesensitive argument to sql_regex() 2017-10-16 16:53:46 +08:00
Marina Glancy
484b43f456 MDL-60281 general: create_function is deprecated in PHP7.2 2017-10-16 09:37:19 +08:00
Andrew Nicols
ee640d3f2d Merge branch 'm34_MDL-59583_Fix_MariaDB_10d2d7_Breaking_Change' of https://github.com/scara/moodle 2017-08-03 12:29:56 +08:00
Matteo Scaramuccia
2ec50fe3fd MDL-59583 dml: fixed NULL values w/ MariaDB 10.2.7+ 2017-08-03 00:13:03 +02:00
Andrew Nicols
2653e0c8e1 Merge branch 'm34_MDL-59583_Fix_MariaDB_10d2d7_Breaking_Change' of https://github.com/scara/moodle 2017-07-31 11:37:45 +08:00
Matteo Scaramuccia
0510d5c757 MDL-59583 dml: fixed breaking change added w/ MariaDB 10.2.7+ 2017-07-25 12:36:23 +02:00
Matteo Scaramuccia
dae6c5dc31 MDL-59583 dml: improve perfs by unsetting the key. 2017-07-25 09:06:18 +02:00
Adrian Greeve
3a8c989137 MDL-59561 database: Update to creating new indexes in mysql.
When updating the mysql system to utf8mb4 not all tables are
converted to the row format of compressed or dynamic. If a new
index is created there is a possibility that the table could be
using compact or redundant and then an error will be shown saying
that the index size is too large. This fix handles this exception
and converts the table over to compressed.
2017-07-21 09:27:08 +08:00
Marina Glancy
f2b5ed40f9 MDL-58689 dml: prevent logging during setup 2017-04-27 10:07:01 +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
Ankit Agarwal
c728b45904 MDL-57192 dml: Temporarily disable query logging during setup 2017-01-03 17:24:21 +05:30
Eloy Lafuente (stronk7)
9d5c12bee4 MDL-29332 dml: new sql_equal() to force cs/ci behavior on varchar matching 2016-09-15 16:33:00 +02:00
Eloy Lafuente (stronk7)
4ae653024d MDL-53944 dml: make char2real() for mysql to support decimals
- With the patch, 6 positions of scale accuracy are guaranteed
  per individual casted value.
- Backed with unit tests, both for varchar and clob.
- Added 2 missing tests about uses of the method with params
  and values.

Note: 6 was picked because looking to all databases implementation
postgres was found to be casting to real, aka, 6.
2016-05-06 09:27:32 +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
Russell Smith
d22a01fd99 MDL-53213 caching: Faster databasemeta caching for all databases. 2016-02-28 17:03:14 +11:00
Marina Glancy
57ee89569a MDL-50633 dml: deprecated var replaced in mysql 5.7
Thanks to Charles Verge for providing a patch
2015-11-02 21:05:20 +08:00
David Monllao
2bdeb8ef30 MDL-51052 dml: More info about mysql and case & accent sensitiveness 2015-09-18 11:45:53 +08:00
Charles Fulton
3d47155643 MDL-51052 dml: support for sql_like() under utf8_bin 2015-09-18 09:56:43 +08:00
Julien Boulen
9b45b74e8f MDL-47584 database SQL: add debug info on connection error notices 2014-10-29 16:59:56 +08:00
Marina Glancy
3b4db5bdf5 MDL-44725 dml: added sql_intersect() 2014-09-03 13:33:58 +08:00
Petr Skoda
a45d54b8cb MDL-46235 ddl: add support for large number of text fields in one database table 2014-08-25 12:40:57 +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
Petr Škoda
b4b03d38b7 MDL-43761 execute bulk sql when modifying db structure
In case of postgresql this uses transactions to allow easier recovery from broken installs.
2014-01-24 13:47:41 +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
37f59a68bd Merge branch 'MDL-41359-master' of https://github.com/mr-russ/moodle 2013-12-18 10:08:33 +13:00
Russell Smith
9c7dfbe6ed MDL-41359 database: no table columns is a dml_excpeiton
When insert_record is called and it doesn't find any columns
to insert data into, that is a dml_exception as you need at least
one column in the database to insert into it.  This can happen
when you have created a zero column database table, or the table
does not exist.
2013-12-07 08:56:24 +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
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
Martin Langhoff
4f3e38e745 MDL-40266 improve emulate_bound_params() for mysqli
Looping over large numbers of items with array_shift() is expensive.
Reverse the array and fetch items from the top of the pile.
2013-06-30 18:25:14 +02:00
Petr Škoda
33b5b9f97a MDL-36809 add support for mysqli persistent connections 2013-01-19 13:25:28 +01:00
Petr Škoda
9d0ded6697 MDL-37284 fix mysql test for unicode compatibility 2012-12-22 18:42:55 +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
Sam Hemelryk
9381983e5b MDL-25290 conversion: Added db column cache to pgsql + mysql 2012-10-19 08:08:59 +08:00
Petr Škoda
633f324896 MDL-35691 fix bogus mysql integer size detection 2012-10-10 10:33:18 +02:00
Petr Škoda
3c17c85ae6 MDL-35691 fix max length calculation in pg, mysql and our bigint checker 2012-10-06 10:07:48 +02:00