Skip to content

Instantly share code, notes, and snippets.

@niczero
Last active November 19, 2015 13:25
Show Gist options
  • Save niczero/91364eadd238abc41e83 to your computer and use it in GitHub Desktop.
Save niczero/91364eadd238abc41e83 to your computer and use it in GitHub Desktop.
How to build and patch Percona's MySQL on Debian

Download

wget https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.27-75.0/source/debian/percona-server-5.6_5.6.27-75.0-1.debian.tar.gz
wget https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.27-75.0/source/debian/percona-server-5.6_5.6.27-75.0-1.dsc
wget https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.27-75.0/source/debian/percona-server-5.6_5.6.27-75.0-1_source.changes
wget https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.27-75.0/source/debian/percona-server-5.6_5.6.27-75.0.orig.tar.gz
apt-get --only-source build-dep percona-server-5.6
dpkg-source -x percona-server-5.6_5.6.27-75.0-1.dsc
cd percona-server-5.6-5.6.27-75.0

Patch

patch -p0 <../fix-secure_auth.patch
vi debian/changelog

Build

debian/rules binary
--- sql-common/client.c.orig 2014-11-21 10:02:01.000000000 +0000
+++ sql-common/client.c 2014-12-11 18:09:14.753020367 +0000
@@ -1310,7 +1310,7 @@
options->client_flag|= CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS;
break;
case OPT_secure_auth:
- options->secure_auth= TRUE;
+ options->secure_auth= (!opt_arg || atoi(opt_arg) != 0) ? TRUE : FALSE;
break;
case OPT_report_data_truncation:
options->report_data_truncation= opt_arg ? MY_TEST(atoi(opt_arg)) : 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment