Fixes error "CREATE TABLE ... SELECT is forbidden when @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1." when migrating DB on a MySQL cluster with replication. This issue #3705 (closed) only should affect upgrades to version 8.x of Gitlab.
The DB migrate script uses a CREATE TABLE AS SELECT statement which raises the above error. It is more appropriate in this context (since this is actually a temporary table) to create a temporary table.
This change has no impact to UI and only affects the upgrade process.
I didn't modify the changelog to include this change, because it is so ridiculously trivial. I realize that's technically against the contribution guidelines, but couldn't justify taking credit for such a tiny change. If you absolutely need me to take credit for it, please let me know and I will be happy to resubmit a compliant MR.