安装说明

- 下载和解压MySQL 8.0.25源码包。
1 2 3 4
cd /home wget https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz --no-check-certificate tar -zxvf mysql-boost-8.0.25.tar.gz cd mysql-8.0.25
- 源码git初始化。
1 2 3
git init git add -A git commit -m "init"
- patch补丁文件下载。
1
wget https://gitee.com/kunpengcompute/mysql-server/releases/download/KunpengBoostKit22.0.RC2.ThreadPool/code-threadpool-for-MySQL-8.0.25.patch --no-check-certificate
- 查看提交之后是否有内容修改。
1
git status
如下所示新增了一个0001-THREAD_POOL_8.patch文件。1 2 3 4 5 6
# On branch master # Untracked files: # (use "git add <file>..." to include in what will be committed) # # code-threadpool-for-MySQL-8.0.25.patch nothing added to commit but untracked files present (use "git add" to track)
- 检查补丁文件与MySQL源码是否冲突。
1
git apply --check code-threadpool-for-MySQL-8.0.25.patch
若无报错即表示匹配可应用补丁。
- 应用补丁文件。
1
git apply --whitespace=nowarn code-threadpool-for-MySQL-8.0.25.patch
打印输出信息如下,warning信息可忽略,无error信息即表示补丁应用成功。
补丁应用生效后,可在“plugin/”路径下看到新增目录thread_pool,内含threadpool_unix.cc、threadpool_common.cc、threadpool.h、threadpool_unix.h四个文件。
父主题: MySQL 8.0.25 线程池特性指南