You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Brian ONeill (JIRA)" <ji...@apache.org> on 2012/09/18 04:01:07 UTC

[jira] [Commented] (CASSANDRA-4669) Empty .cqlsh_history file causes cqlsh to crash on startup.

    [ https://issues.apache.org/jira/browse/CASSANDRA-4669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13457538#comment-13457538 ] 

Brian ONeill commented on CASSANDRA-4669:
-----------------------------------------

I trust you guys, but you may just want to double check that this isn't an issue.  I can easily reproduce the problem.  Here is a log.  You can see it working initially.  I truncate the file, and no joy.

bone@zen:~/dev/boneill42/cassandra-> bin/cqlsh 
Connected to Test Cluster at localhost:9160.
[cqlsh 2.2.0 | Cassandra 1.1.5 | CQL spec 3.0.0 | Thrift protocol 19.32.0]
Use HELP for help.
cqlsh> quit
bone@zen:~/dev/boneill42/cassandra-> rm -fr ~/.cqlsh_history 
bone@zen:~/dev/boneill42/cassandra-> touch ~/.cqlsh_history
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
bone@zen:~/dev/boneill42/cassandra-> 
                
> Empty .cqlsh_history file causes cqlsh to crash on startup.
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-4669
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4669
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 1.1.5
>         Environment: Python 2.7.1 on Mac OSX 
>            Reporter: Brian ONeill
>            Assignee: Brian ONeill
>            Priority: Minor
>             Fix For: 1.1.6
>
>         Attachments: trunk-4669.txt
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira