I just moved to a new computer: Windows 10 with XAMPP. As far as I know I set everything up the same as it was on my old Windows 7 computer. But now, for some reason, much of the time when I run drush cc all
or run update.php, the database gets corrupted. Most frequently, some cache tables' *.idb files (tablespaces) are deleted from my mysql directory, which makes those tables appear as "in use" in phpMyAdmin and prevents them from being edited or emptied. They are always cache tables and never tables that actually get modified by my update hooks. Restoring the database is the only way to fix it then. This is a mature site that I've been working on for a long time, and have never seen this until the new computer. What's happening here?
A sample error message when using update.php, caused by a missing *.idb file:
PDOException: SQLSTATE[HY000]: General error: 1812 Tablespace is missing
for table '(null)': DELETE FROM {cache_field} WHERE
(cid = :db_condition_placeholder_0) ; Array (
[:db_condition_placeholder_0] => field:message_type:6 )
in cache_clear_all() (line 168 of
C:\<path>\includes\cache.inc).
My most recent drush cc all
error message, which Google has never even heard of, was:
exception 'PDOException' with message 'SQLSTATE[HY000]: General [error]
error: 1030 Got error -1 "Internal error < 0 (Not system error)" from
storage engine InnoDB'