Skip to content

Commit 21f7b11

Browse files
authored
Merge pull request #187 from nextcloud/fix-sqlite-parameter-detection
Fix named parameter detection on SQLite
2 parents 2146ef4 + beeed0b commit 21f7b11

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

doctrine/dbal/lib/Doctrine/DBAL/SQLParserUtils.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ class SQLParserUtils
3232
const NAMED_TOKEN = '(?<!:):[a-zA-Z_][a-zA-Z0-9_]*';
3333

3434
// Quote characters within string literals can be preceded by a backslash.
35-
const ESCAPED_SINGLE_QUOTED_TEXT = "(?:'(?:\\\\\\\\)+'|'(?:[^'\\\\]|\\\\'?|'')*')";
36-
const ESCAPED_DOUBLE_QUOTED_TEXT = '(?:"(?:\\\\\\\\)+"|"(?:[^"\\\\]|\\\\"?)*")';
37-
const ESCAPED_BACKTICK_QUOTED_TEXT = '(?:`(?:\\\\\\\\)+`|`(?:[^`\\\\]|\\\\`?)*`)';
35+
const ESCAPED_SINGLE_QUOTED_TEXT = "(?:'(?:\\\\\\\\)+'|(?<=ESCAPE\\s)'(?:\\\\)+'|'(?:[^'\\\\]|\\\\'?|'')*')";
36+
const ESCAPED_DOUBLE_QUOTED_TEXT = '(?:"(?:\\\\\\\\)+"|(?<=ESCAPE\\s)"(?:\\\\)+"|"(?:[^"\\\\]|\\\\"?)*")';
37+
const ESCAPED_BACKTICK_QUOTED_TEXT = '(?:`(?:\\\\\\\\)+`|(?<=ESCAPE\\s)`(?:\\\\)+`|`(?:[^`\\\\]|\\\\`?)*`)';
3838
const ESCAPED_BRACKET_QUOTED_TEXT = '(?<!\bARRAY)\[(?:[^\]])*\]';
3939

4040
/**

patches.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Patches:
22

33
- patchwork/utf8: Remove trigger_error() that spammed the error log
44
- Doctrine: fix error handling for not null columns on some mysql servers https://github.com/doctrine/dbal/pull/2422
5+
- Doctrine: fix named parameter detection on sqlite with like queries https://github.com/doctrine/dbal/pull/3104
56
- SabreDAV: Make sure that files that are children of directories, are reported as files https://github.com/fruux/sabre-dav/issues/982
67
- SabreDAV: Don't open the file on HEAD requests https://github.com/sabre-io/dav/pull/1058
78
- SabreDAV: Properly parse carddav address-data https://github.com/sabre-io/dav/pull/1025

0 commit comments

Comments
 (0)