Re: Inserting errors into logs
See Get Diagnostics in the manual, it supports something like ...
drop table if exists t;
create table t(i int);
drop procedure if exists p;
delimiter go
create procedure p()
begin
Declare Exit Handler for SqlException
begin
Get Diagnostics Condition 1
@sqlstate = Returned_SqlState,
@errno = Mysql_Errno,
@text = Message_Text;
Select @sqlstate, @errno, @text;
end;
insert into t set i="thisisastring";
end;
go
delimiter ;
call p();
drop table t;
Subject
Views
Written By
Posted
688
April 20, 2020 07:10AM
343
April 20, 2020 11:29AM
363
April 22, 2020 06:58AM
Re: Inserting errors into logs
342
April 22, 2020 02:45PM
354
April 23, 2020 12:38AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.