← Back to team overview

maria-developers team mailing list archive

sql_mode=oracle : Rollback on error

 

Hello Sergei,
Can you take a glance on this issue.
It's a major behavior difference and my workaround only work with stored procedures.
Commercial DBs works like Oracle (as least Sybase, Sqlserver (when XACT_ABORT is ON), DB2 UDB and DB2 AS400).

Regards

> -----Message d'origine-----
> De : Alexander Barkov [mailto:bar@xxxxxxxxxxx]
> Envoyé : mardi 3 avril 2018 12:43
> À : jerome brauge
> Cc : MariaDB Developers (maria-developers@xxxxxxxxxxxxxxxxxxx)
> Objet : Re: sql_mode=oracle : Rollback on error
> 
> Hello Jerome,
> 
> On 03/30/2018 06:52 PM, jerome brauge wrote:
> > Hello Alexander,
> > I've found one another difference  between Mariadb and Oracle : oracle
> always rollback the active transaction if an error is raised, Maria leave the
> transaction active.
> > Possible workaround in stored procedure: add an exit handler which do a
> rollback and resignal the error.
> >
> > What do you think about this ?
> 
> Sorry, this topic is out of my expertise. Please talk to Sergei.
> 
> 
> >
> > Regards
> >

Attachment: trans_not_rollbacked_workaround.sql
Description: trans_not_rollbacked_workaround.sql

Attachment: trans_not_rollbacked.sql
Description: trans_not_rollbacked.sql


Follow ups

References