diff --git a/ChangeLog b/ChangeLog index 7960bf26a..c130fbb61 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-02-03 Alexander M. Turek + * tbl_addfield.php: Bug #1040682 (adding field with collation). + 2005-02-02 Marc Delisle * libraries/dbi/*: PMA_DBI_num_rows(): do not send a boolean to mysqli_num_rows() or mysql_num_row(), it expects a result resource diff --git a/tbl_addfield.php b/tbl_addfield.php index a64cde4f5..9f4a9fa85 100644 --- a/tbl_addfield.php +++ b/tbl_addfield.php @@ -62,8 +62,10 @@ if (isset($submit_num_fields)) { } if ($field_attribute[$i] != '') { $query .= ' ' . $field_attribute[$i]; - } else if (PMA_MYSQL_INT_VERSION >= 40100 && isset($field_charset[$i]) && $field_charset[$i] != '') { - $query .= ' CHARACTER SET ' . $field_charset[$i]; + } else if (PMA_MYSQL_INT_VERSION >= 40100 && isset($field_collation[$i]) && $field_collation[$i] != '') { + list($tmp_charset) = explode('_', $field_collation[$i]); + $query .= ' CHARACTER SET ' . $tmp_charset . ' COLLATE ' . $field_collation[$i]; + unset($tmp_charset); } if ($field_default[$i] != '') { if (strtoupper($field_default[$i]) == 'NULL') {