bug #1439002, drop basetable of a view gives error on overview

This commit is contained in:
Marc Delisle
2006-03-21 18:07:43 +00:00
parent 95fe3cecab
commit f2d706b637
2 changed files with 10 additions and 4 deletions

View File

@@ -8,6 +8,8 @@ $Source$
2006-03-21 Marc Delisle <lem9@users.sourceforge.net>
* server_privileges.php: bug #1427707 Priv->user->pass radio buttons
unselectable: Sebastian's fix was not in HEAD
* libraries/Table.class.php: bug #1439002, drop basetable of a view gives
error on overview Table.class.php
2006-03-20 Alexander M. Turek <me@derrabus.de>
* Documentation.html: Added a note about Connector/PHP to FAQ 1.17.

View File

@@ -366,13 +366,17 @@ class PMA_Table {
. PMA_backquote($table));
// since counting all rows of a view could be too long
} else {
$result = PMA_DBI_query(
// try_query because it can fail ( a VIEW was based on
// a table that no longer exists)
$result = PMA_DBI_try_query(
'SELECT 1 FROM ' . PMA_backquote($db) . '.'
. PMA_backquote($table) . ' LIMIT '
. $GLOBALS['cfg']['MaxExactCount'],
null, PMA_DBI_QUERY_STORE);
$row_count = PMA_DBI_num_rows($result);
PMA_DBI_free_result($result);
if (!PMA_DBI_getError()) {
$row_count = PMA_DBI_num_rows($result);
PMA_DBI_free_result($result);
}
}
}
@@ -928,4 +932,4 @@ class PMA_Table {
return true;
}
}
?>
?>