Bug #28650 problem facing with triggers
Submitted: 24 May 2007 11:09 Modified: 24 Jun 2007 12:29
Reporter: alapati satyanand Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: none

[24 May 2007 11:09] alapati satyanand
Problem :-  once i enter the values into the mcr table, It must also insert  the values in the mcr3 table shown below   which is not happing ? In return the values in the mcr3 table  are showing null for every insertion. Please tell me how to solve this problem. 

The tables and the code are mentioned below:-

three tables are:- 
-create table mcr(a int(20),b int(20));
-create table mcr1(a int(20));
- create table mcr3(a int(20),b int(20));

 trigger mcar  and the  procedure insert_new are  mentioned below .

drop trigger mcr;

delimiter $$  
create trigger mcar before insert on  mcr
for each row 
insert into mcr1 set a = New.a;

insert into mcr3(a)(select count(*) from mcr3);

insert into mcr3 set b = New.b;

call insert_new(@c);

end $$ 
delimiter ;

delimiter $$ 

drop procedure if exists insert_new $$

create procedure insert_new(out c varchar(200))


insert into mcr3(a,b) values(a,b);

end $$

delimiter ;

How to repeat:
urgent .... kindly reply as early as possible
[24 May 2007 12:29] Valeriy Kravchuk
Thank you for a problem report. What exact version, 5.0.x, you had used?
[24 Jun 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".