diff --git a/sqlx-core/src/any/arguments.rs b/sqlx-core/src/any/arguments.rs index 59d6f4d6e0..abb7098072 100644 --- a/sqlx-core/src/any/arguments.rs +++ b/sqlx-core/src/any/arguments.rs @@ -67,8 +67,8 @@ impl AnyArguments { AnyValueKind::Null(AnyTypeInfoKind::SmallInt) => out.add(Option::::None), AnyValueKind::Null(AnyTypeInfoKind::Integer) => out.add(Option::::None), AnyValueKind::Null(AnyTypeInfoKind::BigInt) => out.add(Option::::None), - AnyValueKind::Null(AnyTypeInfoKind::Real) => out.add(Option::::None), - AnyValueKind::Null(AnyTypeInfoKind::Double) => out.add(Option::::None), + AnyValueKind::Null(AnyTypeInfoKind::Real) => out.add(Option::::None), + AnyValueKind::Null(AnyTypeInfoKind::Double) => out.add(Option::::None), AnyValueKind::Null(AnyTypeInfoKind::Text) => out.add(Option::::None), AnyValueKind::Null(AnyTypeInfoKind::Blob) => out.add(Option::>::None), AnyValueKind::Bool(b) => out.add(b), diff --git a/sqlx-core/src/any/connection/mod.rs b/sqlx-core/src/any/connection/mod.rs index 894b109ccd..44a26f2fb3 100644 --- a/sqlx-core/src/any/connection/mod.rs +++ b/sqlx-core/src/any/connection/mod.rs @@ -101,7 +101,7 @@ impl Connection for AnyConnection { } fn close_hard(self) -> impl Future> + Send + 'static { - self.backend.close() + self.backend.close_hard() } fn ping(&mut self) -> impl Future> + Send + '_ { diff --git a/sqlx-macros-core/src/query/metadata.rs b/sqlx-macros-core/src/query/metadata.rs index 5d5d3885d7..fef3b8aa57 100644 --- a/sqlx-macros-core/src/query/metadata.rs +++ b/sqlx-macros-core/src/query/metadata.rs @@ -175,7 +175,7 @@ fn load_env( })) } -/// Returns `true` if `val` is `"true"`, +/// Returns `true` if `val` is `"true"` (case-insensitive) or `"1"`. fn is_truthy_bool(val: &str) -> bool { val.eq_ignore_ascii_case("true") || val == "1" } diff --git a/sqlx-mysql/src/types/mysql_time.rs b/sqlx-mysql/src/types/mysql_time.rs index 6af10aa216..84ae9a9bbc 100644 --- a/sqlx-mysql/src/types/mysql_time.rs +++ b/sqlx-mysql/src/types/mysql_time.rs @@ -213,7 +213,7 @@ impl MySqlTime { /// Returns `true` if `self` is negative, `false` if positive or zero. pub fn is_negative(&self) -> bool { - self.sign.is_positive() + self.sign.is_negative() } /// Returns `true` if this interval is a valid time-of-day. @@ -691,6 +691,13 @@ mod tests { assert_eq!(format!("{negative:.9}"), "-123:45:56.890011000"); } + #[test] + fn test_is_negative() { + assert!(!MySqlTime::ZERO.is_negative()); + assert!(!MySqlTime::MAX.is_negative()); + assert!(MySqlTime::MIN.is_negative()); + } + #[test] fn test_parse_microseconds() { assert_eq!(parse_microseconds("010").unwrap(), 10_000); diff --git a/sqlx-sqlite/src/logger.rs b/sqlx-sqlite/src/logger.rs index 1464a730c7..9e1fa087b5 100644 --- a/sqlx-sqlite/src/logger.rs +++ b/sqlx-sqlite/src/logger.rs @@ -224,7 +224,7 @@ impl core::fmt::Display for QueryPlanL let max_branch_id: i64 = [ self.branch_operations.last_index().unwrap_or(0), self.branch_results.last_index().unwrap_or(0), - self.branch_results.last_index().unwrap_or(0), + self.branch_origins.last_index().unwrap_or(0), ] .into_iter() .max()