problem with getting comments when creating a new table under MySQL 4.1.x with extension mysql

This commit is contained in:
Marc Delisle
2005-03-10 19:49:09 +00:00
parent 41ae394e2e
commit c84507f8d9
3 changed files with 15 additions and 4 deletions

View File

@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
$Id$
$Source$
2005-03-10 Marc Delisle <lem9@users.sourceforge.net>
* libraries/database_interface.lib.php, libraries/relation.lib.php:
problem with getting comments when creating a new table under MySQL 4.1.x
with mysql extension
2005-03-09 Marc Delisle <lem9@users.sourceforge.net>
* db_operations.php: db comments updating broken
* libraries/relation.lib.php: bug #1159415, data dictionary broken

View File

@@ -81,6 +81,10 @@ function PMA_DBI_get_fields($database, $table, $link = NULL) {
// tbl_create + tbl_properties.inc.php, the table does not exist
$result = PMA_DBI_try_query('SHOW FULL FIELDS FROM ' . PMA_backquote($database) . '.' . PMA_backquote($table), $link);
if (!$result) {
return FALSE;
}
$fields = array();
while ($row = PMA_DBI_fetch_assoc($result)) {
$fields[] = $row;

View File

@@ -429,6 +429,7 @@ function PMA_getComments($db, $table = '') {
// MySQL 4.1.x native column comments
if (PMA_MYSQL_INT_VERSION >= 40100) {
$fields = PMA_DBI_get_fields($db, $table);
if ($fields) {
foreach($fields as $key=>$field) {
$tmp_col = $field['Field'];
if (!empty($field['Comment'])) {
@@ -436,6 +437,7 @@ function PMA_getComments($db, $table = '') {
}
}
}
}
// pmadb internal column comments
// (this function can be called even if $cfgRelation['commwork'] is