Commit 936a8aec authored by unknown's avatar unknown
Browse files

srv0srv.c:

  Prevent the InnoDB main thread from hogging CPU if a table lingers in the background drop queue (though it is essentially a bug if a table end up there at all)


innobase/srv/srv0srv.c:
  Prevent the InnoDB main thread from hogging CPU if a table lingers in the background drop queue (though it is essentially a bug if a table end up there at all)
parent 8e20fc57
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2790,6 +2790,15 @@ srv_master_thread(

	n_tables_to_drop = row_drop_tables_for_mysql_in_background();

	if (n_tables_to_drop > 0) {
		/* Do not monopolize the CPU even if there are tables waiting
		in the background drop queue. (It is essentially a bug if
		MySQL tries to drop a table while there are still open handles
		to it and we had to put it to the background drop queue.) */

	        os_thread_sleep(100000);
	}

	srv_main_thread_op_info = (char*)"";
	
	srv_main_thread_op_info = (char*)"flushing buffer pool pages";