From d09af2e19fec8814f292c575803fb1d629c5d992 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Mon, 11 May 2009 15:11:23 +0000 Subject: [PATCH] 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 --- lib/ddl/mysql_sql_generator.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ddl/mysql_sql_generator.php b/lib/ddl/mysql_sql_generator.php index a2a012b538..e0197724a7 100644 --- a/lib/ddl/mysql_sql_generator.php +++ b/lib/ddl/mysql_sql_generator.php @@ -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 .= ')'; } -- 2.39.5