Patch Usage Description
To use the MySQL parallel query tuning feature, apply the patch to the MySQL source code, and then compile and install MySQL.
Perform the following steps:
- Download the MySQL source code based on Table 1 and save it to the target path, for example, /home.
Table 1 Download URLs of different MySQL versions Version
Download URL
MySQL 8.0.20
https://github.com/mysql/mysql-server/archive/mysql-8.0.20.tar.gz
The code downloaded from GitHub does not contain the boost folder. You can download the source code containing boost from the official MySQL website and obtain the boost folder from the source code. The path of the boost folder will be used during compilation.
- Download the patch package of the MySQL parallel query tuning feature based on Table 2.
Table 2 Patch packages for different MySQL versions Supported Version
Patch Package
Description
MySQL 8.0.20
Source code patch, which contains all the code required by parallel query.
Patch for MTR tests in mysql-test, which ensures that all MTR tests are passed.
- The patch package is generated based on MySQL 8.0.20 and 8.0.25 in the Gitee community.
- The patch package has been verified on the AArch64 Linux platform.
- The patch package does not support the x86 hardware platform.
- Decompress the source package and go to the MySQL source code directory.
tar -zxvf mysql-boost-8.0.20.tar.gz cd mysql-8.0.20
- In the root directory of the source code, run the git init command to create Git management information.
git init git add -A git commit -m "Initial commit"
- Generally, Git is provided by the system. If not, configure the Yum source by following instructions in MySQL Porting Guide and then install Git.
1yum install git
- If the Git submission user information is not configured, configure the user email and user name before running the git commit command.
1 2
git config user.email "123@example.com" git config user.name "123"
- Generally, Git is provided by the system. If not, configure the Yum source by following instructions in MySQL Porting Guide and then install Git.
- Apply the patch of the MySQL parallel query tuning feature.
1 2
git apply --whitespace=nowarn -p1 < mtr-pq.patch git apply --whitespace=nowarn -p1 < code-pq.patch
If no error information is displayed, the patch is successfully installed.
- Compile and install the MySQL source code. For details, see MySQL Porting Guide.