I fixed this, the database was apparently corrupted somehow in some obscure place and I had to use WP_ALLOW_REPAIR
Automatic Database Optimizing Added with Version 2.9, there is automatic database optimization support, which you can enable by adding the following define to your wp-config.php file only when the feature is required
define( 'WP_ALLOW_REPAIR', true ); The script can be found at {$your_site}/wp-admin/maint/repair.php