Oznogon has uploaded a new change for review. https://gerrit.wikimedia.org/r/225715
Change subject: Fix case conversion issues. ...................................................................... Fix case conversion issues. As reported by Dominik Maus on 22 June 2015 at https://www.mediawiki.org/wiki/Extension_talk:LinkSuggest#MW_1.25.1_fixes > On the two MySQL queries in LinkSuggest.class.php, columns are > converted using LOWER(). Both columns, qc_title and page_title are > varbinary fields. According to the MySQL reference, binary strings are > not acknowledged by LOWER() which always results in an empty search > result. > > **Workaround/fix**: use CONVERT() to convert the binary string into > non-binary. Change-Id: Ic95dd450cf684a7ec65bf680f24f522b83fa2e06 --- M LinkSuggest.class.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LinkSuggest refs/changes/15/225715/1 diff --git a/LinkSuggest.class.php b/LinkSuggest.class.php index 9197f22..3c52bc1 100644 --- a/LinkSuggest.class.php +++ b/LinkSuggest.class.php @@ -139,7 +139,7 @@ 'qc_namespace = page_namespace', 'page_is_redirect' => 0, 'qc_type' => 'Mostlinked', - 'LOWER(qc_title)' . $dbr->buildLike( $query, $dbr->anyString() ), + 'LOWER(CONVERT(qc_title using utf8))' . $dbr->buildLike( $query, $dbr->anyString() ), 'qc_namespace' => $namespaces ), __METHOD__, @@ -154,7 +154,7 @@ 'page', array( 'page_namespace', 'page_title' ), array( - 'LOWER(page_title)' . $dbr->buildLike( $query, $dbr->anyString() ), + 'LOWER(CONVERT(page_title using utf8))' . $dbr->buildLike( $query, $dbr->anyString() ), 'page_is_redirect' => 0, 'page_namespace' => $namespaces ), @@ -210,4 +210,4 @@ return str_replace( '_', ' ', $title ); } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/225715 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic95dd450cf684a7ec65bf680f24f522b83fa2e06 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/LinkSuggest Gerrit-Branch: master Gerrit-Owner: Oznogon <garr...@oznogon.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits