cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/3] cassandra git commit: cqlsh: Fix handling of $$-escaped strings
Date Wed, 20 Jul 2016 14:03:46 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.9 43d726be9 -> 0b49b1776
  refs/heads/trunk a6f5009f6 -> 058faff6f


cqlsh: Fix handling of $$-escaped strings

patch by Mike Adamson; reviewed by Alex Petrov for CASSANDRA-12189


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0b49b177
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0b49b177
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0b49b177

Branch: refs/heads/cassandra-3.9
Commit: 0b49b1776e5c6aa20bc2845e5b48dafe84169d46
Parents: 43d726b
Author: Mike Adamson <madamson@datastax.com>
Authored: Wed Jul 13 10:39:59 2016 +0100
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Wed Jul 20 15:02:41 2016 +0100

----------------------------------------------------------------------
 CHANGES.txt                    | 1 +
 pylib/cqlshlib/cql3handling.py | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0b49b177/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e4ef64c..ef80141 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.9
+ * cqlsh: Fix handling of $$-escaped strings (CASSANDRA-12189)
  * Fix SSL JMX requiring truststore containing server cert (CASSANDRA-12109)
 Merged from 3.0:
  * NullPointerExpception when reading/compacting table (CASSANDRA-11988)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0b49b177/pylib/cqlshlib/cql3handling.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py
index 70e12d4..c01e441 100644
--- a/pylib/cqlshlib/cql3handling.py
+++ b/pylib/cqlshlib/cql3handling.py
@@ -142,7 +142,7 @@ JUNK ::= /([ \t\r\f\v]+|(--|[/][/])[^\n\r]*([\n\r]|$)|[/][*].*?[*][/])/
;
 <stringLiteral> ::= <quotedStringLiteral>
                   | <pgStringLiteral> ;
 <quotedStringLiteral> ::= /'([^']|'')*'/ ;
-<pgStringLiteral> ::= /\$\$(?:(?!\$\$)|[^$])*\$\$/;
+<pgStringLiteral> ::= /\$\$(?:(?!\$\$).)*\$\$/;
 <quotedName> ::=    /"([^"]|"")*"/ ;
 <float> ::=         /-?[0-9]+\.[0-9]+/ ;
 <uuid> ::=          /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/
;
@@ -161,7 +161,7 @@ JUNK ::= /([ \t\r\f\v]+|(--|[/][/])[^\n\r]*([\n\r]|$)|[/][*].*?[*][/])/
;
             | "false"
             ;
 
-<unclosedPgString>::= /\$\$(?:(?!\$\$)|[^$])*/ ;
+<unclosedPgString>::= /\$\$(?:(?!\$\$).)*/ ;
 <unclosedString>  ::= /'([^']|'')*/ ;
 <unclosedName>    ::= /"([^"]|"")*/ ;
 <unclosedComment> ::= /[/][*].*$/ ;


Mime
View raw message