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 01A2810DB7 for ; Tue, 27 May 2014 11:54:02 +0000 (UTC) Received: (qmail 89760 invoked by uid 500); 27 May 2014 11:54:01 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 89730 invoked by uid 500); 27 May 2014 11:54:01 -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 89723 invoked by uid 99); 27 May 2014 11:54:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 May 2014 11:54:01 +0000 Date: Tue, 27 May 2014 11:54:01 +0000 (UTC) From: =?utf-8?Q?Pascal_Gr=C3=BCn_=28JIRA=29?= To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DERBY-6587) Foreign Key constraint not matched when using UUID in a composite foreign key MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-6587?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Gr=C3=BCn updated DERBY-6587: ------------------------------- Attachment: TABLE2_T.csv TABLE1_T.csv schema.sql Added schema + input files for bulk import to reproduce the problem. > Foreign Key constraint not matched when using UUID in a composite foreign= key > -------------------------------------------------------------------------= ---- > > Key: DERBY-6587 > URL: https://issues.apache.org/jira/browse/DERBY-6587 > Project: Derby > Issue Type: Bug > Components: Store > Affects Versions: 10.10.2.0 > Environment: Windows 7, Java 7 > Reporter: Pascal Gr=C3=BCn > Attachments: TABLE1_T.csv, TABLE2_T.csv, schema.sql > > > There is a problem in org.apache.derby.impl.sql.execute.RIBulkChecker: > result =3D fkCol.compare(refCol); > if (result =3D=3D 1) > { > return GREATER_THAN; > } > else if (result =3D=3D -1) > { > return LESS_THAN; > } > where the JavaDoc for "compare" explicitly states that one must not use 1= or -1 to check the return value. > The problem can be reproduced when creating a table with two fields, "UUI= D_FIELD char (16) for bit data" and "NUM_FIELD integer", then having a fore= ign key to these two fields and then using the bulk import, i.e. "CALL SYSC= S_UTIL.SYSCS_IMPORT_TABLE ..." -- This message was sent by Atlassian JIRA (v6.2#6252)