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 57DBA9E3C for ; Mon, 28 May 2012 16:40:24 +0000 (UTC) Received: (qmail 39825 invoked by uid 500); 28 May 2012 16:40:24 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 39768 invoked by uid 500); 28 May 2012 16:40:24 -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 39596 invoked by uid 99); 28 May 2012 16:40:23 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 May 2012 16:40:23 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id A5869140B94 for ; Mon, 28 May 2012 16:40:23 +0000 (UTC) Date: Mon, 28 May 2012 16:40:23 +0000 (UTC) From: "Dave Brosius (JIRA)" To: commits@cassandra.apache.org Message-ID: <1231433702.8885.1338223223680.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1665641018.6624.1338098963371.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Updated] (CASSANDRA-4291) Oversize integer in CQL throws NumberFormatException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-4291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dave Brosius updated CASSANDRA-4291: ------------------------------------ Attachment: 4291_catch_misc_excs_processing_statements.txt catch misc runtime exceptions from cql.getStatement and return InvalidRequestExceptions with 'useful messages' for these so that the connection from cql to the server doesn't get into a bad state. against trunk > Oversize integer in CQL throws NumberFormatException > ---------------------------------------------------- > > Key: CASSANDRA-4291 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4291 > Project: Cassandra > Issue Type: Bug > Components: API > Reporter: Scott Sadler > Priority: Minor > Attachments: 4291_catch_misc_excs_processing_statements.txt > > > In CQL, the parser does not handle an oversize Integer, the client socket get closed and an exception is output in the log. > {noformat}cqlsh:TEST1> select count(*) from Items limit 10000000000000; > TSocket read 0 bytes > cqlsh:TEST1> select count(*) from Items limit 1; > TSocket read 0 bytes{noformat} > {noformat} > ERROR 02:51:28,600 Error occurred during processing of message. > java.lang.NumberFormatException: For input string: "10000000000" > at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) > at java.lang.Integer.parseInt(Integer.java:461) > at java.lang.Integer.parseInt(Integer.java:499) > at org.apache.cassandra.cql.CqlParser.selectStatement(CqlParser.java:631) > at org.apache.cassandra.cql.CqlParser.query(CqlParser.java:221) > at org.apache.cassandra.cql.QueryProcessor.getStatement(QueryProcessor.java:951) > at org.apache.cassandra.cql.QueryProcessor.process(QueryProcessor.java:873) > at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1234) > at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3542) > at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3530) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) > at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) > at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:184) > 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:662) > {noformat} > The INTEGER type in Cql.g matches digits but not to any particular limit. -- 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