aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB/AdapterMySQL.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/DB/AdapterMySQL.php')
-rw-r--r--lib/private/DB/AdapterMySQL.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/DB/AdapterMySQL.php b/lib/private/DB/AdapterMySQL.php
index 3e2fceda8db..0c0c6b31021 100644
--- a/lib/private/DB/AdapterMySQL.php
+++ b/lib/private/DB/AdapterMySQL.php
@@ -39,7 +39,8 @@ class AdapterMySQL extends Adapter {
}
public function fixupStatement($statement) {
- $statement = str_replace(' ILIKE ', ' COLLATE utf8_general_ci LIKE ', $statement);
+ $characterSet = \OC::$server->getConfig()->getSystemValue('mysql.utf8mb4', false) ? 'utf8mb4' : 'utf8';
+ $statement = str_replace(' ILIKE ', ' COLLATE ' . $characterSet . '_general_ci LIKE ', $statement);
return $statement;
}
}