Fix like escaping for DB2, Oracle and MySql (#1162)

* Extended test case to show problem

* FIX: Proper escaping of backslash in like/contains queries

* Had to replace "like ?" assertions in tests with "like " as mysql will do a "like binary ? escape'|'" now to be case sensitive
This commit is contained in:
Roland Praml
2017-10-06 09:46:56 +13:00
committed by Rob Bygrave
parent e4eca4bbe9
commit 1909ba1557
15 changed files with 53 additions and 19 deletions
@@ -78,7 +78,7 @@ public class TestBatchLazyWithCacheHits extends BaseTestCase {
// batch lazy loading into cache
assertThat(sql).hasSize(2);
assertThat(sql.get(0)).contains("from uuone t0 where t0.name like ?");
assertThat(sql.get(0)).contains("from uuone t0 where t0.name like ");
assertThat(sql.get(1)).contains("from uuone t0 where t0.id in (?,");
statistics = beanCache.getStatistics(true);