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

Notice when decoding OK packets #29

Closed
marcioAlmada opened this issue Mar 24, 2017 · 4 comments
Closed

Notice when decoding OK packets #29

marcioAlmada opened this issue Mar 24, 2017 · 4 comments

Comments

@marcioAlmada
Copy link
Contributor

Looking at server logs the following notice happens quite frequently:

notice Uninitialized string offset: 9 in ../vendor/amphp/mysql/lib/DataTypes.php on line 202

Database interaction works fine, but this impedes usage of a more picky error handler.

@marcioAlmada
Copy link
Contributor Author

marcioAlmada commented Mar 25, 2017

A stack trace:

Exception: Uninitialized string offset: 9 in /amphp/mysql/lib/DataTypes.php:204
Stack trace:
#0 /amphp/mysql/lib/DataTypes.php(204): Aerys\Bootstrapper->{closure}(8, 'Uninitialized s...', '/.../...', 204, Array)
#1 /amphp/mysql/lib/DataTypes.php(196): Amp\Mysql\DataTypes::decodeIntOff('\x00\x01\xFC\xC7\x0E\x03\x00\x00\x00', 9)
#2 /amphp/mysql/lib/Processor.php(427): Amp\Mysql\DataTypes::decodeStringOff('\x00\x01\xFC\xC7\x0E\x03\x00\x00\x00', 9)
#3 /amphp/mysql/lib/Processor.php(462): Amp\Mysql\Processor->parseOk('\x00\x01\xFC\xC7\x0E\x03\x00\x00\x00')
#4 /amphp/mysql/lib/Processor.php(1091): Amp\Mysql\Processor->handleOk('\x00\x01\xFC\xC7\x0E\x03\x00\x00\x00')
#5 /amphp/mysql/lib/Processor.php(931): Amp\Mysql\Processor->parsePayload('\x00\x01\xFC\xC7\x0E\x03\x00\x00\x00')
#6 /amphp/amp/lib/UvReactor.php(424): Amp\Mysql\Processor->onRead('000000005a1097e...', Resource id #250, NULL)
#7 /amphp/amp/lib/UvReactor.php(401): Amp\UvReactor->invokePollWatcher(Object(stdClass))

@marcioAlmada
Copy link
Contributor Author

It seems $off should not be 9 in this case https://dev.mysql.com/doc/internals/en/packet-OK_Packet.html

@marcioAlmada marcioAlmada changed the title Notice on DataTypes.php on line 202 Notice when decoding OK packets Mar 25, 2017
@marcioAlmada
Copy link
Contributor Author

marcioAlmada commented Apr 7, 2017

I can no longer reproduce the issue after 21801b0#diff-b7c6c28a97dddfea08068fa97b76dafdR426 :D

Can we close this one?

@bwoebi
Copy link
Member

bwoebi commented Apr 7, 2017

Oh, I thought I already committed that beforehand. Looks like I missed to commit something in between.

Well, if that fixes it, then let's close this issue :-)

@bwoebi bwoebi closed this as completed Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants