Bug #115651 mysql8 cannot drop database or table

Submitted: 19 Jul 2024 14:25 Modified: 19 Jul 2024 14:40
Reporter: yu cong Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.0.30 OS:CentOS
Assigned to: CPU Architecture:x86

[19 Jul 2024 14:25] yu cong
Description:
I cannot drop a mysql database or table. It gives the following two errors. I have not found any solutions to similar problems on the Internet. Is there any way to drop?

mysql> use oa;
Database changed
mysql> show tables;
+--------------+
| Tables_in_oa |
+--------------+
| gzrb_bsqk    |
| lcl_xf_0728  |
| lh_left      |
| v_2021       |
| v_depts      |
| v_tyxm_ygs   |
| v_yuc        |
+--------------+
7 rows in set (0.11 sec)

mysql> create table lcl_xf_0728(id int);
ERROR 1050 (42S01): Table 'lcl_xf_0728' already exists
mysql> drop table lcl_xf_0728;
ERROR 1051 (42S02): Unknown table 'oa.lcl_xf_0728'
mysql> drop table gzrb_bsqk;
ERROR 3508 (HY000): Dictionary object id (6536868) does not exist.
mysql> drop database oa;
ERROR 3508 (HY000): Dictionary object id (6536868) does not exist.

I tried setting innodb_force_recovery=1/2/3/4/5/6 but after restarting the mysql instance I still got the same error. I also tried to upgrade from 8.0.30 to 8.0.38 using the binary package, but it couldn't even start successfully. I could only fall back to 8.0.30. The error message is as follows. I guess it may be the same problem.

Jul 19 21:39:04 localhost systemd: Started MySQL8 Server.
Jul 19 21:39:04 localhost mysqld: 2024-07-19T13:39:04.608309Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please 
use authentication_policy instead.
Jul 19 21:39:04 localhost mysqld: 2024-07-19T13:39:04.608338Z 0 [System] [MY-010116] [Server] /opt/software/8/bin/mysqld (mysqld 8.0.38) starting as process 19508
Jul 19 21:39:04 localhost mysqld: 2024-07-19T13:39:04.620120Z 0 [Warning] [MY-012363] [InnoDB] innodb-page-size has been changed from the default value 16384 to 32768.
Jul 19 21:39:04 localhost mysqld: 2024-07-19T13:39:04.620179Z 0 [Warning] [MY-013907] [InnoDB] Deprecated configuration parameters innodb_log_file_size and/or innodb_log_files_in_group have
 been used to compute innodb_redo_log_capacity=8589934592. Please use innodb_redo_log_capacity instead.
Jul 19 21:39:04 localhost mysqld: 2024-07-19T13:39:04.623156Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
Jul 19 21:39:11 localhost mysqld: 2024-07-19T13:39:11.855492Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
Jul 19 21:39:14 localhost kernel: boot[19569]: segfault at 508 ip 0000000002170c8e sp 00007f7e5ce84b90 error 4
Jul 19 21:39:14 localhost mysqld: 2024-07-19T13:39:14Z UTC - mysqld got signal 11 ;
Jul 19 21:39:14 localhost mysqld: Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Jul 19 21:39:14 localhost mysqld: BuildID[sha1]=96a3ee772d1d213bc36262ae5f5c23c7b9f61b30
Jul 19 21:39:14 localhost mysqld: Thread pointer: 0x0
Jul 19 21:39:14 localhost mysqld: Attempting backtrace. You can use the following information to find out
Jul 19 21:39:14 localhost mysqld: where mysqld died. If you see no messages after this, something went
Jul 19 21:39:14 localhost mysqld: terribly wrong...
Jul 19 21:39:14 localhost systemd: mysqld8.service: main process exited, code=killed, status=11/SEGV
Jul 19 21:39:14 localhost systemd: Unit mysqld8.service entered failed state.
Jul 19 21:39:14 localhost systemd: mysqld8.service failed.

How to repeat:
I can't guarantee that this problem can be reproduced in other MySQL instances, but in this instance, it still exists
[19 Jul 2024 14:40] MySQL Verification Team
HI Mr. cong,

Thank you for your bug report.

However, we can not repeat it:

ysql> create database oa;
Query OK, 1 row affected (0.01 sec)

mysql> use oa;
Database changed

mysql> create table lcl_xf_0728(id int);
Query OK, 0 rows affected (0.02 sec)

mysql> create table gzrb_bsqk (id int);
Query OK, 0 rows affected (0.01 sec)

mysql> create table lh_left (id int);
Query OK, 0 rows affected (0.03 sec)

mysql> create table v_2021 (id int);
Query OK, 0 rows affected (0.01 sec)

mysql> create table v_depts (id int);
Query OK, 0 rows affected (0.01 sec)

mysql> create table v_yuc (id int);
Query OK, 0 rows affected (0.03 sec)

mysql> create table v_tyxm_ygs (id int);
Query OK, 0 rows affected (0.01 sec)

mysql> create table lcl_xf_0728(id int);
ERROR 1050 (42S01): Table 'lcl_xf_0728' already exists

mysql> drop table lcl_xf_0728;
Query OK, 0 rows affected (0.05 sec)

mysql> drop table v_depts;
Query OK, 0 rows affected (0.02 sec)

mysql>  drop table gzrb_bsqk;
Query OK, 0 rows affected (0.01 sec)

mysql> drop database oa;
Query OK, 5 rows affected (0.05 sec)

mysql> show schemas;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| test               |
+--------------------+
5 rows in set (0.00 sec)

Can't repeat.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.059 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.