Skip to content

Commit 889dc35

Browse files
weiznichsgoll
authored andcommitted
Merge pull request #4398 from sgoll/4397-delete-space
Remove unnecessary space from DELETE that causes duplication
1 parent 045e6ac commit 889dc35

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ Increasing the minimal supported Rust version will always be coupled at least wi
6666
See the [SQL Injection isn't Dead: Smuggling Queries at Protocol Level](http://web.archive.org/web/20240812130923/https://media.defcon.org/DEF%20CON%2032/DEF%20CON%2032%20presentations/DEF%20CON%2032%20-%20Paul%20Gerste%20-%20SQL%20Injection%20Isn't%20Dead%20Smuggling%20Queries%20at%20the%20Protocol%20Level.pdf>) presentation from DEF CON for details
6767
* Fixed an issue with a possibly ambiguous trait resolution in `#[derive(QueryableByName)]`
6868

69+
### Fixed
70+
71+
* Use a single space instead of two spaces between `DELETE FROM`.
72+
6973
## [2.2.2] 2024-07-19
7074

7175
### Fixed

diesel/src/query_builder/delete_statement/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ where
259259
Ret: QueryFragment<DB>,
260260
{
261261
fn walk_ast<'b>(&'b self, mut out: AstPass<'_, 'b, DB>) -> QueryResult<()> {
262-
out.push_sql("DELETE ");
262+
out.push_sql("DELETE");
263263
self.from_clause.walk_ast(out.reborrow())?;
264264
self.where_clause.walk_ast(out.reborrow())?;
265265
self.returning.walk_ast(out.reborrow())?;

0 commit comments

Comments
 (0)