MySQL & MariaDB error 4091 ER_XA_TEMP_TABLE
Same number, two different errors. 4091 means one thing in MySQL and another in MariaDB. Check which server you are connected to.
MySQLXA: Temporary tables cannot be accessed inside XA transactions when xa_detach_on_prepare=ON
MariaDBUnknown SEQUENCE: '…'