diesel-rs/diesel
 Watch   
 Star   
 Fork   
10 days ago
diesel

Diesel 2.3.13

Fixed

  • Fixed interaction between then_order_by and distinct_on to reject otherwise broken SQL queries
  • Fix a clippy::redundant_field_names lint warning generated by #[derive(QueryableByName)]
  • MySQL and MariaDB now decode a value according to the signedness the server reports for its column, so a SMALLINT UNSIGNED holding 40000 read as Integer returns 40000 rather than -25536
  • Potential stackoverflow on deeply nested JSONB values for the SQLite backend
  • Fixed a possible null pointer dereference in the custom SQLite aggregate function support when SQLite fails to allocate the aggregate state
  • Fixed undefined behavior in SqliteConnection::serialize_database_to_buffer when SQLite returns a null buffer for an empty deserialized database or an allocation failure. SerializedDatabase::as_slice is deprecated in favor of the new SerializedDatabase::try_as_slice, which reports the allocation failure as an error instead of panicking.
  • Fixed SQLite value reads to panic instead of creating invalid slices or returning incorrect data when SQLite allocation fails. Row iteration reports a failed value duplication as an error instead.
  • Fixed a use after free where reading a SQLite value in a second representation, for example a blob as text, invalidated slices another SqliteValue of the same field had returned. Such a read now works on a copy of the value.
  • Fixed broken prepared statement caching for queries using positional ordering and window functions with frame offset clauses
  • Fixed a potential panic while deserializing a PgInterval type from a too short buffer
  • Fixed encoding floating point values without a decimal part in a roundtrip safe way in SQLite's jsonb encoding
  • Fixed a potential panic while deserializing a PgInterval type from a too short buffer
  • Fixed potential code injections in the generated schema.rs file caused by malicious database identifiers

I would like to thank @LucaCappelletti94 , @Eh2406 (as @rustfoundation AI security engineer) and @weareaisle for reporting issues covered in this release.

Full Changelog: https://github.com/diesel-rs/diesel/compare/v2.3.12...v2.3.13

You can support the development of Diesel by:

  • Contributing Code, Documentation or Guides. Checkout the planing for Diesel 2.4 for open tasks.
  • Providing knowledge and help to maintain the MySQL/MariaDB backend. This is currently the only in-tree backend that is not used by any maintainers, so having someone around that actually uses this backend would be very helpful for the Diesel project.
  • Answering questions in our discussion forum
  • Reporting bugs in our issue tracker
  • Helping triaging issues in our issue tracker
  • Sponsoring the maintainers.
2026-08-07 14:04:30
diesel

Diesel 2.3.12

Fixes

  • Fixed FromSql/ToSql for chrono::NaiveTime on MySQL dropping the fractional-seconds component of TIME values, so a TIME(N) column now round-trips its microseconds like DATETIME / TIMESTAMP already did.
  • Extended libsqlite3-sys support to include 0.38

Full Changelog: https://github.com/diesel-rs/diesel/compare/v2.3.11...v2.3.12

You can support the development of Diesel by:

  • Contributing Code, Documentation or Guides. Checkout the planing for Diesel 2.4 for open tasks.
  • Providing knowledge and help to maintain the MySQL/MariaDB backend. This is currently the only in-tree backend that is not used by any maintainers, so having someone around that actually uses this backend would be very helpful for the Diesel project.
  • Answering questions in our discussion forum
  • Reporting bugs in our issue tracker
  • Helping triaging issues in our issue tracker
  • Sponsoring the maintainers.
2026-07-10 13:59:17
diesel

Diesel 2.3.11

Fixes

  • Fixed several potential panics in PostgreSQL (de)serialization code
  • Fixed using .load() batch inserts and returning clauses on the SQLite backend
  • Harden usage of SqliteConnection::deserialize_read_only_database()

Full Changelog: https://github.com/diesel-rs/diesel/compare/v2.3.10...v2.3.11

You can support the development of Diesel by:

  • Contributing Code, Documentation or Guides. Checkout the planing for Diesel 2.4 for open tasks.
  • Providing knowledge and help to maintain the MySQL/MariaDB backend. This is currently the only in-tree backend that is not used by any maintainers, so having someone around that actually uses this backend would be very helpful for the Diesel project.
  • Answering questions in our discussion forum
  • Reporting bugs in our issue tracker
  • Helping triaging issues in our issue tracker
  • Sponsoring the maintainers.
2026-06-05 14:28:32
diesel

Diesel 2.3.10

Fixes

  • Fixed a wrong value of a internal MYSQL flag
  • Fixed several possible panics in the PostgreSQL deserialization code for malformed packages in the
  • Fixed an issue that caused unexpected results while calling custom aggregated SQL functions twice in the SQLite backend
  • Fixed a potential use after free bug in the SQLite backend while deserializing a database from a byte buffer
  • Fixed potential invalid schema generation if column or table names "inject" rust code
  • Fixed potential SQL injections during schema introspection via diesel print-schema
  • Fixed a regression that resulted in rejecting valid combinations of ORDER BY and GROUP BY clauses

Full Changelog: https://github.com/diesel-rs/diesel/compare/v2.3.9...v2.3.10

You can support the development of Diesel by:

  • Contributing Code, Documentation or Guides. Checkout the planing for Diesel 2.4 for open tasks.
  • Providing knowledge and help to maintain the MySQL/MariaDB backend. This is currently the only in-tree backend that is not used by any maintainers, so having someone around that actually uses this backend would be very helpful for the Diesel project.
  • Answering questions in our discussion forum
  • Reporting bugs in our issue tracker
  • Helping triaging issues in our issue tracker
  • Sponsoring the maintainers.
2026-04-30 20:18:41
diesel

Diesel 2.3.9

Fixed

  • Removed a dbg! statement from the Mysql backend that caused unwanted output
  • Fix a regression in #[derive(AsChangeset)] introduced in 2.3.8 where structs with a type or const generic parameter referenced in a field type failed to compile with error[E0425]: cannot find type 'T' in this scope. The diagnostic helper functions added to improve AsChangeset error messages now forward all generic parameters of the input struct, not only lifetimes.

You can support the development of Diesel by:

  • Contributing Code, Documentation or Guides. Checkout the planing for Diesel 2.4 for open tasks.
  • Providing knowledge and help to maintain the MySQL/MariaDB backend. This is currently the only in-tree backend that is not used by any maintainers, so having someone around that actually uses this backend would be very helpful for the Diesel project.
  • Answering questions in our discussion forum
  • Reporting bugs in our issue tracker
  • Helping triaging issues in our issue tracker
  • Sponsoring the maintainers.
2026-04-24 17:23:58
diesel

Diesel 2.3.8

Fixed

  • Added support for libsqlite3-sys 0.37.0
  • Raise a compile-time error when mixing aggregate and non-aggregate expressions in an ORDER BY clause without a GROUP BY clause
  • Calling .count() or .select(aggregate_expr) on a query that already has a non-aggregate .order_by() clause now raises a compile-time error instead of generating invalid SQL that would be rejected by the database at runtime (fixes #3815)
  • Added documentation for migration transaction behaviour at the crate root
  • Improved compile time error messages for #[derive(AsChangeset)]
  • Allow to use generic types in infix_operator!()
  • Fixes for several instances of unsound, unspecified or otherwise dangerous behaviour:
    • Unsound string construction in SqliteValue::read_text/FromSql<Text, Sqlite> for String
    • Invalid alignment for over aligned data in SqliteConnection::register_function for aggregate functions
    • Potential memory leaks in SqliteConnection::register_function
    • Access to padding bytes while serializing Date/time types in the Mysql backend
    • SQL Option Injection in PostgreSQL COPY FROM/TO
    • Unspecified pointer cast in Debug/Display implementation of batch INSERT statements for SQLite
    • Invalid call order of SQLite API functions in SqliteValue::read_text/FromSql<Text, Sqlite> for String/SqliteValue::read_blob()/FromSql<Binary, Sqlite> for Vec<u8>
    • Potential unsound pointer access for FromSql<Binary, _> for Vec<u8> and FromSql<Text, _> for String for third party backends (requires changes to the third party backend as well)

You can support the development of Diesel by:

  • Contributing Code, Documentation or Guides. Checkout the planing for Diesel 2.4 for open tasks.
  • Providing knowledge and help to maintain the MySQL/MariaDB backend. This is currently the only in-tree backend that is not used by any maintainers, so having someone around that actually uses this backend would be very helpful for the Diesel project.
  • Answering questions in our discussion forum
  • Reporting bugs in our issue tracker
  • Helping triaging issues in our issue tracker
  • Sponsoring the maintainers.

Full Changelog: https://github.com/diesel-rs/diesel/compare/v2.3.7...v2.3.8

2026-03-13 15:06:57
diesel

Diesel 2.3.7

Fixed

  • Add support for libsqlite3-sys 0.36
  • Fix a potential resource leak if establishing a SqliteConnection fails.

You can support the development of Diesel by:

  • Contributing Code, Documentation or Guides. Checkout the planing for Diesel 2.4 for open tasks.
  • Providing knowledge and help to maintain the MySQL/MariaDB backend. This is currently the only in-tree backend that is not used by any maintainers, so having someone around that actually uses this backend would be very helpful for the Diesel project.
  • Answering questions in our discussion forum
  • Reporting bugs in our issue tracker
  • Helping triaging issues in our issue tracker
  • Sponsoring the maintainers.

Full Changelog: https://github.com/diesel-rs/diesel/compare/v2.3.6...v2.3.7

2026-01-23 15:53:51
diesel

Diesel 2.3.6

Fixed

  • Added support for mysqlclient-sys 0.5.0
  • Fix generating valid schema if a column is named table
  • Fixed a regression with #[derive(Insertable)] if the same field type is used with different lifetime values

You can support the development of Diesel by:

  • Contributing Code, Documentation or Guides. Checkout the planing for Diesel 2.4 for open tasks.
  • Providing knowledge and help to maintain the MySQL/MariaDB backend. This is currently the only in-tree backend that is not used by any maintainers, so having someone around that actually uses this backend would be very helpful for the Diesel project.
  • Answering questions in our discussion forum
  • Reporting bugs in our issue tracker
  • Helping triaging issues in our issue tracker
  • Sponsoring the maintainers.

Full Changelog: https://github.com/diesel-rs/diesel/compare/v2.3.5...v2.3.6

2025-12-19 15:30:17
diesel

Diesel 2.3.5

Fixes

  • Fix another libmariadb related issue with time types
  • Improve compile time error messages for #[derive(Insertable)]
  • Bump supported version of sqlite-wasm-rs to 0.5.0
  • Minor documentation fixes
  • Make the returning_clauses_for_sqlite_3_35 feature enable the sqlite feature by default
  • Include a fix for a nightly rust name resolution ambiguity

You can support the development of Diesel by:

  • Contributing Code, Documentation or Guides. Checkout the planing for Diesel 2.4 for open tasks.
  • Providing knowledge and help to maintain the MySQL/MariaDB backend. This is currently the only in-tree backend that is not used by any maintainers, so having someone around that actually uses this backend would be very helpful for the Diesel project.
  • Answering questions in our discussion forum
  • Reporting bugs in our issue tracker
  • Helping triaging issues in our issue tracker
  • Sponsoring the maintainers.

Full Changelog: https://github.com/diesel-rs/diesel/compare/v2.3.4...v2.3.5

2025-11-27 00:27:59
diesel

Diesel 2.3.4

Fixed

  • Fix an issue with breaking changes in libmariadb
  • Fix documentation links for helper types
  • Fix using #[diesel(embed)] with Option<Inner> types
  • Fix documentation for concurrent migration runs

You can support the development of Diesel by:

  • Contributing Code, Documentation or Guides. Checkout the planing for Diesel 2.4 for open tasks.
  • Providing knowledge and help to maintain the MySQL/MariaDB backend. This is currently the only in-tree backend that is not used by any maintainers, so having someone around that actually uses this backend would be very helpful for the Diesel project.
  • Answering questions in our discussion forum
  • Reporting bugs in our issue tracker
  • Helping triaging issues in our issue tracker
  • Sponsoring the maintainers.

Full Changelog: https://github.com/diesel-rs/diesel/compare/v2.3.3...v2.3.4