Error creating TRIGGER MYSQL

0

Can anyone tell me where I'm wrong on Trigger below?

create procedure cons_agen (in prof_mat int)
begin
select p.nome_prof, c.nome_curso, l.nome_lab, a.inicio, a.fim
from agendamento a
inner join professor p on a.id_profs=p.matricula_prof
inner join curso c on a.id_cursos=c.id_curso
inner join laboratorio l on a.id_labs = l.id_lab
where a.id_profs=prof_mat;
END
//para quando inserir em agendamento, mostrar os dados para o usuario
CREATE TRIGGER ins_agenn after insert
ON agendamento
FOR EACH ROW
BEGIN
    SET @mat=NEW.id_profs;
    call cons_agen(@mat);
END
INSERT INTO agendamento
(id_labs,id_cursos,id_profs,inicio,fim,obs)
VALUES
('1','1','18100','2018-11-01 18:30:00','2018-11-01 21:30:00','Comfirmado');

Error:

  

Error Code: 1415. Not allowed to return to result set from trigger 0.092 sec

    
asked by anonymous 20.11.2018 / 13:09

0 answers