Well, I'm sure this question has been asked before but search failed to find it. What causes this? I get it on even the simplest of php scripts:
Error in my_thread_global_end(): 1 threads didn't exit
I believe that is a MySQL bug. You may need to upgrade your MySQL version, or if running on windows you can upgrade the mysql.dll file, I believe. See http://bugs.mysql.com/search.php?search_for=my_thread_global_end&status=All&severity=&limit=10&order_by=&cmd=display&direction=ASC&bug_type=&os=0&phpver=&bug_age=0 for more info.