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
This commit is contained in:
jakubvrana
2009-04-07 15:21:47 +00:00
parent 5938d0a901
commit 8d7ab696ef

View File

@@ -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"],