mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02: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
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue