sqlx: unknown message type: '\u{0}' for postgres
During benchmarking, I’ve got a lot of errors as next:
ERROR sqlx_core::pool::connection] error occurred while flushing the connection: encountered unexpected or invalid data: unknown message type: '\u{0}'
Idk is it related to this issue, but in postgres I also have next warning: [550] WARNING: there is no transaction in progress (in app I have a transaction, and seems for some reason it was not started)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 23 (19 by maintainers)
@jakedeichert you should be aware that #1099 is not a perfect fix: although it works well in practice, there’s still a small chance of the error occuring. Only 0.6 will truly fix the issue. (Of course that may be fine for your use case)
The next big release of SQLx (likely 0.6) is currently having its core rewritten from scratch and keeping this in mind while doing so.
This is honestly a nasty problem and a big footgun for new and experienced async Rust developers. I’m not sure what a good solution here (for long-term Rust) as it doesn’t look very trivial to lint against.
Sorry for the MySQL but that’s what I’ve chosen to do this to first (as it seemed to have the worst bugs being reported in relation to it):
Here is
recv_packet(in MySQL) from master:and here is it in
next(likely 0.6):