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

Empty .cqlsh_history file causes cqlsh to crash on startup.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.1.6
    • Legacy/Tools
    • None
    • Python 2.7.1 on Mac OSX

    • Low

    Description

      Not sure how I got it, but I ended up with an empty .cqlsh_history file. In that state, when starting cqlsh, you end up with:

      bone@zen:~/dev/boneill42/cassandra-> bin/cqlsh
      Traceback (most recent call last):
      File "bin/cqlsh", line 2588, in <module>
      main(*read_options(sys.argv[1:], os.environ))
      File "bin/cqlsh", line 2543, in main
      readline.read_history_file(HISTORY)
      IOError: [Errno 22] Invalid argument

      Its a simple fix to check for a non-empty history file. I'll attach the patch.

      Attachments

        1. fix-cqlsh-history.patch
          2 kB
          Aleksey Yeschenko
        2. trunk-4669.txt
          0.5 kB
          Brian ONeill

        Activity

          People

            boneill Brian ONeill
            boneill Brian ONeill
            Brian ONeill
            Brandon Williams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: