Reputation: 31
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!
Upvotes: 3
Views: 2147
Reputation: 2516
There are reasons most likely relating to replication when GTID is enabled. You can always create a normal table inside a transaction. Drop
that table if exists
before creating. It will work the same way as temporary table.
Upvotes: 1