diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 81a85eb3ad..b0d1ee66be 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -143,6 +143,7 @@
[Fix] Apply append_sid() to newest/latest post links in viewforum/search and UCP main module. (Bug #26815)
[Fix] Do not create thumbnail if thumbnail would've the same size as the original image. (Bug #30725)
[Fix] Ability to vote in poll is now required for the ability to change existing vote. (Bug #38925)
+ [Fix] Search for 'topic title only' and 'first post' should work again for non-mysql dbms. (Bug #40605)
[Change] Default difference view is now 'inline' instead of 'side by side'
[Change] Added new option for merging differences to conflicting files in automatic updater
[Change] Add link to user profile in the MCP for user notes and warn user.
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php
index fb4975d30b..8df5ddfbae 100644
--- a/phpBB/includes/search/fulltext_native.php
+++ b/phpBB/includes/search/fulltext_native.php
@@ -645,6 +645,14 @@ class fulltext_native extends search_backend
$sql = '';
$sql_array_count = $sql_array;
+ if ($left_join_topics)
+ {
+ $sql_array_count['LEFT_JOIN'][] = array(
+ 'FROM' => array(TOPICS_TABLE => 't'),
+ 'ON' => 'p.topic_id = t.topic_id'
+ );
+ }
+
switch ($db->sql_layer)
{
case 'mysql4':