Fixed a core dump problem when using --log-update and connecting without a default database.
Fixed some configure and portability problems.
Using LEFT JOIN on tables that had circular dependencies caused mysqld to hang forever.