MariaDB InnoDB does not rollback on timeout I have the ff. sample queries in this sequence:

START TRANSACTION
UPDATE
INSERT
COMMIT

Query #2 is timing out but I noticed that query #3 is not rolled back.
I am also trying to manually rollback by verifying (querying the table) if the updates went through before I commit. But when I do that, I get an explicit: General error: 2006 MySQL server has gone away error.
My questions:

I have innodb_rollback_on_timeout set to ON, isn't query #3 supposed to be rolled back?

Since I can't even manually roll back, what options do I have?


Note: This is on mariadb-10.4.17
What is the client?  Does it have &quot;auto reconnect&quot; turned on?  Turn it off.
What I think is happening:

The UPDATE croaks (in any way) and gets rolled back.
The connection is reestablished, perhaps with autocommit.
The INSERT runs successfully and autocommits.
The COMMIT is silently ignored.

Put error checks after every SQL statement.