[
https://issues.apache.org/jira/browse/CASSANDRA-17693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brandon Williams updated CASSANDRA-17693:
-----------------------------------------
Bug Category: Parent values: Correctness(12982)Level 1 values: Recoverable
Corruption / Loss(12986)
Complexity: Normal
Component/s: CQL/Semantics
Discovered By: User Report
Fix Version/s: 3.0.x
3.11.x
4.0.x
4.x
Severity: Normal
Status: Open (was: Triage Needed)
> Missing type checking on reused bind variables
> ----------------------------------------------
>
> Key: CASSANDRA-17693
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17693
> Project: Cassandra
> Issue Type: Bug
> Components: CQL/Semantics
> Reporter: Avi Kivity
> Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.x
>
> Attachments: bind-var-type-conflict.py
>
>
> A bind variable gets its type from its context (e.g. in {{INSERT INTO tab(a)
> VALUES(:var)}}, {{:var}} has the same type as {{tab.a}}. But what if the same
> variable is used in contexts that have different types? Assume {{a}} and
> {{b}} have incompatible types:
> {{INSERT INTO ks.tab (id, a, b) VALUES(:id, :a, :a)}}
> The server should reject the query, but it doesn't.
> I think what happens is that one :a shadows the other, so the other :a can't
> even get a value.
> More complete reproducer attached.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]