problem with getting comments when creating a new table under MySQL 4.1.x with extension mysql
This commit is contained in:
@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$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>
|
2005-03-09 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* db_operations.php: db comments updating broken
|
* db_operations.php: db comments updating broken
|
||||||
* libraries/relation.lib.php: bug #1159415, data dictionary broken
|
* libraries/relation.lib.php: bug #1159415, data dictionary broken
|
||||||
|
@@ -81,6 +81,10 @@ function PMA_DBI_get_fields($database, $table, $link = NULL) {
|
|||||||
// tbl_create + tbl_properties.inc.php, the table does not exist
|
// 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);
|
$result = PMA_DBI_try_query('SHOW FULL FIELDS FROM ' . PMA_backquote($database) . '.' . PMA_backquote($table), $link);
|
||||||
|
|
||||||
|
if (!$result) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
$fields = array();
|
$fields = array();
|
||||||
while ($row = PMA_DBI_fetch_assoc($result)) {
|
while ($row = PMA_DBI_fetch_assoc($result)) {
|
||||||
$fields[] = $row;
|
$fields[] = $row;
|
||||||
|
@@ -429,6 +429,7 @@ function PMA_getComments($db, $table = '') {
|
|||||||
// MySQL 4.1.x native column comments
|
// MySQL 4.1.x native column comments
|
||||||
if (PMA_MYSQL_INT_VERSION >= 40100) {
|
if (PMA_MYSQL_INT_VERSION >= 40100) {
|
||||||
$fields = PMA_DBI_get_fields($db, $table);
|
$fields = PMA_DBI_get_fields($db, $table);
|
||||||
|
if ($fields) {
|
||||||
foreach($fields as $key=>$field) {
|
foreach($fields as $key=>$field) {
|
||||||
$tmp_col = $field['Field'];
|
$tmp_col = $field['Field'];
|
||||||
if (!empty($field['Comment'])) {
|
if (!empty($field['Comment'])) {
|
||||||
@@ -436,6 +437,7 @@ function PMA_getComments($db, $table = '') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// pmadb internal column comments
|
// pmadb internal column comments
|
||||||
// (this function can be called even if $cfgRelation['commwork'] is
|
// (this function can be called even if $cfgRelation['commwork'] is
|
||||||
|
Reference in New Issue
Block a user