Fix the handling of unsigned values on MySQL

We were sending the right bytes, but we weren't properly setting the
`is_unsigned` flag on the bind parameters, resulting in it always being
sent as signed. This results in a client error about overflow when
deserializing large values, and either a server error or incorrect
results when serializing them.

The fact that the tests for this all used `-1` should have been a huge
red flag, but it slipped through.

Unfortunately, there's no way for us to reasonably fix this without a
breaking change or crazy hacks (we could do something like write an
additional byte at the end if it's unsigned, but that's probably not
worth it to avoid a breaking change). For that reason, we will need to
make the next version of Diesel 2.0. We shouldn't go crazy with this
change, but this would also allow us to make #1457 happen as well.

The other alternative would be to introduce a `Mysql2` backend, and
deprecate the current one.
4 files changed
tree: c1ee0520caa2ce17f0895789ad37f748cf392294
  1. .github/
  2. bin/
  3. diesel/
  4. diesel_cli/
  5. diesel_compile_tests/
  6. diesel_derives/
  7. diesel_migrations/
  8. diesel_tests/
  9. examples/
  10. guide_drafts/
  11. migrations/
  12. .appveyor.yml
  13. .editorconfig
  14. .env.sample
  15. .gitignore
  16. .travis.yml
  17. Cargo.toml
  18. CHANGELOG.md
  19. clippy.toml
  20. code_of_conduct.md
  21. CONTRIBUTING.md
  22. LICENSE-APACHE
  23. LICENSE-MIT
  24. README.md
README.md

A safe, extensible ORM and Query Builder for Rust

Build Status Appveyor Build Status Gitter Crates.io

API Documentation: latest releasemaster branch

Homepage

Diesel gets rid of the boilerplate for database interaction and eliminates runtime errors without sacrificing performance. It takes full advantage of Rust's type system to create a low overhead query builder that “feels like Rust.”

Getting Started

Find our extensive Getting Started tutorial at https://diesel.rs/guides/getting-started. Guides on more specific features are coming soon.

Getting help

If you run into problems, Diesel has a very active Gitter room. You can come ask for help at gitter.im/diesel-rs/diesel

Code of conduct

Anyone who interacts with Diesel in any space, including but not limited to this GitHub repository, must follow our code of conduct.

License

Licensed under either of these:

Contributing

Unless you explicitly state otherwise, any contribution you intentionally submit for inclusion in the work, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions.