Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

任何出错都把$e中errorInfo的错误码换成了1149 #57

Closed
scguang301 opened this issue Sep 25, 2019 · 1 comment
Closed

任何出错都把$e中errorInfo的错误码换成了1149 #57

scguang301 opened this issue Sep 25, 2019 · 1 comment

Comments

@scguang301
Copy link

Describe Your Environment (描述你的环境)

  • System: centos7.2
  • PHP version: 7.1.3
  • Mysql version: 5.7
  • Swoole version: 4.3.3
  • SMProxy version: 1.2.8

How to Reproduce the Problem? (如何重现问题)

try {
} catch(Throwable $e){
$e
}

  1. 任何出错都把$e中errorInfo的错误码换成了1149。
    看代码是MysqlProxy -》onClientReceive
    //ERROR Packet
    if ($binaryPacket->data[4] == ErrorPacket::$FIELD_COUNT) {
    $errorPacket = new ErrorPacket();
    $errorPacket->read($binaryPacket);
    $errorPacket->errno = ErrorCode::ER_SYNTAX_ERROR;
    $data = getString($errorPacket->write());
    }
    请问和这样处理,而不是直接转发mysql的错误?

Expected Behavior (预期行为)

mysql的错误码
...

Actual Behavior (实际行为)

...

More Information (更多信息)

...

@louislivi
Copy link
Owner

3f6eb03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants