Most likely your database files are corrupt. For the sake of performance, and because it is the ordinary working, mysqld doesn't check their integrity, but assumes they are okay. The side effect is that such events can cause *anything* in the database.

Probably some tree-based index was corrupted on a way, that the nodes are pointing to eachother, which results an inifinite loop walking them.

Considering that your database roughly works, dump all of it, delete the database and reinitalize. The required steps:

1. Export the whole thing, the command: `mysqldump -uroot -p --all-databases --skip-lock-tables > wholedump.sql`
2. Stop the mysqld
3. Make a copy from the database directory (on most Linuxes, it is in `/var/lib/mysql`). If something wouldn't work, you will have least something to recover ( ;-) ).
4. Restart the mysqld
5. Import with the command `mysql -uroot < wholedump.sql`

It is the most simple case, it is not impossible that you will find some *new problem* doing these steps, then make a new question.

**Never can be said enough: you need to have a periodical, automatic backup of all your important databases.** Next time a crash will happen and your db won't be recoverable, or only partially recoverable, what will you do?