Skip to content

Commit

Permalink
MDL-59596 ddl: Added has_breaking_change_sqlmode()
Browse files Browse the repository at this point in the history
  • Loading branch information
scara committed Mar 26, 2018
1 parent a15c745 commit f6b16e9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/dml/mariadb_native_moodle_database.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ protected function has_breaking_change_quoted_defaults() {
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.
*
Expand Down
8 changes: 8 additions & 0 deletions lib/dml/mysqli_native_moodle_database.php
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,14 @@ protected function has_breaking_change_quoted_defaults() {
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
Expand Down

0 comments on commit f6b16e9

Please sign in to comment.