Cftransaction not commiting when a function block is in body

  coldfusion, docker, lucee, mysql

I have a cftransaction code block that calls some function in a cftry and if this runs without an exception, it commits. Else, it rolls back in the catch. The function executes some queries (INSERT and UPDATE and all).

The services (lucee and MySQL) run on docker.

The issue is when I run the code, it runs successfully but doesn’t commit.
When I uncomment the cftransaction, the code blocks runs fine.
When I remove the function and leave just a query, it commits.

This code is working fine on a different environment, my Windows system (not docker) but this issue occurs on docker.

Am I doing something wrong?

UPDATE 1:
After a lot of tests on the previous Environment (Windows), I tried connecting to the MySQL on docker and noticed that this "commit issue" isn’t from Lucee, because the issue only occurred when I changed to docker MySQL (same version).
I guess there is a MySQL configuration to handle this transaction committing issue that doesn’t come with the docker version. I am still blank.

<cftransaction action="begin">

    <cftry>

        <cfif allow_update>

            <cfset update_column = query_with_sql("UPDATE table set column....",false)/>

            <cfif require_global_update>

                <cfset update_column_global = update_pricing_tables("update_from_product",db_column_name,db_column_value)/>

            </cfif>

            <cftransaction action="commit"/>

            success

        <cfelse>

            Action isn't allowed.

        </cfif>

        <cfcatch>

            <cftransaction action="rollback"/>

            failure <cfoutput>#cfcatch.message#</cfoutput>

        </cfcatch>

    </cftry>

</cftransaction>

OS: Linux NGINX Docker

Java Version: 11.0.11

Tomcat Version: 9.0.48

Lucee Version: 5.3.8.189

MySQL: 8.0.24

Source: Docker Questions

LEAVE A COMMENT