Patch Usage
The procedure is as follows:
- Download the MySQL source code based on Table 1 and save it to the target path, for example, /home.
The code downloaded from GitHub does not contain the boost folder. You can download the source code containing boost from the MySQL official website and obtain the boost folder from the source code. The path to the boost folder will be used during compilation.
- Download the patch packages 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.
MySQL 8.0.25
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 packages are generated based on MySQL 8.0.20 and 8.0.25 in the Gitee community.
- The patch packages have been verified on the AArch64 Linux platform.
- The patch packages do not support the x86 hardware platform.
- Decompress the source package and go to the MySQL source code directory.
1 2
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.
1 2 3
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 commit 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 patches 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 patches are successfully installed.
- Compile and install the MySQL source code. For details, see MySQL Porting Guide.