(cqlsh) encode input correctly when saving history

patch by matthieu.nantern; reviewed by pauloricardomg for CASSANDRA-10948
This commit is contained in:
Matthieu Nantern 2015-12-29 10:15:14 +01:00 committed by Sylvain Lebresne
parent deafdbe373
commit 3aaae7aa59
2 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@
* Better handling of SSL connection errors inter-node (CASSANDRA-10816)
* Disable reloading of GossipingPropertyFileSnitch (CASSANDRA-9474)
* Verify tables in pseudo-system keyspaces at startup (CASSANDRA-10761)
* (cqlsh) encode input correctly when saving history
Merged from 2.1:
* Fix bad gossip generation seen in long-running clusters (CASSANDRA-10969)
* Avoid NPE when incremental repair fails (CASSANDRA-10909)

View File

@ -1123,7 +1123,7 @@ class Shell(cmd.Cmd):
new_hist = srcstr.replace("\n", " ").rstrip()
if nl_count > 1 and self.last_hist != new_hist:
readline.add_history(new_hist)
readline.add_history(new_hist.encode(self.encoding))
self.last_hist = new_hist
cmdword = tokens[0][1]