diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | libraries/Table.class.php | 6 | ||||
-rw-r--r-- | test/classes/PMA_Table_test.php | 2 |
3 files changed, 7 insertions, 2 deletions
@@ -56,6 +56,7 @@ phpMyAdmin - ChangeLog - bug #4347 Fixed PHP Parse error in Advisor - bug #4350 Deleting the DB if it is renamed by the same name - bug #4353 makeProfilingChart is not defined +- bug #4355 Precision specifier for DOUBLE type is truncated 4.1.12.0 (2014-03-27) - bug #4334 Add event : datepicker won't open diff --git a/libraries/Table.class.php b/libraries/Table.class.php index 26911c8c49..562564c6b5 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -428,10 +428,14 @@ class PMA_Table // allow the possibility of a length for TIME, DATETIME and TIMESTAMP // (will work on MySQL >= 5.6.4) + // + // MySQL permits a non-standard syntax for FLOAT and DOUBLE, + // see http://dev.mysql.com/doc/refman/5.5/en/floating-point-types.html + // if ($length != '' && ! preg_match( '@^(DATE|TINYBLOB|TINYTEXT|BLOB|TEXT|' - . 'MEDIUMBLOB|MEDIUMTEXT|LONGBLOB|LONGTEXT|SERIAL|BOOLEAN|DOUBLE|FLOAT|UUID)$@i', + . 'MEDIUMBLOB|MEDIUMTEXT|LONGBLOB|LONGTEXT|SERIAL|BOOLEAN|UUID)$@i', $type ) ) { diff --git a/test/classes/PMA_Table_test.php b/test/classes/PMA_Table_test.php index e5c4cc316b..40e91a9bf5 100644 --- a/test/classes/PMA_Table_test.php +++ b/test/classes/PMA_Table_test.php @@ -506,7 +506,7 @@ class PMA_Table_Test extends PHPUnit_Framework_TestCase $field_primary, $move_to ); $this->assertEquals( - "`PMA_name` DOUBLE PMA_attribute NULL DEFAULT '12' " + "`PMA_name` DOUBLE(12) PMA_attribute NULL DEFAULT '12' " . "AUTO_INCREMENT COMMENT 'PMA_comment' FIRST", $query ); |