cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Hobbs (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-9898) cqlsh crashes if it load a utf-8 file.
Date Tue, 04 Aug 2015 22:12:04 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-9898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tyler Hobbs updated CASSANDRA-9898:
-----------------------------------
    Reproduced In: 2.1.8, 2.2.0 rc2  (was: 2.2.0 rc2, 2.1.8)
         Reviewer: Carl Yeksigian  (was: Tyler Hobbs)
      Description: 
cqlsh crashes when it load a cql script file encoded in utf-8.

This is a reproduction procedure.

{noformat}
$cat ./test.cql
// 日本語のコメント
use system;
select * from system.peers;

$cqlsh --version
cqlsh 5.0.1

$cqlsh -f ./test.cql
Traceback (most recent call last):
  File "./cqlsh", line 2459, in <module>
    main(*read_options(sys.argv[1:], os.environ))
  File "./cqlsh", line 2451, in main
    shell.cmdloop()
  File "./cqlsh", line 940, in cmdloop
    line = self.get_input_line(self.prompt)
  File "./cqlsh", line 909, in get_input_line
    self.lastcmd = self.stdin.readline()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py",
line 675, in readline
    return self.reader.readline(size)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py",
line 530, in readline
    data = self.read(readsize, firstline=True)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py",
line 477, in read
    newchars, decodedbytes = self.decode(data, self.errors)
{noformat}

  was:
cqlsh crashes when it load a cql script file encoded in utf-8.

This is a reproduction procedure.

{quote}
$cat ./test.cql
// 日本語のコメント
use system;
select * from system.peers;

$cqlsh --version
cqlsh 5.0.1

$cqlsh -f ./test.cql
Traceback (most recent call last):
  File "./cqlsh", line 2459, in <module>
    main(*read_options(sys.argv[1:], os.environ))
  File "./cqlsh", line 2451, in main
    shell.cmdloop()
  File "./cqlsh", line 940, in cmdloop
    line = self.get_input_line(self.prompt)
  File "./cqlsh", line 909, in get_input_line
    self.lastcmd = self.stdin.readline()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py",
line 675, in readline
    return self.reader.readline(size)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py",
line 530, in readline
    data = self.read(readsize, firstline=True)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py",
line 477, in read
    newchars, decodedbytes = self.decode(data, self.errors)
{quote}


Reassigning review to [~carlyeks].  It looks like CASSANDRA-9670 may be a duplicate of this.

> cqlsh crashes if it load a utf-8 file.
> --------------------------------------
>
>                 Key: CASSANDRA-9898
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9898
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>         Environment: linux, os x yosemite.
>            Reporter: Yasuharu Goto
>            Assignee: Yasuharu Goto
>            Priority: Minor
>              Labels: cqlsh
>             Fix For: 2.1.x, 2.2.x
>
>         Attachments: cassandra-2.1-9898.txt, cassandra-2.2-9898.txt
>
>
> cqlsh crashes when it load a cql script file encoded in utf-8.
> This is a reproduction procedure.
> {noformat}
> $cat ./test.cql
> // 日本語のコメント
> use system;
> select * from system.peers;
> $cqlsh --version
> cqlsh 5.0.1
> $cqlsh -f ./test.cql
> Traceback (most recent call last):
>   File "./cqlsh", line 2459, in <module>
>     main(*read_options(sys.argv[1:], os.environ))
>   File "./cqlsh", line 2451, in main
>     shell.cmdloop()
>   File "./cqlsh", line 940, in cmdloop
>     line = self.get_input_line(self.prompt)
>   File "./cqlsh", line 909, in get_input_line
>     self.lastcmd = self.stdin.readline()
>   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py",
line 675, in readline
>     return self.reader.readline(size)
>   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py",
line 530, in readline
>     data = self.read(readsize, firstline=True)
>   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py",
line 477, in read
>     newchars, decodedbytes = self.decode(data, self.errors)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message