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

Sylvain Lebresne updated CASSANDRA-7484:
----------------------------------------

    Attachment: 7484.txt

Attaching patch to fix (along with a unit test). The changes in 
{{Message.java}} is because currently the NPE is thrown during message 
encoding, which somehow ended up not being caught properly: the result is that 
as of now, the code of the description ends up with no response of the server 
and no message in the log whatsoever. While the patch fixes the NPE in the 
first place, figured extending the try/catch is not a bad idea either.

> Throw exception on unknown UDT field
> ------------------------------------
>
>                 Key: CASSANDRA-7484
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7484
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>         Attachments: 7484.txt
>
>
> Currently, the following code:
> {noformat}
> CREATE TYPE foo (f : int);
> CREATE TABLE test (k int PRIMARY KEY, v foo);
> INSERT INTO test (k, v) VALUES (0, { s : ?})
> {noformat}
> will crash, because the {{s}} field is not part of type {{foo}} and it's not 
> caught. The consequence being that the metadata for the bindMarker ends up 
> being {{null}} and some NPE is thrown. We should throw a proper exception 
> instead.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to