bug #117686, tbl_alter.php
This commit is contained in:
@@ -6,7 +6,9 @@ $Id$
|
||||
$Source$
|
||||
|
||||
2005-04-07 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* tbl_properties.inc.php: bug #1176896, undefined variable
|
||||
* tbl_properties.inc.php, tbl_alter.php: bug #1176896, undefined variable
|
||||
* libraries/common.lib.php: wrong test when the field's type is
|
||||
TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
|
||||
2005-04-03 Marc Delisle <lem9@users.sourceforge.net>
|
||||
### 2.6.2-rc1 released
|
||||
|
@@ -2539,7 +2539,7 @@ if (typeof(document.getElementById) != 'undefined'
|
||||
$query .= ' NULL';
|
||||
}
|
||||
|
||||
if ($default_current_timestamp && strtoupper($full_field_type) == 'TIMESTAMP') {
|
||||
if ($default_current_timestamp && strpos(' ' . strtoupper($full_field_type),'TIMESTAMP') == 1) {
|
||||
$query .= ' DEFAULT CURRENT_TIMESTAMP';
|
||||
// 0 is empty in PHP
|
||||
} elseif (!empty($default) || $default == '0') {
|
||||
|
@@ -66,7 +66,8 @@ if (isset($do_save_data)) {
|
||||
$full_field_type .= ' ' . $field_attribute[$i];
|
||||
}
|
||||
// take care of native MySQL comments here
|
||||
$query .= PMA_generateAlterTable($field_orig[$i], $field_name[$i], $full_field_type, (PMA_MYSQL_INT_VERSION >= 40100 && $field_collation[$i] != '' ? $field_collation[$i] : ''), $field_null[$i], $field_default[$i], $field_default_current_timestamp[$i], $field_extra[$i], (PMA_MYSQL_INT_VERSION >= 40100 && $field_comments[$i] != '' ? $field_comments[$i] : ''));
|
||||
|
||||
$query .= PMA_generateAlterTable($field_orig[$i], $field_name[$i], $full_field_type, (PMA_MYSQL_INT_VERSION >= 40100 && $field_collation[$i] != '' ? $field_collation[$i] : ''), $field_null[$i], $field_default[$i], (isset($field_default_current_timestamp[$i]) ? $field_default_current_timestamp[$i] : ''), $field_extra[$i], (PMA_MYSQL_INT_VERSION >= 40100 && $field_comments[$i] != '' ? $field_comments[$i] : ''));
|
||||
} // end for
|
||||
|
||||
// To allow replication, we first select the db to use and then run queries
|
||||
|
Reference in New Issue
Block a user