Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.
Labels (2)
4 Replies
alevy
Specialist
Specialist

Try connecting tRunJob to tMysqlCommit with OnSubjobOK rather than a row. Also, make sure tRunJob has "Die on child error" checked.
Anonymous
Not applicable
Author

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

No, sorry, it works fine for me using SQL Server even with your original job design.
Anonymous
Not applicable
Author

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