I have a guess about what caused all of the problems today. While writing watchlist.php today, I ran an SQL query that seemed to really confuse MySQL. It was something like this:
select t.ID_TOPIC as ID_TOPIC, t.ID_BOARD as ID_BOARD,
t.ID_LAST_MSG, m.subject AS subject from smf_watchlist w LEFT JOIN
smf_topics t ON (t.ID_TOPIC = t.ID_TOPIC) LEFT JOIN smf_messages m ON
(m.ID_MSG = t.ID_FIRST_MSG) where w.ID_MEMBER = 35;
I believe it was the ON (t.ID_TOPIC = t.ID_TOPIC)
part that caused problems. (This isn't actually what I wanted to do -- I meant to compare ID_TOPIC in two different tables.) I think this query caused the database to lock up completely and refuse all connections, even after I stopped loading the page which ran this query. Maybe it also created huge temporary files which caused the other problems -- I didn't notice.