See this for mysql, it shows the bug this gist demonstrates. https://bugs.mysql.com/bug.php?id=83295
Download my.cnf and test.sql to an empty directory
docker run -d -v $(pwd):/etc/mysql/conf.d -e MYSQL_ALLOW_EMPTY_PASSWORD=yes --name mysql mysql:5.7.17
docker exec -it mysql bash
cd /var/lib/mysql
while [ ! -f true.000003 ]; do sleep 1; done
mysql < /etc/mysql/conf.d/test.sql
mysqlbinlog true.000004
mysqlbinlog true.000005
tail -n 100 query.log
look for "XA END; XA COMMIT ONE PHASE" in the bin log and "commit" in the general log
exit
docker rm -f mysql