Bug #103427 | potential bug in parse_packet | ||
---|---|---|---|
Submitted: | 22 Apr 2021 9:28 | Modified: | 7 May 2021 12:13 |
Reporter: | Siyuan Ren | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: C API (client library) | Severity: | S3 (Non-critical) |
Version: | 8.0.22 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | open_cursor, parse_packet, protocol |
[22 Apr 2021 9:28]
Siyuan Ren
[23 Apr 2021 10:21]
Siyuan Ren
I found this commit(https://github.com/mysql/mysql-connector-python/commit/1d4f43557b78906d334e378036891794d75...) that fixed the open_cursor flag to be always 0. In prior example I used older version mysql-connector thus the flag is set to 128 in _prepare_binary_integer(). Let's me answer my questions: protocols are used in a LIFO mannar which do different operations on THD::packet. Protocol_binary is pushed before stmt execution in mysqld_stmt_execute() and popped after execution.
[28 Apr 2021 2:53]
MySQL Verification Team
Hi, Are you confirming you do not have a problem with the latest python connector? thanks
[28 Apr 2021 8:19]
Siyuan Ren
Yea, it runs without problems with the latest python connector. However, the bug point is that the `open_cursor` flag is casted into a boolean value, followed by a bitwise AND to determine doing some opening cursor things.
[7 May 2021 12:13]
MySQL Verification Team
Hi, Thanks! That does seem like a bug :) all best Bogdan