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 E03AF184EC for ; Wed, 16 Mar 2016 09:54:33 +0000 (UTC) Received: (qmail 46265 invoked by uid 500); 16 Mar 2016 09:54:33 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 46236 invoked by uid 500); 16 Mar 2016 09:54:33 -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 46223 invoked by uid 99); 16 Mar 2016 09:54:33 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Mar 2016 09:54:33 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7A0022C1F60 for ; Wed, 16 Mar 2016 09:54:33 +0000 (UTC) Date: Wed, 16 Mar 2016 09:54:33 +0000 (UTC) From: "Aleksei Kovura (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-6876) Can't create triggers on a table - error 42X94 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-6876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15197119#comment-15197119 ] Aleksei Kovura commented on DERBY-6876: --------------------------------------- Thanks, I figured that much out, but I was hoping for a proper fix - because triggers are cool. > Can't create triggers on a table - error 42X94 > ---------------------------------------------- > > Key: DERBY-6876 > URL: https://issues.apache.org/jira/browse/DERBY-6876 > Project: Derby > Issue Type: Bug > Environment: Linux x86_64, Java 1.8.0_74 > Reporter: Aleksei Kovura > Attachments: trigger_bug.zip > > > I previously shared this on dev mailing list - http://thread.gmane.org/gmane.comp.apache.db.derby.devel/115427. > I'm reworking triggers in my database and getting this message while trying to create one: > ------------ > Error: StoredPreparedStatement '19ba803c-014e-b216-6d98-00000650b418' does not exist. > SQLState: 42X94 > ErrorCode: 30000 > ------------ > This database is a couple years old, started out as 10.10.1.1, was upgraded to stable releases as they appeared (10.11.1.1 -> 10.12.1.1). Some DDL was changed in between upgrades, unfortunately I can't track which ones and when. > SYSCS_UTIL.SYSCS_INVALIDATE_STORED_STATEMENTS() doesn't help. > I tried my best to create a replicable test case through creating database on earlier versions, upgrading and playing with DDL - no such luck, so I'm attaching compressed database (with data deleted and tables compressed). Bug replication procedure is as follows: > 1) Unpack attached file (it has a "trigger_bug" root directory); > 2) Boot the db_trigger database in embedded mode, include "trigger_bug" directory in the classpath - there is one Java class that is referenced in Stored Procedure; > 3) Try to run this SQL: > CREATE TRIGGER APP."test" > AFTER UPDATE OF description ON APP."ACTIONS" > REFERENCING NEW ROW AS updated_row > FOR EACH ROW > UPDATE APP."ACTIONS" SET description = 'testing' > WHERE id=updated_row.id > 4) Get a 42X94 error. > I'm hoping someone with enough knowledge can poke around in system tables and figure out what's going on. -- This message was sent by Atlassian JIRA (v6.3.4#6332)