Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 94EA711B3D for ; Wed, 6 Aug 2014 17:48:12 +0000 (UTC) Received: (qmail 25818 invoked by uid 500); 6 Aug 2014 17:48:12 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 25791 invoked by uid 500); 6 Aug 2014 17:48:12 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 25770 invoked by uid 99); 6 Aug 2014 17:48:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2014 17:48:12 +0000 Date: Wed, 6 Aug 2014 17:48:12 +0000 (UTC) From: "Dag H. Wanvik (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (DERBY-6565) ROW_NUMBER function throws NullPointerException in UPDATE statement 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/DERBY-6565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14085706#comment-14085706 ] Dag H. Wanvik edited comment on DERBY-6565 at 8/6/14 5:47 PM: -------------------------------------------------------------- Here is a single line patch that makes the repro work. I am not sure if this change is sound, or we need more. If it is, it seems we are lucky and we can marry the windowing rather easily into the update. Reminder to self: any new tests should also include the new MERGE statement. The change only affects task a) mentioned. {color:green}[Update: See DERBY-6688 and DERBY-6689]{color} was (Author: dagw): Here is a single line patch that makes the repro work. I am not sure if this change is sound, or we need more. If it is, it seems we are lucky and we can marry the windowing rather easily into the update. Reminder to self: any new tests should also include the new MERGE statement. The change only affects task a) mentioned. > ROW_NUMBER function throws NullPointerException in UPDATE statement > ------------------------------------------------------------------- > > Key: DERBY-6565 > URL: https://issues.apache.org/jira/browse/DERBY-6565 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.10.2.0 > Reporter: Knut Anders Hatlen > Assignee: Dag H. Wanvik > Priority: Minor > Fix For: 10.11.1.1 > > Attachments: derby-6565-forbid.diff, derby-6565-forbid.status, derby-6565.diff > > > A NullPointerException is raised with this (possibly illegal?) UPDATE statement: > {noformat} > ij version 10.10 > ij> connect 'jdbc:derby:memory:db;create=true'; > ij> create table t(x int); > 0 rows inserted/updated/deleted > ij> insert into t values 1; > 1 row inserted/updated/deleted > ij> update t set x = row_number() over (); > ERROR XJ001: Java exception: ': java.lang.NullPointerException'. > {noformat} -- This message was sent by Atlassian JIRA (v6.2#6252)