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

add an escapeSQLString function and fix unescapeSQLString

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 0.7.5
    • Component/s: None
    • Labels:
      None
    • Severity:
      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

            • Assignee:
              amorton Aaron Morton
              Reporter:
              amorton Aaron Morton
              Authors:
              Aaron Morton
              Reviewers:
              Jonathan Ellis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: