[ https://issues.apache.org/jira/browse/CASSANDRA-4669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Yeschenko reopened CASSANDRA-4669: ------------------------------------------ This patch breaks cqlsh history loading. Also, the original issue isn't an issue at all - readline handles empty history files perfectly well. Reverting the commit should fix the new issue. > 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