One Star

MySql auto commit and subjobs

Good afternoon,
I have an issue related to MySql commits in relation to subjobs. Please see the attached screenshot that shows my test job.
The tMysqlConnection component creates a connection with my database. The Auto commit checkbox is unchecked.
Then I generate a row and pass it to the tMysqlOutput component which writes it to the database. At this point I expect that a rollback is still possible since Auto commit is unchecked.
Now I call a subjob. The only thing this subjob does is calling a tDie component to simulate an error.
Since an error occurs the tMysqlCommit component is not called. Therefore I expect that my insert operation on the database is not committed. When I check my database however I still see that a row is inserted. Even if I add a tMysqlRollback component with an OnComponentError no rollback is performed.
So my question: Does calling a subjob automatically perform a commit on Mysql connections? Is this intended behaviour (and why) or is this a bug?
Thanks in advance.
4 REPLIES
Seven Stars

Re: MySql auto commit and subjobs

Try connecting tRunJob to tMysqlCommit with OnSubjobOK rather than a row. Also, make sure tRunJob has "Die on child error" checked.
One Star

Re: MySql auto commit and subjobs

I've tried both Alevy, but no joy. The result stays the same.
Any other suggestions?
Seven Stars

Re: MySql auto commit and subjobs

No, sorry, it works fine for me using SQL Server even with your original job design.
One Star

Re: MySql auto commit and subjobs

Thanks Alevy, I guess this is not intended behavior then. Maybe a bug in a MySql component?