Skip to content

Commit

Permalink
bug #3315720 [search] Fix search in non unicode tables
Browse files Browse the repository at this point in the history
We need to convert field to unicode because the connection is in utf-8
and we might give utf-8 input as well.
  • Loading branch information
nijel committed Jun 14, 2011
1 parent c4c8fcb commit 8cebaca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- patch #3311539 [edit] Inline edit does not escape backslashes
- bug #3313210 [interface] Columns class sometimes changed for nothing
- patch #3313326 [interface] Some tooltips do not disappear
- bug #3315720 [search] Fix search in non unicode tables

3.4.2.0 (2011-06-07)
- bug #3301249 [interface] Iconic table operations does not remove inline edit label
Expand Down
2 changes: 1 addition & 1 deletion db_search.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ function PMA_getSearchSqls($table, $field, $search_str, $search_option)
$thefieldlikevalue = array();
foreach ($tblfields as $tblfield) {
if (! isset($field) || strlen($field) == 0 || $tblfield == $field) {
$thefieldlikevalue[] = PMA_backquote($tblfield)
$thefieldlikevalue[] = 'CONVERT(' . PMA_backquote($tblfield) . ' USING utf8)'
. ' ' . $like_or_regex . ' '
. "'" . $automatic_wildcard
. $search_word
Expand Down

0 comments on commit 8cebaca

Please sign in to comment.