bug #3315720 [search] Fix search in non unicode tables

We need to convert field to unicode because the connection is in utf-8
and we might give utf-8 input as well.
This commit is contained in:
Michal Čihař
2011-06-14 09:15:07 +02:00
parent c4c8fcb2b5
commit 8cebaca19b
2 changed files with 2 additions and 1 deletions

View File

@@ -9,6 +9,7 @@
- patch #3311539 [edit] Inline edit does not escape backslashes - patch #3311539 [edit] Inline edit does not escape backslashes
- bug #3313210 [interface] Columns class sometimes changed for nothing - bug #3313210 [interface] Columns class sometimes changed for nothing
- patch #3313326 [interface] Some tooltips do not disappear - patch #3313326 [interface] Some tooltips do not disappear
- bug #3315720 [search] Fix search in non unicode tables
3.4.2.0 (2011-06-07) 3.4.2.0 (2011-06-07)
- bug #3301249 [interface] Iconic table operations does not remove inline edit label - bug #3301249 [interface] Iconic table operations does not remove inline edit label

View File

@@ -178,7 +178,7 @@ if (isset($_REQUEST['submit_search'])) {
$thefieldlikevalue = array(); $thefieldlikevalue = array();
foreach ($tblfields as $tblfield) { foreach ($tblfields as $tblfield) {
if (! isset($field) || strlen($field) == 0 || $tblfield == $field) { if (! isset($field) || strlen($field) == 0 || $tblfield == $field) {
$thefieldlikevalue[] = PMA_backquote($tblfield) $thefieldlikevalue[] = 'CONVERT(' . PMA_backquote($tblfield) . ' USING utf8)'
. ' ' . $like_or_regex . ' ' . ' ' . $like_or_regex . ' '
. "'" . $automatic_wildcard . "'" . $automatic_wildcard
. $search_word . $search_word