Bug #8758 Triggers: CREATE TRIGGER does not accept fully qualified names
Submitted: 24 Feb 2005 0:57 Modified: 20 Jul 2005 17:40
Reporter: Disha
Status: Closed
Category:Server Severity:S4 (Feature request)
Version:5.0.2 OS:Linux (Redhat Linux 9.0)
Assigned to: Bugs System Target Version:
Triage: D5 (Feature request)

[24 Feb 2005 0: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 10:33] Disha
Updated the synopsis.
[1 Jun 2005 21:26] Brian Aker
Will fix in 5.1
[3 Jul 2005 20:41] Antony Curtis
See Bug#5892
[19 Jul 2005 22:40] Dmitri Lenev
Fixed in 5.0.10
[20 Jul 2005 17:40] Mike Hillyer
Documented in 5.0.10 changelog.