Skip to content

Commit

Permalink
bug #1821264 [display] MaxTableList and INFORMATION_SCHEMA
Browse files Browse the repository at this point in the history
  • Loading branch information
lem9 committed Dec 27, 2007
1 parent bbc552d commit 13538ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -22,6 +22,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #1813508 [login] Missing parameter: field after re-login
- bug #1710144 [parser] Space after COUNT breaks Export but not Query
- bug #1783620 [parser] Subquery results without "as" are ignored
- bug #1821264 [display] MaxTableList and INFORMATION_SCHEMA

2.11.3.0 (2007-12-08)
- patch #1818389 to remove a notice (failed to flush buffer), thanks to
Expand Down
9 changes: 7 additions & 2 deletions libraries/database_interface.lib.php
Expand Up @@ -186,7 +186,7 @@ function PMA_DBI_get_tables($database, $link = null)

/**
* returns array of all tables in given db or dbs
* this function expects unqoted names:
* this function expects unquoted names:
* RIGHT: my_database
* WRONG: `my_database`
* WRONG: my\_database
Expand All @@ -212,12 +212,13 @@ function PMA_DBI_get_tables($database, $link = null)
* @param string $table table
* @param boolean|string $tbl_is_group $table is a table group
* @param resource $link mysql link
* @param integer $limit_offset zero-based offset for the count
* @param boolean|integer $limit_count number of tables to return
* @return array list of tables in given db(s)
*/
function PMA_DBI_get_tables_full($database, $table = false,
$tbl_is_group = false, $link = null, $limit_offset = 0, $limit_count = false)
{
// currently supported for MySQL >= 50002
if (true === $limit_count) {
$limit_count = $GLOBALS['cfg']['MaxTableList'];
}
Expand Down Expand Up @@ -302,6 +303,10 @@ function PMA_DBI_get_tables_full($database, $table = false,
. PMA_backquote($each_database) . ';';
}
$each_tables = PMA_DBI_fetch_result($sql, 'Name', null, $link);
if ($limit_count) {
$each_tables = array_slice($each_tables, $limit_offset, $limit_count);
}

foreach ($each_tables as $table_name => $each_table) {
if ('comment' === $tbl_is_group
&& 0 === strpos($each_table['Comment'], $table))
Expand Down

0 comments on commit 13538ae

Please sign in to comment.