boostorg / mysql

MySQL C++ client based on Boost.Asio
https://www.boost.org/doc/libs/master/libs/mysql
Boost Software License 1.0
246 stars 34 forks source link

Ambiguities row/eof packets in the text protocol for very big rows #298

Open anarthal opened 2 weeks ago

anarthal commented 2 weeks ago

The following fails:

SELECT REPEAT('a', 0x1000000)

Because a string_lenenc with such size starts with the EOF packet header. This looks like a design issue in the protocol. Other language drivers solve this by first attempting to parse the packet as a row, and then attempting it as an EOF packet on failure.