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:
stronk7 2009-05-11 15:11:23 +00:00
parent 562c2d5439
commit d09af2e19f

View File

@ -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 .= ')';
}