[MYSQL] mysql新版本(8.0.38)引入新BUG. (建议不要使用Mysql最新版)

2024年 7月 12日 48.0k 0

导读

看到percona发了篇Do Not Upgrade to Any Version of MySQL After 8.0.37. 说是mysql新版本有BUG.
当数据库存在大量的表的时候, 重启就会crash.

复现

本次使用Mysql 8.0.38 社区版做测试. 可使用如下脚本快速创建10001张表

import pymysql
conn = pymysql.connect(
host='127.0.0.1',
port=3376,
user='root',
password='123456',
)

for i in range(10001):
cursor = conn.cursor()
#cursor.execute(f'drop table db1.t20240712_{i}')
cursor.execute(f'create table db1.t20240712_{i}(id int, name varchar(200))')
data = cursor.fetchall()
conn.commit()

然后重启mysqld进程. 我们就能在日志中发现如下crash信息

2024-07-12T02:36:45.561391Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-07-12T02:36:45Z UTC - mysqld got signal 11 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
BuildID[sha1]=96a3ee772d1d213bc36262ae5f5c23c7b9f61b30
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x100000
/soft/mysql_3376/mysqlbase/mysql/bin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x3d) [0x212497d]
/soft/mysql_3376/mysqlbase/mysql/bin/mysqld(print_fatal_signal(int)+0x37f) [0xfe3fff]
/soft/mysql_3376/mysqlbase/mysql/bin/mysqld(handle_fatal_signal+0xa5) [0xfe40b5]
/lib64/libpthread.so.0(+0xf630) [0x7fc6e4cee630]
/soft/mysql_3376/mysqlbase/mysql/bin/mysqld(Validate_files::check(__gnu_cxx::__normal_iterator const&, __gnu_cxx::__normal_iterator const&, unsigned long)+0x8ae) [0x2170c8e]
/soft/mysql_3376/mysqlbase/mysql/bin/mysqld(std::thread::_State_impl

相关文章

发布评论