Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
Subject: mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Subject: Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
Subject: MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Subject: Re: Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
Subject: RE: INSERT .. UPDATE DUPLICATES - no trigger is fired

Subject: RE: INSERT .. UPDATE DUPLICATES - no trigger is fired

2007-08-27       - By Anhaus, Thomas

 Back
Hi Dusan,
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: thomas.anhaus@(protected)
www.sap.com
Sitz der Gesellschaft/Registered Office: Walldorf, Germany
Vorstand/SAP Executive Board: Henning Kagermann (Sprecher/CEO), L?o Apotheker
(stellvertretender Sprecher / Deputy CEO), Werner Brandt, Claus Heinrich,
Gerhard Oswald, Peter Zencke
Vorsitzender des Aufsichtsrats/Chairperson of the SAP Supervisory Board: Hasso
Plattner
Registergericht/Commercial Register Mannheim No HRB 350269

Diese E-Mail kann Betriebs- oder Gesch?ftsgeheimnisse oder sonstige
vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrt?mlich
erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielf?ltigung
oder Weitergabe der E-Mail ausdr?cklich untersagt.
Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen
Dank.

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.


> -- --Original Message-- --
> From: Dusan Kolesar [mailto:d.kolesar@(protected)]
> Sent: Montag, 27. August 2007 10:36
> To: MaxDB mailing list
> Subject: INSERT .. UPDATE DUPLICATES - no trigger is fired
>
> Hello,
> I'm using MaxDb 7.6.00.37 on Linux OS (CentOS).
>
> 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.
>
> 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 = 'insert';
> )
> //
> CREATE TRIGGER TB_UPDATE FOR TB AFTER UPDATE EXECUTE
> (
>    INSERT ADMIN.LOG SET TXT = 'update';
> )
> //
> CREATE TRIGGER TB_DELETE FOR TB AFTER DELETE EXECUTE
> (
>    INSERT ADMIN.LOG SET TXT = 'delete';
> )
> //
> //
> INSERT TB SET ID = 1, TXT = 'Text' UPDATE DUPLICATES
> //
> INSERT TB SET ID = 1, TXT = 'Text (updated)' UPDATE DUPLICATES
> //
>
> after 2nd insert there is only 1 row in the LOG table (with
> text insert).
>
>
> Thank you for support.
>
>    Dusan
>
> --
> Dusan Kolesar
> Helsinska 19
> 040 13  Kosice
> Slovakia
> e-mail primary : d.kolesar@(protected)
> e-mail alternative : d.kolesar@(protected)
> ICQ# : 160507424
>
> --
> MaxDB Discussion Mailing List
> For list archives: http://lists.mysql.com/maxdb
> To unsubscribe:
> http://lists.mysql.com/maxdb?unsub=thomas.anhaus@(protected)
>
>

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/maxdb?unsub=mysql@(protected)