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

Cassandra CLI - Import Keyspace Definitions from File - Comments do partitially interpret characters/commands

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 0.7.7, 0.8.2
    • Legacy/Tools
    • None
    • Win Vista

    • Low

    Description

      Hello,

      using: bin/cassandra-cli -host localhost --file conf/schema-sample.txt

      with schema-sample.txt having contents like this:

      /* here are a lot of comments,
      like this sample create keyspace;
      and so on
      */

      Will result in an error:
      Line 1 => Syntax Error at Position 323: mismatched charackter '<EOF>' expecting '*'

      The Cause is the keyspace; statement => the semicolon ";" causes the error.

      However:

      Writing the word "keyspace;" with quotes, does NOT lead to the error.
      so this works:
      /* here are a lot of comments,
      like this sample create "keyspace;"
      and so on
      */

      From my point of view this is an error. Everyting between the "Start Comment" => /* and "End Comment" => */ Should be treated as a comment and not be interpreted in any way. Thats the definition of a comment, to be not interpreted at all.

      Or this must be documented somewhere very prominently, otherwise this will lead to unnecessary wasting of time searching for this odd behavoiur. And it makes "commenting out" statements much more cumbersome.

      Plattform: Windows Vista

      thanks

      Attachments

        1. CASSANDRA-2852.patch
          1 kB
          Pavel Yaskevich

        Activity

          People

            xedin Pavel Yaskevich
            jensmueller jens mueller
            Pavel Yaskevich
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: