From cb8bef1f37d6216c0f7905f6e46500e8352fb5c8 Mon Sep 17 00:00:00 2001
From: Joas Schilling <coding@schilljs.com>
Date: Fri, 6 Nov 2020 15:31:28 +0100
Subject: [PATCH] Fix iLike() falsely turning escaped % and _ into wildcards

Signed-off-by: Joas Schilling <coding@schilljs.com>
---
 .../QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php   | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php
index e8e436ba5bd..f41242fdc60 100644
--- a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php
+++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php
@@ -189,8 +189,6 @@ class OCIExpressionBuilder extends ExpressionBuilder {
 	 * @inheritdoc
 	 */
 	public function iLike($x, $y, $type = null) {
-		$x = $this->helper->quoteColumnName($x);
-		$y = $this->helper->quoteColumnName($y);
-		return new QueryFunction('REGEXP_LIKE(' . $x . ', \'^\' || REPLACE(REPLACE(' . $y . ', \'%\', \'.*\'), \'_\', \'.\') || \'$\', \'i\')');
+		return $this->like($this->functionBuilder->lower($x), $this->functionBuilder->lower($y));
 	}
 }
-- 
GitLab