[packages/webscalesql: 2/4] fix build

glen glen at pld-linux.org
Tue Apr 7 20:30:57 CEST 2015


commit 0a8250fae501b4c9e92b57e4bf89d2e51c9d9cf6
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Apr 7 21:23:09 2015 +0300

    fix build

 webscalesql-5.6-build.patch | 61 +++++++++++++++++++++++++++++++++++++++++++++
 webscalesql.spec            |  2 ++
 2 files changed, 63 insertions(+)
---
diff --git a/webscalesql.spec b/webscalesql.spec
index c11cdf1..cb2348f 100644
--- a/webscalesql.spec
+++ b/webscalesql.spec
@@ -14,6 +14,7 @@ License:	GPL + MySQL FLOSS Exception
 Group:		Applications/Databases
 Source0:	https://github.com/webscalesql/webscalesql-5.6/archive/%{gitrev}/%{name}-5.6-%{gitrev}.tar.gz
 # Source0-md5:	5ee76824913ff96ba70b68d8aeb50e49
+Patch0:		%{name}-5.6-build.patch
 URL:		http://webscalesql.org/
 BuildRequires:	cmake >= 2.6
 %{?with_ssl:BuildRequires:	openssl-devel >= 0.9.7d}
@@ -59,6 +60,7 @@ WebScaleSQL static libraries.
 %prep
 %setup -qc
 mv webscalesql-5.6-*/* .
+%patch0 -p1
 
 # to get these files rebuilt
 [ -f sql/sql_yacc.cc ] && %{__rm} sql/sql_yacc.cc
diff --git a/webscalesql-5.6-build.patch b/webscalesql-5.6-build.patch
new file mode 100644
index 0000000..a086aef
--- /dev/null
+++ b/webscalesql-5.6-build.patch
@@ -0,0 +1,61 @@
+https://github.com/facebook/hhvm/issues/5100
+https://github.com/webscalesql/webscalesql-5.6/commit/13e32199550b144252b07cbdba9c80e1ceeef7bf
+
+From 13e32199550b144252b07cbdba9c80e1ceeef7bf Mon Sep 17 00:00:00 2001
+From: Steaphan Greene <steaphan at oculus.com>
+Date: Fri, 20 Feb 2015 09:33:13 -0800
+Subject: [PATCH] Fix DTrace funtions in Async Client
+
+Summary:
+WebScaleSQL Feature: Async Client
+
+This fixes a bad code duplication with the upstream 6.0 DTrace patches,
+which is in the WebScaleSQL Async Client patch.
+
+This code is not actully built (the macro is defined to empty), when not
+built with dtrace (or systemtap) so we did not detect this problem.
+
+Fortunately, someone else did, and reported it:
+https://github.com/webscalesql/webscalesql-5.6/issues/17
+
+I will squash this commit with the Async Client diff in future branches:
+* https://reviews.facebook.net/D17031
+
+Test Plan:
+Installed systemtap on a dev machine, and confirmed the error.
+
+Then, I fixed the incorect argument to the macro (based on the other
+similar function), and built again, and all is now well.
+
+Reviewers: chip, pivanof, darnaut, jeremycole, inaam-rana
+
+Reviewed By: inaam-rana
+
+Subscribers: liang.guo.752, chip, atcurtis, steaphan, methane, darnaut, fe
+
+Differential Revision: https://reviews.facebook.net/D33777
+---
+ sql/net_serv.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/sql/net_serv.cc b/sql/net_serv.cc
+index b71d622..a97bf5e 100644
+--- a/sql/net_serv.cc
++++ b/sql/net_serv.cc
+@@ -531,6 +531,7 @@ net_write_command_nonblocking(NET *net, uchar command,
+                               const uchar *packet, size_t packet_len,
+                               my_bool* res)
+ {
++  size_t length=packet_len+1+prefix_len;		/* 1 extra byte for command */
+   net_async_status status;
+   ssize_t rc;
+   DBUG_ENTER(__func__);
+@@ -544,7 +545,7 @@ net_write_command_nonblocking(NET *net, uchar command,
+ 
+   switch (net->async_operation) {
+     case NET_ASYNC_OP_IDLE:
+-      MYSQL_NET_WRITE_START(len);
++      MYSQL_NET_WRITE_START(length);
+       if (!begin_packet_write_state(net, command, packet, packet_len, prefix, prefix_len)) {
+         *res = 0;
+         goto done;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/webscalesql.git/commitdiff/e9e1f5742928e711ae15e0514e144bfdf62fde47



More information about the pld-cvs-commit mailing list