Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: Fix regex in stats code
......................................................................


Fix regex in stats code

Bug: T112922
Change-Id: I1aad071e2eb3be8b59c2304a8c358d1ce9cb222e
---
M debian/changelog
A debian/patches/fix_stats_error.patch
M debian/patches/series
3 files changed, 32 insertions(+), 8 deletions(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved



diff --git a/debian/changelog b/debian/changelog
index 2f8dcce..0a2270a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,15 @@
+hhvm (3.6.5+dfsg1-1+wm7) trusty-wikimedia; urgency=medium
+
+  * Fix Regex in sql statistics code
+
+ -- Giuseppe Lavagetto <[email protected]>  Thu, 01 Oct 2015 12:49:26 
+0200
+
 hhvm (3.6.5+dfsg1-1+wm6) trusty-wikimedia; urgency=medium
 
-  * Fix ReflectionClass::getMethods filter 
-  * filter_var_array: do not fall back to FILTER_DEFAULT 
-  * Avoid including webscalesqlclient completely 
-  * Limit log message length for unserialize failures 
+  * Fix ReflectionClass::getMethods filter
+  * filter_var_array: do not fall back to FILTER_DEFAULT
+  * Avoid including webscalesqlclient completely
+  * Limit log message length for unserialize failures
 
  -- Giuseppe Lavagetto <[email protected]>  Tue, 15 Sep 2015 12:23:50 
+0200
 
@@ -89,19 +95,19 @@
 
 hhvm (3.3.0+dfsg1-1+wm5) trusty-wikimedia; urgency=medium
 
-  * Add EZC fixes from https://github.com/facebook/hhvm/pull/4330  
+  * Add EZC fixes from https://github.com/facebook/hhvm/pull/4330
 
  -- Giuseppe Lavagetto <[email protected]>  Tue, 02 Dec 2014 13:26:32 
+0100
 
 hhvm (3.3.0+dfsg1-1+wm4) trusty-wikimedia; urgency=medium
 
-  * Add the /jemalloc-status endpoint to the admin server 
+  * Add the /jemalloc-status endpoint to the admin server
 
  -- Giuseppe Lavagetto <[email protected]>  Mon, 10 Nov 2014 13:25:11 
+0100
 
 hhvm (3.3.0+dfsg1-1+wm3.1) trusty-wikimedia; urgency=medium
 
-  * Rebuild with RelWithDebInfo 
+  * Rebuild with RelWithDebInfo
 
  -- Giuseppe Lavagetto <[email protected]>  Fri, 07 Nov 2014 06:28:27 
+0100
 
@@ -109,7 +115,7 @@
   [Wikimedia specific]
   * debian/patches:
     - Added a patch to fix the memleaks and the segfaults with domDocument
-    - Added patch to fix the restart behaviour of HHVM 
+    - Added patch to fix the restart behaviour of HHVM
 
  -- Giuseppe Lavagetto <[email protected]>  Thu, 06 Nov 2014 09:57:59 
+0100
 
diff --git a/debian/patches/fix_stats_error.patch 
b/debian/patches/fix_stats_error.patch
new file mode 100644
index 0000000..6343800
--- /dev/null
+++ b/debian/patches/fix_stats_error.patch
@@ -0,0 +1,17 @@
+Description: correctly enclose PCRE when collecting statistics.
+Author: Giuseppe Lavagetto <[email protected]>
+Forwarded: no
+Last-Update: 2015-09-21
+
+-Index: hhvm/hphp/runtime/ext/mysql/mysql_common.cpp
+--- a/hphp/runtime/ext/mysql/mysql_common.cpp
++++ b/hphp/runtime/ext/mysql/mysql_common.cpp
+@@ -1376,7 +1376,7 @@ MySQLQueryReturn php_mysql_do_query(const String& query, 
const Variant& link_id,
+       if (RuntimeOption::EnableStats && RuntimeOption::EnableSQLTableStats) {
+         MySqlStats::Record(verb, rconn->m_xaction_count, table);
+         if (verb == "update") {
+-          HHVM_FN(preg_match)("([^\\s,]+)\\s*=\\s*([^\\s,]+)[\\+\\-]",
++          HHVM_FN(preg_match)("/([^\\s,]+)\\s*=\\s*([^\\s,]+)[\\+\\-]/",
+                               q, ref(matches));
+           size = matches.toArray().size();
+           if (size > 2 && same(matches.toArray()[1], matches.toArray()[2])) {
diff --git a/debian/patches/series b/debian/patches/series
index 20f5260..64adb14 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,6 +3,7 @@
 pass-DNDEBUG-to-RelWithDebInfo.patch
 use_system_TZinfo.patch
 do_not_link_async_mysql.patch
+fix_stats_error.patch
 
 # WMF specific patches go here
 add-jemalloc-prof-status.patch

-- 
To view, visit https://gerrit.wikimedia.org/r/239816
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1aad071e2eb3be8b59c2304a8c358d1ce9cb222e
Gerrit-PatchSet: 2
Gerrit-Project: operations/debs/hhvm
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to