# Percona Server 5.7 orphan #sql-ib\* entry in INNODB\_SYS\_TABLES cannot be removed, blocks MySQL 8 upgrade

**URL:** <https://forums.percona.com/t/percona-server-5-7-orphan-sql-ib-entry-in-innodb-sys-tables-cannot-be-removed-blocks-mysql-8-upgrade/39973>\
**Category:** Percona Server for MySQL 5.6\
**Tags:** mysql, percona\
**Created:** [January 2, 2026, 10:05am UTC](https://forums.percona.com/t/percona-server-5-7-orphan-sql-ib-entry-in-innodb-sys-tables-cannot-be-removed-blocks-mysql-8-upgrade/39973 "2026-01-02T10:05:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aycelen](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aycelen/32/23244_2.png) [@aycelen](https://forums.percona.com/u/aycelen)\
**Post date:** [January 2, 2026, 10:05am UTC](https://forums.percona.com/t/percona-server-5-7-orphan-sql-ib-entry-in-innodb-sys-tables-cannot-be-removed-blocks-mysql-8-upgrade/39973/1 "2026-01-02T10:05:49Z")

</div>

Hello,

I am running **Percona Server 5.7.44-48** on a **large dataset (~9 TB)**.  
This instance is a **replica / test clone** , not production.

While running `util.checkForServerUpgrade()` (MySQL Shell) in preparation for an upgrade to MySQL / Percona 8.0, I am getting the following **blocking error** :

```auto
Schema inconsistencies resulting from file removal or corruption

Table kep.#sql-ib197-3868964134 is present in
INFORMATION_SCHEMA.INNODB_SYS_TABLES
but missing from TABLES table

```

Querying the metadata confirms this:

```auto
SELECT * 
FROM information_schema.INNODB_SYS_TABLES
WHERE NAME LIKE 'kep/#sql%';

```

Result:

```auto
NAME: kep/#sql-ib197-3868964134
SPACE: 595

```

This looks like an **orphan InnoDB internal table** left behind by a failed or interrupted `ALTER TABLE` operation.

* * *

## What I already tried

- Connecting as `root@localhost` via UNIX socket

- `DROP TABLE IF EXISTS kep.\`#sql-ib197-3868964134`;`

- Restarting MySQL

- Starting MySQL with `innodb_force_recovery = 1`

- Retrying `DROP TABLE`

- Restarting again without `innodb_force_recovery`

The table **remains present** in `INNODB_SYS_TABLES` and cannot be removed.

Important note:

- On Percona Server 5.7, `INNODB_SYS_*` tables are **read-only** , so manual deletion from `information_schema` is not possible.

* * *

## Key constraints

- Dataset size is ~9 TB (dropping/reloading schemas is not practical)

- This is a replica/test node, but data should remain intact

- I want to **prepare the instance safely for an upgrade to Percona 8.0**

- I want to avoid unsupported hacks or ibdata file manipulation

* * *

## Questions

1. Is this a **known issue / bug** in Percona Server 5.7 regarding orphan `#sql-ib*` entries?

2. Is there a **supported way** to clean up this orphan InnoDB metadata in 5.7?

3. Can this orphan entry be **safely ignored** when upgrading **Percona Server 5.7 → Percona Server 8.0** , or does it risk upgrade failure?

4. Would Percona recommend:

Any guidance from Percona engineers or users who have faced a similar situation would be greatly appreciated.

Thank you.

---

<div class="post-metadata">

**Author:** ![aycelen](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/aycelen/32/23244_2.png) [@aycelen](https://forums.percona.com/u/aycelen)\
**Post date:** [January 2, 2026, 12:30pm UTC](https://forums.percona.com/t/percona-server-5-7-orphan-sql-ib-entry-in-innodb-sys-tables-cannot-be-removed-blocks-mysql-8-upgrade/39973/2 "2026-01-02T12:30:15Z")

</div>

Extra:

-rw-r----- 1 mysql mysql 14K Dec 22 02:06 ‘#sql-1db9\_2584d28.frm’  
-rw-r----- 1 mysql mysql 52M Dec 21 04:38 ‘#sql-ib197-3868964134.ibd’

---

<div class="post-metadata">

**Author:** ![Abhinav\_Gupta](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/abhinav_gupta/32/6262_2.png) [@Abhinav\_Gupta](https://forums.percona.com/u/Abhinav_Gupta)\
**Post date:** [January 2, 2026, 12:47pm UTC](https://forums.percona.com/t/percona-server-5-7-orphan-sql-ib-entry-in-innodb-sys-tables-cannot-be-removed-blocks-mysql-8-upgrade/39973/3 "2026-01-02T12:47:00Z")

</div>

> [@aycelen](#):
>
> `#sql-ib197-3868964134`

You need to fix this on 5.7 by following the steps mentioned in the documentation section below

> **[MySQL :: MySQL 5.7 Reference Manual :: 14.22.3 Troubleshooting InnoDB Data...](https://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html#:~:text=deleting%20it%20manually.-,Orphan%20Intermediate%20Tables,-If%20MySQL%20exits)**

> [@aycelen](#):
>
> `DROP TABLE IF EXISTS kep.\`#sql-ib197-3868964134`;`

As per the documentation steps, Drop should look like  
`mysql> DROP TABLE ` **#mysql50#** #sql-ib87-856498050`;`
