Skip to content

Commit

Permalink
updates for Swoole 4.6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
deminy committed May 14, 2021
1 parent d29d712 commit 0d1409b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
8 changes: 5 additions & 3 deletions output/swoole/constants.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

define('SWOOLE_VERSION', '4.6.6');
define('SWOOLE_VERSION_ID', 40606);
define('SWOOLE_VERSION', '4.6.7');
define('SWOOLE_VERSION_ID', 40607);
define('SWOOLE_MAJOR_VERSION', 4);
define('SWOOLE_MINOR_VERSION', 6);
define('SWOOLE_RELEASE_VERSION', 6);
define('SWOOLE_RELEASE_VERSION', 7);
define('SWOOLE_EXTRA_VERSION', '');
define('SWOOLE_DEBUG', '');
define('SWOOLE_HAVE_COMPRESSION', '1');
Expand Down Expand Up @@ -143,6 +143,8 @@
define('SWOOLE_ERROR_SERVER_INVALID_REQUEST', 9010);
define('SWOOLE_ERROR_SERVER_CONNECT_FAIL', 9011);
define('SWOOLE_ERROR_SERVER_WORKER_EXIT_TIMEOUT', 9012);
define('SWOOLE_ERROR_SERVER_WORKER_ABNORMAL_PIPE_DATA', 9013);
define('SWOOLE_ERROR_SERVER_WORKER_UNPROCESSED_DATA', 9014);
define('SWOOLE_ERROR_CO_OUT_OF_COROUTINE', 10001);
define('SWOOLE_ERROR_CO_HAS_BEEN_BOUND', 10002);
define('SWOOLE_ERROR_CO_HAS_BEEN_DISCARDED', 10003);
Expand Down
11 changes: 8 additions & 3 deletions output/swoole_library/src/core/Database/PDOProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,14 @@ public function __call(string $name, array $arguments)
|| $n === 0
|| $this->__object->inTransaction()
) {
$exception = new PDOException($errorInfo[2], $errorInfo[1]);
$exception->errorInfo = $errorInfo;
throw $exception;
/* '00000' means “no error.”, as specified by ANSI SQL and ODBC. */
if (!empty($errorInfo) && $errorInfo[0] !== '00000') {
$exception = new PDOException($errorInfo[2], $errorInfo[1]);
$exception->errorInfo = $errorInfo;
throw $exception;
}
/* no error info, just return false */
break;
}
$this->reconnect();
continue;
Expand Down
6 changes: 4 additions & 2 deletions output/swoole_library/src/core/Database/PDOStatementProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,14 @@ public function __call(string $name, array $arguments)
) {
$errorInfo = $this->__object->errorInfo();

// '00000' means “no error.”, as specified by ANSI SQL and ODBC.
if ($errorInfo[0] !== '00000') {
/* '00000' means “no error.”, as specified by ANSI SQL and ODBC. */
if (!empty($errorInfo) && $errorInfo[0] !== '00000') {
$exception = new PDOException($errorInfo[2], $errorInfo[1]);
$exception->errorInfo = $errorInfo;
throw $exception;
}
/* no error info, just return false */
break;
}
if ($this->parent->getRound() === $this->parentRound) {
/* if not equal, parent has reconnected */
Expand Down

0 comments on commit 0d1409b

Please sign in to comment.