patch #3150164 [structure] Ordering by size gives incorrect results

This commit is contained in:
Madhura Jayaratne
2011-01-03 08:10:49 -05:00
committed by Marc Delisle
parent ba2326d703
commit 066b746bef
2 changed files with 12 additions and 2 deletions

View File

@@ -8,6 +8,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
3.3.10.0 (not yet released)
- patch #3147400 [structure] Aria table size printed as unknown,
thanks to erickoh75 - erickoh75
- patch #3150164 [structure] Ordering by size gives incorrect results,
thanks to Madhura Jayaratne - madhuracj
3.3.9.0 (2011-01-03)
- bug [doc] Fix references to MySQL doc

View File

@@ -367,8 +367,16 @@ function PMA_DBI_get_tables_full($database, $table = false, $tbl_is_group = fals
} else {
// Prepare to sort by creating array of the selected sort
// value to pass to array_multisort
foreach ($each_tables as $table_name => $table_data) {
${$sort_by}[$table_name] = strtolower($table_data[$sort_by]);
// Size = Data_length + Index_length
if ($sort_by == 'Data_length') {
foreach ($each_tables as $table_name => $table_data) {
${$sort_by}[$table_name] = strtolower($table_data['Data_length'] + $table_data['Index_length']);
}
} else {
foreach ($each_tables as $table_name => $table_data) {
${$sort_by}[$table_name] = strtolower($table_data[$sort_by]);
}
}
if ($sort_order == 'DESC') {