Added some checks to avoid trying to use relations when no table (bug #761835).
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2003-06-27 Michal Cihar <nijel@users.sourceforge.net>
|
||||||
|
* libraries/display_tbl.lib.php3, libraries/relation.lib.php3: Added some
|
||||||
|
checks to avoid trying to use relations when no table (bug #761835).
|
||||||
|
|
||||||
2003-06-27 Marc Delisle <lem9@users.sourceforge.net>
|
2003-06-27 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* sql.php3: bug 760648: incorrect result count on MySQL 3
|
* sql.php3: bug 760648: incorrect result count on MySQL 3
|
||||||
|
|
||||||
|
@@ -1625,6 +1625,9 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
|
|||||||
$tabs = '(\'' . join('\',\'', $target) . '\')';
|
$tabs = '(\'' . join('\',\'', $target) . '\')';
|
||||||
|
|
||||||
if ($cfgRelation['displaywork']) {
|
if ($cfgRelation['displaywork']) {
|
||||||
|
if (empty($table)) {
|
||||||
|
$exist_rel = FALSE;
|
||||||
|
} else {
|
||||||
$exist_rel = PMA_getForeigners($db, $table, '', 'both');
|
$exist_rel = PMA_getForeigners($db, $table, '', 'both');
|
||||||
if ($exist_rel) {
|
if ($exist_rel) {
|
||||||
while (list($master_field,$rel) = each($exist_rel)) {
|
while (list($master_field,$rel) = each($exist_rel)) {
|
||||||
@@ -1636,6 +1639,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
|
|||||||
} // end while
|
} // end while
|
||||||
} // end if
|
} // end if
|
||||||
} // end if
|
} // end if
|
||||||
|
} // end if
|
||||||
// end 2b
|
// end 2b
|
||||||
|
|
||||||
// 3. ----- Displays the results table -----
|
// 3. ----- Displays the results table -----
|
||||||
|
@@ -305,7 +305,7 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){
|
|||||||
} // end while
|
} // end while
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($source == 'both' || $source == 'innodb') {
|
if (($source == 'both' || $source == 'innodb') && !empty($table)) {
|
||||||
$show_create_table_query = 'SHOW CREATE TABLE '
|
$show_create_table_query = 'SHOW CREATE TABLE '
|
||||||
. PMA_backquote($db) . '.' . PMA_backquote($table);
|
. PMA_backquote($db) . '.' . PMA_backquote($table);
|
||||||
$show_create_table_res = PMA_mysql_query($show_create_table_query);
|
$show_create_table_res = PMA_mysql_query($show_create_table_query);
|
||||||
|
Reference in New Issue
Block a user