| Bug #9909 | Triggers: Triggers which calls Stored Procedures return result sets | ||
|---|---|---|---|
| Submitted: | 14 Apr 2005 15:18 | Modified: | 9 Aug 2005 16:04 |
| Reporter: | Disha | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 5.0.3 | OS: | Any (Any) |
| Assigned to: | Assigned Account | CPU Architecture: | Any |
[9 Aug 2005 16:04]
Andrey Hristov
Gives no more an warning but should not be possible to return a result set from a trigger - see bug #11587 (marking as dupe).

Description: Trigger creation should not allow calls to stored procedures. Trying to create such triggers should fail with error 1314. Currently, creating such triggers is permitted. IN addition, when the trigger is invoked, the procedure call fails with the following error (or warning) message "Error 1305: Procedure sp1() does not exist." How to repeat: 1. delimiter // 2. Use test 3. Create procedure sp1() Select 1// 4. Create table t1(f1 int)// 5. Create trigger trg1 before insert on t1 for each row call sp1()// 6. Insert Into t1 values(1)// EXPECTED RESULT 1) Step 5 should fail with error code 1314. 2) In case its decided to allow procedure calls, then step 6 should not give such warning/error. ACTUAL RESULT 1) Step 5 succeeds. 2) Step 6 gives warning/error that procedure sp1() does not exist.