Cannot sort twice on a column when the table name contains accents

This commit is contained in:
Marc Delisle
2008-09-11 17:03:49 +00:00
parent 0a1a6c8bcc
commit b2a2454f20
3 changed files with 10 additions and 5 deletions

View File

@@ -82,6 +82,8 @@ danbarry
thanks to Charles Suh - cws125 thanks to Charles Suh - cws125
- bug #2080963 [charset] Clarify doc and improved code, thanks to - bug #2080963 [charset] Clarify doc and improved code, thanks to
Victor Volkov - hanut Victor Volkov - hanut
- bug [charset] Cannot sort twice on a column when the table name
contains accents
2.11.9.0 (2008-08-28) 2.11.9.0 (2008-08-28)
- bug #2031221 [auth] Links to version number on login screen - bug #2031221 [auth] Links to version number on login screen

View File

@@ -1589,9 +1589,12 @@ if (! defined('PMA_MINIMUM_COMMON')) {
} }
if ($seen_order) { if ($seen_order) {
$seen_order_by = TRUE; $seen_order_by = TRUE;
// here we assume that the ORDER BY keywords took // Here we assume that the ORDER BY keywords took
// exactly 8 characters // exactly 8 characters.
$unsorted_query = substr($arr['raw'], 0, $arr[$i]['pos'] - 8); // We use PMA_substr() to be charset-safe; otherwise
// if the table name contains accents, the unsorted
// query would be missing some characters.
$unsorted_query = PMA_substr($arr['raw'], 0, $arr[$i]['pos'] - 8);
$in_order_by = TRUE; $in_order_by = TRUE;
$order_by_clause = ''; $order_by_clause = '';
} }