In Case of MySQL
MySQL8.0.13のリリースノートに以下の記載があったので部分的ではありますが、CREATE
TEMPORARYテーブルをトランザクション内で実行し確認してみました。
Previously, CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE
statements were not supported inside transactions, procedures,
functions, or triggers when using GTIDs (that is, when the
enforce_gtid_consistency system variable is set to ON). It was
possible to use these statements with GTIDs enabled, but only
outside of any transaction, and only with autocommit=1.
From MySQL 8.0.13, this restriction has been removed when
binlog_format is set to ROW or MIXED. With row-based logging in
use, CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE statements
can now be used inside transactions, procedures, functions, or
triggers when GTIDs are enabled. When binlog_format is set to
STATEMENT, the restriction remains. Because of …
[さらに読む]