bug #1406378, default value and auto_increment

This commit is contained in:
Marc Delisle
2006-02-15 17:37:01 +00:00
parent e4ce05f877
commit 85b6320c3c
2 changed files with 5 additions and 1 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$
$Source$
2006-02-15 Marc Delisle <lem9@users.sourceforge.net>
* bug #1406378, default value and auto_increment, thanks to Nuvo - nyvsld
2006-02-14 Marc Delisle <lem9@users.sourceforge.net>
* Documentation.html: XHTML error, thanks to Cédric Corazza
* Documentation.html: remove experimental status for MySQL 4.1 support

View File

@@ -2511,7 +2511,8 @@ window.parent.updateTableTitle('<?php echo $uni_tbl; ?>', '<?php echo PMA_jsForm
if ($default_current_timestamp && strpos(' ' . strtoupper($type), 'TIMESTAMP') == 1) {
$query .= ' DEFAULT CURRENT_TIMESTAMP';
// 0 is empty in PHP
} elseif (!empty($default) || $default == '0' || $default != $default_orig) {
// auto_increment field cannot have a default value
} elseif ($extra !== 'AUTO_INCREMENT' && (!empty($default) || $default == '0' || $default != $default_orig)) {
if (strtoupper($default) == 'NULL') {
$query .= ' DEFAULT NULL';
} else {