| Bug #8755 | Triggers: Trigger is NOT activated by implicit insertion into subject table | ||
|---|---|---|---|
| Submitted: | 23 Feb 2005 23:07 | Modified: | 1 Jun 2005 3:55 |
| Reporter: | Disha | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S2 (Serious) |
| Version: | 5.0.2 | OS: | Linux (Red hat Linux 9.0) |
| Assigned to: | Dmitry Lenev | CPU Architecture: | Any |
[24 Feb 2005 9:29]
Disha
Updated the synopsis.
[24 Feb 2005 12:48]
Alexander Keremidarski
Verified against 5.0 from BK tree ChangeSet@1.1892, 2005-02-23 20:22:51+03:00, gluh@gluh.mysql.r18.ru
[25 May 2005 4:11]
Dmitry Lenev
Fixed in 5.0.7
[1 Jun 2005 3:55]
Paul DuBois
Noted in 5.0.7 changelogs.
[21 Jun 2005 8:07]
John Readman
So by 'fixed in 5.0.7', you mean 'extremely useful facility (load data) removed in 5.0.7'...thanks a lot.

Description: Triggers should be activated by explicit insertion as wel as implicit insertion into table. However implicit loads into tables are NOT invoking the trigger. How to repeat: Test Setup 1. Create a test.txt file containg data,and save the txt file at any location. 2. Create database say 'db1' 3. Create table 't1' in database 'db1' with fields say 'f1' and 'f2' Repro Steps 1. Use the database 'db1' i.e. execute the following SQL statement: "use db1;" 2. Create a table say 't1' i.e. execute the following SQL statement: "Create table t1(f1 char(10),f2 char(10) Engine=InnoDB; 3. Create a trigger say 'M1' i.e. execute the following SQL statement: "Create trigger M1 BEFORE INSERT on db1.t1 for each row set new.f1='changed';" 4.Load the "test.txt file i.e. execute the following SQL statement: "load data infile '<full path of the txt file>' into table t1;" 3. Observe that the above statement executes successfully without any errors or warnings. Expected Result The trigger should get executed when implicit insertion of data is done from a txt file which is stored locally on the machine Actual Result The trigger does not execute when implicit insertion of the data is done from a txt file which is stored locally on the machine.