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
mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
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
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()
 
DBPROC always camcels UPDATE

DBPROC always camcels UPDATE

2007-05-30       - By James Prosser

 Back
Reply:     1     2  

Hi all,

I set out to write a DBPROC that updated a field with a value
calculated by reference to a range of tables in my DB. The intention
being to improve performance of retrieving data, my query could look
to this calculated field rather than perform the calculation each
time. Triggers calling this DBPROC would be placed on tables that
contributed to the calculated value.

My problem is that calls to the DBPROC are causing the calling trigger
to silently fail. Clearly I'm doing something pretty foolish but for
the life of me I can't see what. Here are SQL statements as executed
through my WEBSQL window that demonstrate my problem.

Kernel     Kernel 7.6.00 Build 016-123-109-428
Runtime Environment   W32/INTEL 7.6.00 Build 016-123-109-428

CREATE TABLE TBL1 (COL1 INTEGER)

CREATE DBPROC PROC1 AS RETURN;

CREATE TRIGGER TBL1UPDATE
FOR DBA.TBL1
AFTER UPDATE
EXECUTE (CALL DBA.PROC1;)

INSERT INTO TBL1 (COL1) VALUES (1)

UPDATE TBL1 SET COL1 = 2

At this point I would expect the value of COL1 to be 2, but instead I find 1.

What am I doing wrong here?

Regards,

James Prosser


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