diff --git a/libraries/Util.class.php b/libraries/Util.class.php index 962b1e7cda..ce336cd460 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -2962,7 +2962,9 @@ class PMA_Util // convert to lowercase just to be sure $type = strtolower(chop(substr($columnspec, 0, $first_bracket_pos))); } else { - $type = strtolower($columnspec); + // Split trailing attributes such as unsigned, binary, zerofill and get data type name + $type_parts = explode(' ',$columnspec); + $type = strtolower($type_parts[0]); $spec_in_brackets = ''; } diff --git a/test/libraries/common/PMA_extractColumnSpec_test.php b/test/libraries/common/PMA_extractColumnSpec_test.php index a04bb9f2cb..0e00f51e29 100644 --- a/test/libraries/common/PMA_extractColumnSpec_test.php +++ b/test/libraries/common/PMA_extractColumnSpec_test.php @@ -117,7 +117,7 @@ class PMA_ExtractColumnSpec_Test extends PHPUnit_Framework_TestCase array( "INT UNSIGNED zerofill", array( - 'type' => 'int unsigned zerofill', + 'type' => 'int', 'print_type' => 'int', 'binary' => false, 'unsigned' => true,