Hi,

I'm currently debugging a case where I've ruled out everything I can think of, and I'm hoping someone here has seen this pattern before or has creative ideas.

Some facts & figures:

- Database: ~9.3 MiB
- 12 tables
- .frm + .ibd files
- Standalone instance; no replica, no Galera, no clustering
- innodb_file_per_table=ON

What happened on 2026-04-02:

- 14:05 CET: application gets `SQLSTATE[42S02] ... Table 'app_db.users' doesn't exist` (error 1146). User confirms via phpMyAdmin that the database `app_db` still exists but has no tables.
- ~14:11 CET: everything works again. Data is intact (!)

On disk:

- All 12 .frm and all 12 .ibd files have Birth timestamps clustered in a window of a few seconds, at `2026-04-02 14:11:30.xxx`. - Order per table is .frm first, .ibd a few ms later. Example for one table:
  - foo.frm Birth `14:11:30.152`
  - foo.ibd Birth `14:11:30.184`
- No #sql-* orphan files anywhere in the datadir.

You would think every table in this database was dropped, and then freshly created at 14:11:30.

But: the data was back. So either:

- The data was actually gone, but has been automatically restored. But we have no such process or code, and MariaDB doesn't either AFAIK (?) - The tables were temporarily invisible. But why and how? Neither `ALTER TABLE` nor `OPTIMIZE TABLE` nor `ALTER TABLE FORCE` boast that behaviour (never seen it at least). Also, none of those DDLs were run by us or the customer.

What I've ruled out:

- Dump import - not run by us nor the customer
- MariaDB upgrade
- OPTIMIZE TABLE - not run by us nor the customer
- ALTER TABLE ... FORCE / ENGINE=InnoDB / schema changes — not run by us nor the customer *and* table wouldn't be invisible
- Missing/dropped grants — the error would be 1044/1142, not 1146
- Replication / Galera — N/A because standalone
- Application deploy/migration — according to the customer, the site using this database wasn't deployed on that date

Anything you've seen that could explain this? Edge cases in InnoDB recovery, weird interactions between FLUSH TABLES and file operations, tooling that does silent per-table rebuilds, etc. — I'll take anything creative.

With kind regards,

William David Edwards

_______________________________________________
discuss mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to