Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-2492

add an escapeSQLString function and fix unescapeSQLString

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 0.7.5
    • None
    • None
    • Low

    Description

      CliUtils.unescapeSqlString repeats the escape character e.g.

      "my \\t tab" becomes "my \tt"

      because i is not bumped when an escape is processed.

      Also for Cassandra-2221 I need a function to escape strings back so they will work if processed by the cli again.

      There are a number of non standard escapes which I assume is a hang over from is original source https://github.com/apache/cassandra/blob/1aeca2b6257b0ad6680080b1756edf7ee9acf8c8/src/java/org/apache/cassandra/cli/CliUtils.java

      Will change to use the StringEscapeUtils class

      Attachments

        Activity

          People

            amorton Aaron Morton
            amorton Aaron Morton
            Aaron Morton
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: