[ https://issues.apache.org/jira/browse/CASSANDRA-18322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17762721#comment-17762721 ]
Stefan Miklosovic edited comment on CASSANDRA-18322 at 9/7/23 1:03 PM: ----------------------------------------------------------------------- First of all ... what are the branches we are going to target with these changes? I am not quite up to do anything beyond basics in e.g. 3.0. If we want to get hands dirty I think we should focus on trunk only here or? Secondly, the batch ... this is interesting problem. So we want to check that each individual statements in it are all qualified? I see that batches are just skipped here [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/transport/messages/ExecuteMessage.java#L138-L144] They were skipped in 4.0+. In 3.0 / 3.11 they are not in that if. was (Author: smiklosovic): First of all ... what are the branches we are going to target with these changes? I am not quite up to do anything beyond basics in e.g. 3.0. If we want to get hands dirty I think we should focus on trunk only here or? Secondly, the batch ... this is interesting problem. So we want to check that each individual statements in it are all qualified? I see that batches are just skipped here https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/transport/messages/ExecuteMessage.java#L138-L144 > Warn about unqualified prepared statement only if it is a select, update, > delete, insert > ---------------------------------------------------------------------------------------- > > Key: CASSANDRA-18322 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18322 > Project: Cassandra > Issue Type: Bug > Components: Messaging/Client > Reporter: Mohammad Aburadeh > Assignee: Stefan Miklosovic > Priority: Urgent > Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1.x, 5.x > > > Hi, > We get the following warnings when we use prepared statements with "create > keyspace ... " or "drop keyspace" statements. > " > {{USE <keyspace>}} with prepared statements is considered to be an > anti-pattern due to ambiguity in non-qualified table names. Please consider > removing instances of {{{}Session#setKeyspace(<keyspace>){}}}, > {{Session#execute("USE <keyspace>")}} and {{cluster.newSession(<keyspace>)}} > from your code, and always use fully qualified table names (e.g. > <keyspace>.<table>). Keyspace used: null, statement keyspace: null, statement > id: 8153d922390fdf9a9963bfeda85b2f3b at > " > Such statements are already full-qualified. So, why are we getting this > warning? > Regards > Mohammad -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org