cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (Commented) (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-3231) CQL does not throw an error when invalid hex is supplied
Date Tue, 27 Sep 2011 15:16:11 GMT


Jonathan Ellis commented on CASSANDRA-3231:

looks like that's from the old hexToBytes implementation, where the inner loop used to be

            bytes[i] = (byte)Integer.parseInt(str.substring(i*2, i*2+2), 16);

So I think it's safe to remove now.
> CQL does not throw an error when invalid hex is supplied
> --------------------------------------------------------
>                 Key: CASSANDRA-3231
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.8.5
>            Reporter: Brandon Williams
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>             Fix For: 0.8.7
>         Attachments: CASSANDRA-3231.patch
> As reported on irc, if you try to create an index on a CF with a default comparator of
BytesType, but you supply invalid hex, weird things happen.  Namely if you try to create one
on 'category' you instead get one on '\xca\xfe\xff\xff', which is 4 bytes that appears to
coincide with attempting to interpret 'ca', 'te', 'go', 'ry' as hex.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message