Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ILIKE REGEXP workaround on oracle #26672

Merged
merged 2 commits into from
May 9, 2018
Merged

fix ILIKE REGEXP workaround on oracle #26672

merged 2 commits into from
May 9, 2018

Conversation

butonic
Copy link
Member

@butonic butonic commented Nov 21, 2016

{"Exception":"Doctrine\DBAL\Exception\DriverException","Message":"An exception occurred while executing '
			SELECT "fileid", "storage", "path", "parent", "name",
				"mimetype", "mimepart", "size", "mtime", "encrypted",
				"etag", "permissions", "checksum"
			FROM "oc_filecache"
			WHERE "storage" = ? AND REGEXP_LIKE("name", '^' || REPLACE(?, '%', '.*') || '$', 'i')' with params ["875", "[#IM-1721151] -EILT- B2B _ XXX Anmeldun....pdf.v%.d1452498830"]:\

ORA-12728: invalid range in regular expression","Code":0,"Trace":"#0 

Analysis

It seems doctrine does not escape the regex parameter. An ILIKE becomes REGEXP_LIKE in https://github.com/owncloud/core/blob/master/lib/private/DB/AdapterOCI8.php#L44 or https://github.com/owncloud/core/blob/master/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php#L161

The only ILIKE in OC\Files\Cache\Cache is https://github.com/owncloud/core/blob/master/lib/private/Files/Cache/Cache.php#L595
and the search pattern is normalized in https://github.com/owncloud/core/blob/master/lib/private/Files/Cache/Cache.php#L833:

	public function normalize($path) {
		return trim(\OC_Util::normalizeUnicode($path), '/');
	}

Conclusion

@butonic butonic added this to the 9.2 milestone Nov 21, 2016
@butonic butonic changed the title fix ILIKE REGEXP workaround on oracle [WIP] fix ILIKE REGEXP workaround on oracle Nov 22, 2016
@butonic
Copy link
Member Author

butonic commented Nov 22, 2016

These won't work:

$statement = preg_replace('/`(\w+)` ILIKE \?/', 'REGEXP_LIKE(`$1`, \'^\' || REPLACE(REGEXP_REPLACE(?, \'([\\*+?|^$.[\](){}])\', \'\\\1\'), \'%\', \'.*\') || \'$\', \'i\')', $statement); // ORA-12726: unmatched bracket in regular expression
$statement = preg_replace('/`(\w+)` ILIKE \?/', 'REGEXP_LIKE(`$1`, \'^\' || REPLACE(REGEXP_REPLACE(?, \'(\]|[\\*+?|^$.[(){}])\', \'\\\1\'), \'%\', \'.*\') || \'$\', \'i\')', $statement); // ORA-12726: unmatched bracket in regular expression

because ... oracle ...

for reference see
see https://developer.mozilla.org/de/docs/Web/JavaScript/Guide/Regular_Expressions
and https://docs.oracle.com/cd/B12037_01/server.101/b10759/ap_posix001.htm#i690819

  • check why sqlite does not like searching for f[o.o%ba-r:

@butonic
Copy link
Member Author

butonic commented Dec 13, 2016

@DeepDiver1975 do we know why jenkins sometimes fails with

PHP Warning:  Unknown: Cannot destroy the zip context in Unknown on line 0

after successfully running the php testsuite?

@DeepDiver1975
Copy link
Member

Afaik this warning is not causing the break .... at least not in the past

@butonic
Copy link
Member Author

butonic commented Mar 2, 2017

14:39:59 There were 20 failures:
14:39:59 
14:39:59 1) Test\Files\Cache\CacheTest::testSearch
14:39:59 Failed asserting that 0 matches expected 1.
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Files/Cache/CacheTest.php:324
14:39:59 
14:39:59 2) Test\Files\Cache\MoveFromCacheTraitTest::testSearch
14:39:59 Failed asserting that 0 matches expected 1.
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Files/Cache/CacheTest.php:324
14:39:59 
14:39:59 3) Test\Files\Cache\Wrapper\CacheJailTest::testSearch
14:39:59 Failed asserting that 0 matches expected 1.
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Files/Cache/CacheTest.php:324
14:39:59 
14:39:59 4) Test\Files\Cache\Wrapper\CachePermissionsMaskTest::testSearch
14:39:59 Failed asserting that 0 matches expected 1.
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Files/Cache/CacheTest.php:324
14:39:59 
14:39:59 5) Test\Files\ViewTest::testSearchNotOutsideView
14:39:59 Failed asserting that actual size 0 matches expected size 1.
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Files/ViewTest.php:624
14:39:59 
14:39:59 6) Test\Repair\RepairMimeTypesTest::testRenameOfficeMimeTypes
14:39:59 Failed asserting that two strings are equal.
14:39:59 --- Expected
14:39:59 +++ Actual
14:39:59 @@ @@
14:39:59 -'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
14:39:59 +'application/msword'
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:89
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:120
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:145
14:39:59 
14:39:59 7) Test\Repair\RepairMimeTypesTest::testRenameFontsMimeTypes
14:39:59 Failed asserting that two strings are equal.
14:39:59 --- Expected
14:39:59 +++ Actual
14:39:59 @@ @@
14:39:59 -'application/x-font'
14:39:59 +'application/octet-stream'
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:89
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:120
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:164
14:39:59 
14:39:59 8) Test\Repair\RepairMimeTypesTest::testRenameAPKMimeType
14:39:59 Failed asserting that two strings are equal.
14:39:59 --- Expected
14:39:59 +++ Actual
14:39:59 @@ @@
14:39:59 -'application/vnd.android.package-archive'
14:39:59 +'application/octet-stream'
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:89
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:120
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:183
14:39:59 
14:39:59 9) Test\Repair\RepairMimeTypesTest::testRenamePostscriptMimeType
14:39:59 Failed asserting that two strings are equal.
14:39:59 --- Expected
14:39:59 +++ Actual
14:39:59 @@ @@
14:39:59 -'application/postscript'
14:39:59 +'application/octet-stream'
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:89
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:120
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:200
14:39:59 
14:39:59 10) Test\Repair\RepairMimeTypesTest::testRenameRawMimeType
14:39:59 Failed asserting that two strings are equal.
14:39:59 --- Expected
14:39:59 +++ Actual
14:39:59 @@ @@
14:39:59 -'image/x-dcraw'
14:39:59 +'application/octet-stream'
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:89
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:120
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:249
14:39:59 
14:39:59 11) Test\Repair\RepairMimeTypesTest::testRename3dImagesMimeType
14:39:59 Failed asserting that two strings are equal.
14:39:59 --- Expected
14:39:59 +++ Actual
14:39:59 @@ @@
14:39:59 -'image/jpeg'
14:39:59 +'application/octet-stream'
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:89
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:120
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:266
14:39:59 
14:39:59 12) Test\Repair\RepairMimeTypesTest::testRenameConfMimeType
14:39:59 Failed asserting that two strings are equal.
14:39:59 --- Expected
14:39:59 +++ Actual
14:39:59 @@ @@
14:39:59 -'text/plain'
14:39:59 +'application/octet-stream'
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:89
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:120
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:283
14:39:59 
14:39:59 13) Test\Repair\RepairMimeTypesTest::testRenameYamlMimeType
14:39:59 Failed asserting that two strings are equal.
14:39:59 --- Expected
14:39:59 +++ Actual
14:39:59 @@ @@
14:39:59 -'application/yaml'
14:39:59 +'application/octet-stream'
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:89
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:120
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:300
14:39:59 
14:39:59 14) Test\Repair\RepairMimeTypesTest::testRenameJavaMimeType
14:39:59 Failed asserting that two strings are equal.
14:39:59 --- Expected
14:39:59 +++ Actual
14:39:59 @@ @@
14:39:59 -'text/x-java-source'
14:39:59 +'application/octet-stream'
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:89
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:120
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:317
14:39:59 
14:39:59 15) Test\Repair\RepairMimeTypesTest::testRenameHppMimeType
14:39:59 Failed asserting that two strings are equal.
14:39:59 --- Expected
14:39:59 +++ Actual
14:39:59 @@ @@
14:39:59 -'text/x-h'
14:39:59 +'application/octet-stream'
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:89
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:120
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:332
14:39:59 
14:39:59 16) Test\Repair\RepairMimeTypesTest::testRenameRssMimeType
14:39:59 Failed asserting that two strings are equal.
14:39:59 --- Expected
14:39:59 +++ Actual
14:39:59 @@ @@
14:39:59 -'application/rss+xml'
14:39:59 +'application/octet-stream'
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:89
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:120
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:347
14:39:59 
14:39:59 17) Test\Repair\RepairMimeTypesTest::testRenameRtfMimeType
14:39:59 Failed asserting that two strings are equal.
14:39:59 --- Expected
14:39:59 +++ Actual
14:39:59 @@ @@
14:39:59 -'text/rtf'
14:39:59 +'application/octet-stream'
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:89
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:120
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:362
14:39:59 
14:39:59 18) Test\Repair\RepairMimeTypesTest::testRenameRichDocumentsMimeTypes
14:39:59 Failed asserting that two strings are equal.
14:39:59 --- Expected
14:39:59 +++ Actual
14:39:59 @@ @@
14:39:59 -'application/vnd.lotus-wordpro'
14:39:59 +'application/octet-stream'
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:89
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:120
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:383
14:39:59 
14:39:59 19) Test\Repair\RepairMimeTypesTest::testRenameOfficeMimeTypesWhenExist
14:39:59 Failed asserting that two strings are equal.
14:39:59 --- Expected
14:39:59 +++ Actual
14:39:59 @@ @@
14:39:59 -'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
14:39:59 +'application/msword'
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:89
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:120
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:422
14:39:59 
14:39:59 20) Test\Repair\RepairMimeTypesTest::testRenameFontsMimeTypesWhenExist
14:39:59 Failed asserting that two strings are equal.
14:39:59 --- Expected
14:39:59 +++ Actual
14:39:59 @@ @@
14:39:59 -'application/font-sfnt'
14:39:59 +'application/wrong'
14:39:59 
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:89
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:120
14:39:59 /var/lib/jenkins/workspace/owncloud-core_core_PR-26672-MOT6RLJMXNNQWBXU5W76YB25HCHZAHEOX72LXNARI2G3M7QUPUPQ/tests/lib/Repair/RepairMimeTypesTest.php:453
14:39:59 
14:39:59 --
14:39:59 

@PVince81 PVince81 modified the milestones: backlog, 10.0 Apr 11, 2017
@PVince81
Copy link
Contributor

unfinished, moving to backlog until there is time

@PVince81
Copy link
Contributor

needs conflict resolution

@butonic butonic force-pushed the oracle-ilike-fix branch 2 times, most recently from 1548009 to 6bd1e61 Compare April 26, 2018 21:59
@codecov
Copy link

codecov bot commented Apr 26, 2018

Codecov Report

Merging #26672 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##             master   #26672    +/-   ##
==========================================
  Coverage     62.63%   62.63%            
- Complexity    18255    18416   +161     
==========================================
  Files          1145     1145            
  Lines         68472    68472            
  Branches       1234     1234            
==========================================
  Hits          42890    42890            
  Misses        25221    25221            
  Partials        361      361
Flag Coverage Δ Complexity Δ
#javascript 52.05% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 63.84% <100%> (ø) 18416 <0> (+161) ⬆️
Impacted Files Coverage Δ Complexity Δ
...Builder/ExpressionBuilder/OCIExpressionBuilder.php 85.18% <100%> (ø) 18 <0> (ø) ⬇️
lib/private/DB/AdapterOCI8.php 86.66% <100%> (ø) 4 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 83113f2...384eed3. Read the comment docs.

@phil-davis
Copy link
Contributor

phil-davis commented Apr 27, 2018

Needs rebase.

 `apiProvisioning` suite is not found or has not been properly registered. 

We have made Provisioning V2 tests as well as Provisioning V1. There are now 2 suites - apiProvisioning-v1 and apiProvisioning-v1

Between git and drone they are too stupid and do not run your code from the point on master where it branches from.

@butonic butonic force-pushed the oracle-ilike-fix branch 2 times, most recently from 45fa905 to 7d9da2d Compare April 27, 2018 11:06
@butonic
Copy link
Member Author

butonic commented Apr 27, 2018

switched from REGEXP_LIKE(...) to LOWER("name") LIKE LOWER('%pattern%'):

  • Queries using LOWER do not need a full table scan when adding a function based index
  • REGEXP_LIKE can also use function based indexes, but then a simple LOWER is way easier to understand and a lot less error prone when trying to build a regex ... actually during development I managed to build a query that would make doctrines query parameter replacement miss a few parameters ... because their regex does not correctly match tokens when too much single tick escaping is going on ...
  • add function based index as oracle specific migration in a subsequent PR

@butonic butonic changed the title [WIP] fix ILIKE REGEXP workaround on oracle fix ILIKE REGEXP workaround on oracle Apr 27, 2018
@patrickjahns
Copy link
Contributor

@ownclouders rebase

@ownclouders
Copy link
Contributor

Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently ⚠️

@ownclouders
Copy link
Contributor

Automated rebase with GitMate.io was successful! 🎉

@tomneedham tomneedham merged commit 422d179 into master May 9, 2018
@tomneedham
Copy link
Contributor

backport?

@tomneedham tomneedham deleted the oracle-ilike-fix branch May 9, 2018 19:54
@butonic
Copy link
Member Author

butonic commented May 17, 2018

to oc10, yes. will do

@PVince81 PVince81 modified the milestones: development, QA Jun 13, 2018
@lock
Copy link

lock bot commented Jul 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants