Bug #8758 Triggers: CREATE TRIGGER does not accept fully qualified names
Submitted: 23 Feb 2005 23:57 Modified: 20 Jul 2005 15:40
Reporter: Disha Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:5.0.2 OS:Linux (Redhat Linux 9.0)
Assigned to: Antony Curtis CPU Architecture:Any

[23 Feb 2005 23:57] Disha
Description:
Fully-Qualified trigger names are not accepted while creating triggers. This is also observed on Windows 2003 as well.

The create trigger completes successfully if a non-qualified trigger name is specified.

How to repeat:
1. Create a database test1;

2. Use test1;	

3. Create table 't1' with fields 'f1' and 'f2' by executing the following SQL statement:
CREATE TABLE t1 (f1 INT, f2 INT);

4. Try to Create a trigger say 'trg1' on 't1' as subject table as follows:
CREATE TRIGGER t1.trg1 BEFORE INSERT ON T1 FOR EACH ROW SET new.f2=9999;

5.  Observe the error displayed for incorrect SQL Syntax

			
Expected Results 
Fully qualified names should be accepted and TRIGGER should get created
		

Actual Results
The create trigger fails with the following error
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.trg1 before insert on t1 for each row set new.f2=9999' at line 1
[24 Feb 2005 9:33] Disha
Updated the synopsis.
[1 Jun 2005 19:26] Brian Aker
Will fix in 5.1
[3 Jul 2005 18:41] Antony Curtis
See Bug#5892
[19 Jul 2005 20:40] Dmitry Lenev
Fixed in 5.0.10
[20 Jul 2005 15:40] Mike Hillyer
Documented in 5.0.10 changelog.