MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / add_global_thread

Function add_global_thread

sql/mysqld.cc:757–770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

755}
756
757void add_global_thread(THD *thd)
758{
759 DBUG_PRINT("info", ("add_global_thread %p", thd));
760 mysql_mutex_assert_owner(&LOCK_thread_count);
761 const bool have_thread=
762 global_thread_list->find(thd) != global_thread_list->end();
763 if (!have_thread)
764 {
765 ++global_thread_count;
766 global_thread_list->insert(thd);
767 }
768 // Adding the same THD twice is an error.
769 DBUG_ASSERT(!have_thread);
770}
771
772void remove_global_thread(THD *thd)
773{

Callers

nothing calls this directly

Calls 3

findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected