MySQL & MariaDB error 1766 ER_VARIABLE_NOT_SETTABLE_IN_TRANSACTION
MySQLThe system variable … cannot be set when there is an ongoing transaction.
MariaDBThe system variable … cannot be set when there is an ongoing transaction
How the message changed between versions