diff options
author | Michal Čihař <michal@cihar.com> | 2016-03-02 13:41:25 +0100 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2016-03-02 13:43:42 +0100 |
commit | d2e37de1dbec251556f35712bddcd61d24baaee6 (patch) | |
tree | db4b752477439b917532c445969503d4efebbe2a /tests/Utils/BufferedQueryTest.php | |
parent | cf246a37afde716c8d7adeba7bffcdad86ac7ccf (diff) | |
download | sql-parser-d2e37de1dbec251556f35712bddcd61d24baaee6.zip sql-parser-d2e37de1dbec251556f35712bddcd61d24baaee6.tar.gz sql-parser-d2e37de1dbec251556f35712bddcd61d24baaee6.tar.bz2 |
Fix splitting query when escaped quotes are involved
Fixes https://github.com/phpmyadmin/phpmyadmin/issues/12054
Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'tests/Utils/BufferedQueryTest.php')
-rw-r--r-- | tests/Utils/BufferedQueryTest.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/Utils/BufferedQueryTest.php b/tests/Utils/BufferedQueryTest.php index a6bf3ed..ae406a4 100644 --- a/tests/Utils/BufferedQueryTest.php +++ b/tests/Utils/BufferedQueryTest.php @@ -101,6 +101,19 @@ class BufferedQueryTest extends TestCase return array( array( + "SELECT '\'';\nSELECT '\'';", + 8, + array( + 'parse_delimiter' => true, + 'add_delimiter' => true, + ), + array( + "SELECT '\'';", + "SELECT '\'';", + ) + ), + + array( 'SELECT """""""";' . 'SELECT """\\\\"""', 8, |