Encountered similar problem with INFORMATION_SCHEMA.TEMPORARY_TABLES. (without GLOBAL_). The problem is that sql_show.cc:fill_global_temporary_tables enumerates existing temp table handler objects. Then for each object the handler ::info method is called in store_temporary_table_record that proceeds to overwrite current_thd, prebuilt->trx and possibly other fields of any operation in progress for that temp table handler.
Encountered similar problem with INFORMATION_ SCHEMA. TEMPORARY_ TABLES. (without GLOBAL_). The problem is that sql_show. cc:fill_ global_ temporary_ tables enumerates existing temp table handler objects. Then for each object the handler ::info method is called in store_temporary _table_ record that proceeds to overwrite current_thd, prebuilt->trx and possibly other fields of any operation in progress for that temp table handler.