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

David Capwell updated CASSANDRA-19890:
--------------------------------------
     Bug Category: Parent values: Correctness(12982)Level 1 values: 
Unrecoverable Corruption / Loss(13161)
       Complexity: Low Hanging Fruit
    Discovered By: Fuzz Test
    Fix Version/s: 5.x
         Severity: Critical
           Status: Open  (was: Triage Needed)

> type system contains check for duration does not work for hidden types
> ----------------------------------------------------------------------
>
>                 Key: CASSANDRA-19890
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-19890
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL/Interpreter
>            Reporter: David Capwell
>            Priority: Normal
>             Fix For: 5.x
>
>
> The function 
> "org.apache.cassandra.db.marshal.AbstractType#referencesDuration” relies on 
> type overriding for detecting if the type contains a duration, but the hidden 
> types like Composite or DynamicComposite don’t override this… this means that 
> we will be able to create a 2i index for these columns (unless we use SAI as 
> it properly detects this)
> {code}
> CREATE TABLE "tbl" (
>     "pk1" int,
>     "with_duration" 'CompositeType(ListType(DurationType))',
>     PRIMARY KEY ("pk1")
> );
> CREATE INDEX ON "tbl"("with_duration");
> {code}
> This is able to create the 2i index even though we shouldn’t be able to due 
> to duration not being allowed in indexes.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to