This question is regarding a MySQL 5.7 database, running on CloudSQL. The binlog files for this database were growing unusually large over the last week. Upon analysis of those files, I noticed the statement "DROP TEMPORARY TABLE need_to_get" repeated millions of times, about 100 times per second, over the last 5 days. Here is an example:
#210207 3:21:51 server id xxxx end_log_pos 165359 CRC32 0xfe1f73b8 Query thread_id=7626438 exec_time=0 error_code=0
SET TIMESTAMP=1612686111/*!*/;
SET @@session.pseudo_thread_id=7626438/*!*/;
DROP TEMPORARY TABLE IF EXISTS `need_to_get` /* generated by server */
/*!*/;
After the server restarted, this behavior stopped. It seems the server might have had trouble dropping the temporary table. What could have caused this to happen?