Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ACD259EB2 for ; Wed, 12 Oct 2011 01:51:35 +0000 (UTC) Received: (qmail 41224 invoked by uid 500); 12 Oct 2011 01:51:35 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 41190 invoked by uid 500); 12 Oct 2011 01:51:35 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 41182 invoked by uid 99); 12 Oct 2011 01:51:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Oct 2011 01:51:35 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Oct 2011 01:51:33 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id B32D83044E5 for ; Wed, 12 Oct 2011 01:51:11 +0000 (UTC) Date: Wed, 12 Oct 2011 01:51:11 +0000 (UTC) From: "Jonathan Ellis (Updated) (JIRA)" To: commits@cassandra.apache.org Message-ID: <691651767.3379.1318384271735.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <2009671836.2578.1318367951796.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CASSANDRA-3349) NPE on malformed CQL MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CASSANDRA-3349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-3349: -------------------------------------- Fix Version/s: 1.0.1 0.8.8 Assignee: Pavel Yaskevich We don't want to allow leaving it off, because we don't support scan-and-delete server-side. (And truncate is far more performant.) I'd rather fix by requiring the rest of the WHERE. > NPE on malformed CQL > -------------------- > > Key: CASSANDRA-3349 > URL: https://issues.apache.org/jira/browse/CASSANDRA-3349 > Project: Cassandra > Issue Type: Bug > Components: Core > Affects Versions: 0.8.0 beta 2 > Reporter: paul cannon > Assignee: Pavel Yaskevich > Labels: lhf > Fix For: 0.8.8, 1.0.1 > > > It's not clear why, but the CQL grammar specification in Cql.g allows for an empty WHERE clause on DELETE, i.e.: > {noformat} > DELETE FROM someCF WHERE; > {noformat} > When this is used, with or without a column list, it causes an NPE on the node processing the CQL. Traceback on a recent 1.0.0 build: > {noformat} > ERROR [pool-2-thread-1] 2011-10-11 15:45:25,655 Cassandra.java (line 4082) Internal error processing execute_cql_query > java.lang.NullPointerException > at org.apache.cassandra.cql.CqlParser.deleteStatement(CqlParser.java:1994) > at org.apache.cassandra.cql.CqlParser.query(CqlParser.java:292) > at org.apache.cassandra.cql.QueryProcessor.getStatement(QueryProcessor.java:984) > at org.apache.cassandra.cql.QueryProcessor.process(QueryProcessor.java:500) > at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1268) > at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.process(Cassandra.java:4072) > at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889) > at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187) > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:680) > {noformat} > The CQL client gets an error with the message, "Internal application error". > It might be better to allow leaving off the "WHERE" as well as the condition, to match SQL semantics, although fixing that probably won't solve this problem. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira