fixed bug #1939031 Auto_Increment selected for TimeStamp by Default

This commit is contained in:
Sebastian Mendel
2008-05-07 08:53:50 +00:00
parent 1af28a7c5f
commit f3777d3dc4
2 changed files with 6 additions and 1 deletions

View File

@@ -16,6 +16,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #1955386 [session] Overriding session.hash_bits_per_character - bug #1955386 [session] Overriding session.hash_bits_per_character
- [interface] sanitize the table comments in table print view, - [interface] sanitize the table comments in table print view,
thanks to Norman Hippert thanks to Norman Hippert
- bug #1939031 Auto_Increment selected for TimeStamp by Default
2.11.6.0 (2008-04-29) 2.11.6.0 (2008-04-29)
- bug #1903724 [interface] Displaying of very large queries in error message - bug #1903724 [interface] Displaying of very large queries in error message

View File

@@ -359,6 +359,9 @@ for ($i = 0 ; $i <= $num_fields; $i++) {
if ($zerofill) { if ($zerofill) {
$attribute = 'UNSIGNED ZEROFILL'; $attribute = 'UNSIGNED ZEROFILL';
} }
if (isset($row['Extra']) && $row['Extra'] == 'ON UPDATE CURRENT_TIMESTAMP') {
$attribute = 'ON UPDATE CURRENT_TIMESTAMP';
}
if (isset($submit_attribute) && $submit_attribute != FALSE) { if (isset($submit_attribute) && $submit_attribute != FALSE) {
$attribute = $submit_attribute; $attribute = $submit_attribute;
@@ -459,7 +462,7 @@ for ($i = 0 ; $i <= $num_fields; $i++) {
$content_cells[$i][$ci] = '<select name="field_extra[]" id="field_' . $i . '_' . ($ci - $ci_offset) . '">'; $content_cells[$i][$ci] = '<select name="field_extra[]" id="field_' . $i . '_' . ($ci - $ci_offset) . '">';
if (!isset($row) || empty($row['Extra'])) { if (!isset($row) || empty($row['Extra']) || $row['Extra'] != 'auto_increment') {
$content_cells[$i][$ci] .= "\n"; $content_cells[$i][$ci] .= "\n";
$content_cells[$i][$ci] .= '<option value="">&nbsp;</option>' . "\n"; $content_cells[$i][$ci] .= '<option value="">&nbsp;</option>' . "\n";
$content_cells[$i][$ci] .= '<option value="AUTO_INCREMENT">auto_increment</option>' . "\n"; $content_cells[$i][$ci] .= '<option value="AUTO_INCREMENT">auto_increment</option>' . "\n";