Skip to content

Commit b53aaa5

Browse files
committed
Remove explicit collations in tag queries
1 parent 77d0cfd commit b53aaa5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qa-include/db/selects.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ function qa_db_tag_recent_qs_selectspec($voteuserid, $tag, $start, $full = false
12181218
$selectspec = qa_db_posts_basic_selectspec($voteuserid, $full);
12191219

12201220
// use two tests here - one which can use the index, and the other which narrows it down exactly - then limit to 1 just in case
1221-
$selectspec['source'] .= " JOIN (SELECT postid FROM ^posttags WHERE wordid=(SELECT wordid FROM ^words WHERE word=$ AND word=$ COLLATE utf8_bin LIMIT 1) ORDER BY postcreated DESC LIMIT #,#) y ON ^posts.postid=y.postid";
1221+
$selectspec['source'] .= " JOIN (SELECT postid FROM ^posttags WHERE wordid=(SELECT wordid FROM ^words WHERE word=$ AND word=$ LIMIT 1) ORDER BY postcreated DESC LIMIT #,#) y ON ^posts.postid=y.postid";
12221222
array_push($selectspec['arguments'], $tag, qa_strtolower($tag), $start, $count);
12231223
$selectspec['sortdesc'] = 'created';
12241224

@@ -1235,7 +1235,7 @@ function qa_db_tag_word_selectspec($tag)
12351235
{
12361236
return array(
12371237
'columns' => array('wordid', 'word', 'tagcount'),
1238-
'source' => '^words WHERE word=$ AND word=$ COLLATE utf8_bin',
1238+
'source' => '^words WHERE word=$ AND word=$',
12391239
'arguments' => array($tag, qa_strtolower($tag)),
12401240
'single' => true,
12411241
);

0 commit comments

Comments
 (0)