RE: INSERT .. UPDATE DUPLICATES - no trigger is fired
"Anhaus, Thomas" <[email protected]> Mon, 27 Aug 2007 12:38:28 +0200
| Newsgroups | gmane.comp.db.maxdb |
|---|---|
| Message-ID | <[email protected]> |
Hi Dusan,=20 thank you for mailing this bug. We will fix it as soon as possible. As a = workaround you could insert via the <insert select statement>, i.e. INSERT TB SELECT 1, 'Text (updated)' FROM DUAL UPDATE DUPLICATES After that you should have 2 rows in your LOG table. Best Regards, Thomas --- Thomas Anhaus MaxDB&liveCache mailto: [email protected] www.sap.com Sitz der Gesellschaft/Registered Office: Walldorf, Germany Vorstand/SAP Executive Board: Henning Kagermann (Sprecher/CEO), L=E9o = Apotheker (stellvertretender Sprecher / Deputy CEO), Werner Brandt, = Claus Heinrich, Gerhard Oswald, Peter Zencke Vorsitzender des Aufsichtsrats/Chairperson of the SAP Supervisory Board: = Hasso Plattner=20 Registergericht/Commercial Register Mannheim No HRB 350269 Diese E-Mail kann Betriebs- oder Gesch=E4ftsgeheimnisse oder sonstige = vertrauliche Informationen enthalten. Sollten Sie diese E-Mail = irrt=FCmlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, = eine Vervielf=E4ltigung oder Weitergabe der E-Mail ausdr=FCcklich = untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. = Vielen Dank. =20 This e-mail may contain trade secrets or privileged, undisclosed, or = otherwise confidential information. If you have received this e-mail in = error, you are hereby notified that any review, copying, or distribution = of it is strictly prohibited. Please inform us immediately and destroy = the original transmittal. Thank you for your cooperation. =20 > -----Original Message----- > From: Dusan Kolesar [mailto:[email protected]]=20 > Sent: Montag, 27. August 2007 10:36 > To: MaxDB mailing list > Subject: INSERT .. UPDATE DUPLICATES - no trigger is fired >=20 > Hello, > I'm using MaxDb 7.6.00.37 on Linux OS (CentOS). >=20 > when I do INSET statement wiht UPDATE DUPLICATES > database engine works incorrectly. > Only when INSERT is performed trigger is fired. > On UPDATE none triger is fired. >=20 > Here is an example: > CREATE TABLE "ADMIN"."TB" > ( > "ID" Integer DEFAULT SERIAL, > "TXT" Varchar (30) ASCII DEFAULT '', > PRIMARY KEY ("ID") > ) > // > CREATE TABLE "ADMIN"."LOG" > ( > "TXT" Varchar (30) ASCII DEFAULT '' > ) > // > // > CREATE TRIGGER TB_INSERT FOR TB AFTER INSERT EXECUTE > ( > INSERT ADMIN.LOG SET TXT =3D 'insert'; > ) > // > CREATE TRIGGER TB_UPDATE FOR TB AFTER UPDATE EXECUTE > ( > INSERT ADMIN.LOG SET TXT =3D 'update'; > ) > // > CREATE TRIGGER TB_DELETE FOR TB AFTER DELETE EXECUTE > ( > INSERT ADMIN.LOG SET TXT =3D 'delete'; > ) > // > // > INSERT TB SET ID =3D 1, TXT =3D 'Text' UPDATE DUPLICATES > // > INSERT TB SET ID =3D 1, TXT =3D 'Text (updated)' UPDATE DUPLICATES > // >=20 > after 2nd insert there is only 1 row in the LOG table (with=20 > text insert). >=20 >=20 > Thank you for support. >=20 > Dusan >=20 > --=20 > Dusan Kolesar > Helsinska 19 > 040 13 Kosice > Slovakia > e-mail primary : [email protected] > e-mail alternative : [email protected] > ICQ# : 160507424 >=20 > --=20 > MaxDB Discussion Mailing List > For list archives: http://lists.mysql.com/maxdb > To unsubscribe: =20 > http://lists.mysql.com/[email protected] >=20 >=20 -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[email protected]