Rate This Document
Findability
Accuracy
Completeness
Readability

Patch Usage

The procedure is as follows:

  1. Download the MySQL source code based on Table 1 and save it to the target path, for example, /home.
    Table 1 Download URLs for different MySQL versions

    Version

    Download URL

    MySQL 8.0.20

    Link

    MySQL 8.0.25

    Link

    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.

  2. 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

    code-pq.patch

    Source code patch, which contains all the code required by parallel query.

    mtr-pq.patch

    Patch for MTR tests in mysql-test, which ensures that all MTR tests are passed.

    MySQL 8.0.25

    code-pq-for-MySQL-8.0.25.patch

    Source code patch, which contains all the code required by parallel query.

    mtr-pq-for-MySQL-8.0.25.patch

    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.
  3. 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
    
  4. 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.
      1
      yum 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"
      
  5. 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.

  6. Compile and install the MySQL source code. For details, see MySQL Porting Guide.