From: jakubvrana Date: Tue, 7 Apr 2009 15:21:47 +0000 (+0000) Subject: MySQL 5.0.32 returns DEFAULT '' for int NOT NULL X-Git-Tag: v3.0.0~946 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=8d7ab696efb40414ad9a1e642908b4544a4db6b5;p=adminer.git MySQL 5.0.32 returns DEFAULT '' for int NOT NULL git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@574 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- diff --git a/functions.inc.php b/functions.inc.php index 4b7888a7..f99dad38 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -70,7 +70,7 @@ function fields($table) { "type" => $match[1], "length" => $match[2], "unsigned" => ltrim($match[3] . $match[4]), - "default" => $row["Default"], + "default" => (strlen($row["Default"]) || ereg("char", $match[1]) ? $row["Default"] : null), "null" => ($row["Null"] == "YES"), "auto_increment" => ($row["Extra"] == "auto_increment"), "collation" => $row["Collation"],