MDL-59596 ddl: Added has_breaking_change_sqlmode()

This commit is contained in:
Matteo Scaramuccia 2017-09-04 09:57:20 +02:00
parent a15c745936
commit f6b16e95a8
2 changed files with 14 additions and 0 deletions

View File

@ -94,6 +94,12 @@ class mariadb_native_moodle_database extends mysqli_native_moodle_database {
return version_compare($version, '10.2.7', '>=');
}
public function has_breaking_change_sqlmode() {
$version = $this->get_server_info()['version'];
// Breaking change since 10.2.4: https://mariadb.com/kb/en/the-mariadb-library/sql-mode/#setting-sql_mode.
return version_compare($version, '10.2.4', '>=');
}
/**
* It is time to require transactions everywhere.
*

View File

@ -817,6 +817,14 @@ class mysqli_native_moodle_database extends moodle_database {
return false;
}
/**
* Indicates whether SQL_MODE default value has changed in a not backward compatible way.
* @return boolean True when SQL_MODE breaks BC; otherwise, false.
*/
public function has_breaking_change_sqlmode() {
return false;
}
/**
* Returns moodle column info for raw column from information schema.
* @param stdClass $rawcolumn