5.7打补丁—编译和官方一致的Linux_Generic包

5.7打补丁—编译和官方一致的Linux_Generic包

需求来源

某客户现场业务系统出现了查询丢失数据问题(数据库为MySQL 5.7.21,使用Linux-Generic包部署)。

已查明:丢数据问题是触发了MySQL 5.7的一个bug,该bug在5.7的后继版本已修复。

客户不想升级数据库版本,希望将fix的代码打到5.7.21重新编译后替换二进制。

编译步骤

准备包、源码和编译OS

从MySQL 5.7.19到MySQL 5.7.44,官方发布的Linux-Generic包一直使用的是glibc-2.12。

本文中,使用MySQL 5.7.21进行编译,对应的官方release包如下:

file

MySQL 5.7.21二进制包下载地址:https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz

MySQL 5.7.21源码仓库github地址:GitHub - mysql/mysql-server at mysql-5.7.21

MySQL 5.7的手册中"根据源码安装MySQL:https://dev.mysql.com/doc/refman/5.7/en/source-installation.html"

章节中有如下内容,可参考"docs/INFO_BIN"文件中的内容获取官方编译时的环境信息:

If you are interested in building MySQL from a source distribution using build options the same as or similar to those use by Oracle to produce binary distributions on your platform, obtain a binary distribution, unpack it, and look in the docs/INFO_BIN file, which contains information about how that MySQL distribution was configured and compiled.

解压安装包查看"docs/INFO_BIN"文件,可看到一系列的编译相关信息,其中kernel和cmake版本信息如下:

Build was done on  Linux-3.8.13-16.2.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值