Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
sql: fix pgwire parsing certain binary encodings of numeric values an order of magnitude off #35115
Some numeric values can be encoded in multiple ways on the wire. For example, 1000000 may be encoded as:
This specific case works and is tested by
This encoding results in Cockroach producing a value that's an order of magnitude larger than intended (10000000). Importantly, this is the encoding used by Diesel in the Rust world.
The issue was found in
Test cases for failing examples were added in the form of