MDL-59596 ddl: Added has_breaking_change_sqlmode()

This commit is contained in:
Matteo Scaramuccia
2018-03-26 23:15:47 +02:00
committed by Matteo Scaramuccia
parent 70937a4a20
commit ad75e8bb15
2 changed files with 14 additions and 0 deletions
@@ -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.
*
@@ -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