mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-18547 mysql floats - only none/both params (length & decimals) syntax is
allowed. So, if decimals are missing, enforce 0 if length is defined. Merged from 19_STABLE
This commit is contained in:
parent
562c2d5439
commit
d09af2e19f
@ -211,6 +211,8 @@ class mysql_sql_generator extends sql_generator {
|
||||
$dbtype .= '(' . $xmldb_length;
|
||||
if (!empty($xmldb_decimals)) {
|
||||
$dbtype .= ',' . $xmldb_decimals;
|
||||
} else {
|
||||
$dbtype .= ', 0'; // In MySQL, if length is specified, decimals are mandatory for FLOATs
|
||||
}
|
||||
$dbtype .= ')';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user