[packages/hhvm/dev-3.6: 6/20] fix webscalesql build

glen glen at pld-linux.org
Tue Apr 7 10:20:47 CEST 2015


commit 0c49d3c6f0ae5eb0d47196a56b90002999f457c6
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Apr 6 10:07:49 2015 +0300

    fix webscalesql build

 hhvm.spec                   |  2 ++
 webscalesql-5.6-build.patch | 60 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+)
---
diff --git a/hhvm.spec b/hhvm.spec
index ac3c98b..faa44c5 100644
--- a/hhvm.spec
+++ b/hhvm.spec
@@ -64,6 +64,7 @@ Source12:	php.ini
 Source100:	get-source.sh
 Patch2:		hphpize.patch
 Patch5:		cmake.patch
+Patch6:		webscalesql-5.6-build.patch
 URL:		https://github.com/facebook/hhvm/wiki
 BuildRequires:	ImageMagick-devel
 BuildRequires:	a52dec-libs-devel
@@ -275,6 +276,7 @@ mv proxygen-* third-party/proxygen/src
 
 %patch2 -p1
 #%patch5 -p1
+%patch6 -p1 -d third-party/webscalesqlclient/webscalesql-5.6
 
 # prefer ones from system
 rm CMake/FindBISON.cmake
diff --git a/webscalesql-5.6-build.patch b/webscalesql-5.6-build.patch
new file mode 100644
index 0000000..2d2fe3e
--- /dev/null
+++ b/webscalesql-5.6-build.patch
@@ -0,0 +1,60 @@
+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/hhvm.git/commitdiff/29a3971a9677d3f2f66508505458f8da4876b5e2



More information about the pld-cvs-commit mailing list