I read from MySQL documentation
CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE statements are not supported inside transactions when using GTIDs (that is, when the server was started with the --enforce-gtid-consistency option). It is possible to use these statements with GTIDs enabled, but only outside of any transaction, and only with autocommit=1
and very confused why CREATE/DROP TEMPORARY TABLE not supported inside transactions when GTID is enable, can someone explain in more detail? Thanks!