diff options
author | Marc Delisle <marc@infomarc.info> | 2005-03-28 05:22:45 +0400 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2005-03-28 05:22:45 +0400 |
commit | c021e6b4641f1be277eff6f1bd1dfe6d6c755cb6 (patch) | |
tree | 18b1fa89093a7388c629ceee252f95ffcf33c4c0 | |
parent | d55b3796f2b1c3b187c73412bed1d70de1aa2d78 (diff) |
bug #1170549 Adding fields NOT NULL under MySQl 4.1
-rwxr-xr-x | ChangeLog | 8 | ||||
-rw-r--r-- | libraries/relation.lib.php | 7 |
2 files changed, 12 insertions, 3 deletions
@@ -5,15 +5,17 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-03-27 Marc Delisle <lem9@users.sourceforge.net> + * lang/serbian: Updated, thanks to Mihailo Stefanovic (mikis). + * libraries/relation.lib.php: bug #1170549, adding fields NOT NULL + under MySQL 4.1 + 2005-03-27 Alexander M. Turek <me@derrabus.de> * libraries/defines.lib.php, themes/*/info.inc.php: Marked 2.6.0 / 2.6.1 themes as imcompatible because of recent changes. * libraries/information_schema_relations.lib.php, libraries/relation.lib.php: information_schema relations. -2005-03-27 Marc Delisle <lem9@users.sourceforge.net> - * lang/serbian: Updated, thanks to Mihailo Stefanovic (mikis). - 2005-03-26 Alexander M. Turek <me@derrabus.de> * libraries/engines/innodb.lib.php: Caught possible devision by zero. * lang/dutch-iso-8859-15.inc.php, lang/finnish-iso-8859-15.inc.php, diff --git a/libraries/relation.lib.php b/libraries/relation.lib.php index ff05308639..0c49ed3572 100644 --- a/libraries/relation.lib.php +++ b/libraries/relation.lib.php @@ -573,8 +573,15 @@ function PMA_setComment($db, $table, $col, $comment, $removekey = '', $mode='aut break; } } + if ($nulls[$col] == 'YES') { + $nulls[$col] = ''; + } else { + $nulls[$col] = 'NOT NULL'; + } + $query = 'ALTER TABLE ' . PMA_backquote($table) . ' CHANGE ' . PMA_generateAlterTable($col, $col, $types[$col], $collations[$col], $nulls[$col], $defaults[$col], $extras[$col], $comment); + PMA_DBI_try_query($query, NULL, PMA_DBI_QUERY_STORE); return TRUE; } |