@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove obsolete supportsAsyncQueries() check for MYSQLI_ASYNC

Summary:
This function only checks for `defined('MYSQLI_ASYNC')`. That is always true as the old, non-mysqlnd driver was removed in PHP 7.0.0 according to https://www.php.net/manual/en/intro.mysql.php, and rP23a49eb4 and rP7d8c84a7 bumped the required PHP version from 5.2.3 to 7.2.25.

This was a public function; probably worth to mention in the ChangeLog for third parties.

Closes T16235

Test Plan: Unknown.

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16235

Differential Revision: https://we.phorge.it/D26289

+1 -24
-5
src/infrastructure/storage/connection/AphrontDatabaseConnection.php
··· 58 58 return call_user_func_array('queryfx', $args); 59 59 } 60 60 61 - 62 - public function supportsAsyncQueries() { 63 - return false; 64 - } 65 - 66 61 public function setReadOnly($read_only) { 67 62 $this->readOnly = $read_only; 68 63 return $this;
+1 -5
src/infrastructure/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php
··· 138 138 // If we have a query time limit, run this query synchronously but use 139 139 // the async API. This allows us to kill queries which take too long 140 140 // without requiring any configuration on the server side. 141 - if ($time_limit && $this->supportsAsyncQueries()) { 141 + if ($time_limit) { 142 142 $conn->query($raw_query, MYSQLI_ASYNC); 143 143 144 144 $read = array($conn); ··· 240 240 241 241 protected function getErrorDescription($connection) { 242 242 return $connection->error; 243 - } 244 - 245 - public function supportsAsyncQueries() { 246 - return defined('MYSQLI_ASYNC'); 247 243 } 248 244 249 245 public function asyncQuery($raw_query) {
-14
src/infrastructure/storage/future/QueryFuture.php
··· 55 55 return true; 56 56 } 57 57 58 - if (!$this->conn->supportsAsyncQueries()) { 59 - $conns = array(); 60 - $conn_queries = array(); 61 - foreach (self::$futures as $id => $future) { 62 - $hash = spl_object_hash($future->conn); 63 - $conns[$hash] = $future->conn; 64 - $conn_queries[$hash][$id] = $future->query; 65 - } 66 - foreach ($conn_queries as $hash => $queries) { 67 - $this->processResults($conns[$hash]->executeRawQueries($queries)); 68 - } 69 - return true; 70 - } 71 - 72 58 if (!$this->async) { 73 59 $profiler = PhutilServiceProfiler::getInstance(); 74 60 $this->profilerCallID = $profiler->beginServiceCall(