maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #08921
Re: [Commits] 1d92131: MDEV-4829 BEFORE INSERT triggers dont issue 1406 error.
Hi, Holyfoot!
On Sep 27, Sergei Golubchik wrote:
> On Sep 26, Sergei Golubchik wrote:
> > Hi, Holyfoot!
> >
> > On Sep 24, holyfoot@xxxxxxxxxxxx wrote:
> > > revision-id: 1d92131613770b505fa462b33c1091e00d9475be (mariadb-10.1.7-61-g1d92131)
> > > parent(s): e5418942609833edb681d16c4e2705f8c338bfee
> > > committer: Alexey Botchkov
> > > timestamp: 2015-09-24 14:31:06 +0500
> > > message:
> > >
> > > MDEV-4829 BEFORE INSERT triggers dont issue 1406 error.
> > > Fixed as it's done in MySQL 5.7.
> > > The Strict_error_handler introduced to intercept such states and is activated
> > > in the sp_head::execute_trigger()
> ...
> > 2. strict mode may change the sql_errno, handle_condition_ext
> > doesn't support it.
>
> Now I think that this is a fundamentally flawed idea. When a warning is
> changed to an error this affects not only the level, but also the errno,
> and - that's the difficult part - the error message. And the error
> handler cannot replace the error message, because it does not have
> values for all printf parameters that the error message might need.
On the other hand, if we say that STRICT mode and IGNORE should only
change the level (which changes the existing behavior), then this
approach will work perfectly. I might agree that changing the error text
and number in the STRICT mode (or in IGNORE) was a strange idea and we'd
be better off without it.
Regards,
Sergei
References