From 85c46f25549371bac0388dbf8dca45dcd64e79db Mon Sep 17 00:00:00 2001 From: Kol Influence <104323920+kolinfluence@users.noreply.github.com> Date: Fri, 9 Aug 2024 04:46:44 -0400 Subject: [PATCH 1/6] Update connect.rs --- sqlx-mysql/src/options/connect.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlx-mysql/src/options/connect.rs b/sqlx-mysql/src/options/connect.rs index 151146be7e..116a49ccad 100644 --- a/sqlx-mysql/src/options/connect.rs +++ b/sqlx-mysql/src/options/connect.rs @@ -54,7 +54,7 @@ impl ConnectOptions for MySqlConnectOptions { if self.pipes_as_concat { sql_mode.push(r#"PIPES_AS_CONCAT"#); } - if self.no_engine_subsitution { + if self.no_engine_substitution { sql_mode.push(r#"NO_ENGINE_SUBSTITUTION"#); } From 87e2c3ed72dab2dbb6930b6fdabd5f4fb34452a6 Mon Sep 17 00:00:00 2001 From: Kol Influence <104323920+kolinfluence@users.noreply.github.com> Date: Fri, 9 Aug 2024 04:47:40 -0400 Subject: [PATCH 2/6] Update mod.rs correct naming no_engine_substitution --- sqlx-mysql/src/options/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sqlx-mysql/src/options/mod.rs b/sqlx-mysql/src/options/mod.rs index dd2214f76d..451c4d23f7 100644 --- a/sqlx-mysql/src/options/mod.rs +++ b/sqlx-mysql/src/options/mod.rs @@ -77,7 +77,7 @@ pub struct MySqlConnectOptions { pub(crate) log_settings: LogSettings, pub(crate) pipes_as_concat: bool, pub(crate) enable_cleartext_plugin: bool, - pub(crate) no_engine_subsitution: bool, + pub(crate) no_engine_substitution: bool, pub(crate) timezone: Option, pub(crate) set_names: bool, } @@ -108,7 +108,7 @@ impl MySqlConnectOptions { log_settings: Default::default(), pipes_as_concat: true, enable_cleartext_plugin: false, - no_engine_subsitution: true, + no_engine_substitution: true, timezone: Some(String::from("+00:00")), set_names: true, } @@ -350,8 +350,8 @@ impl MySqlConnectOptions { /// substitution). /// /// - pub fn no_engine_subsitution(mut self, flag_val: bool) -> Self { - self.no_engine_subsitution = flag_val; + pub fn no_engine_substitution(mut self, flag_val: bool) -> Self { + self.no_engine_substitution = flag_val; self } From 34ea1942b5b62c6dcf97f15189649639e0968dfc Mon Sep 17 00:00:00 2001 From: Kol Influence <104323920+kolinfluence@users.noreply.github.com> Date: Fri, 9 Aug 2024 08:21:27 -0400 Subject: [PATCH 3/6] Update mod.rs --- sqlx-mysql/src/options/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sqlx-mysql/src/options/mod.rs b/sqlx-mysql/src/options/mod.rs index 451c4d23f7..31c64c99c0 100644 --- a/sqlx-mysql/src/options/mod.rs +++ b/sqlx-mysql/src/options/mod.rs @@ -350,6 +350,11 @@ impl MySqlConnectOptions { /// substitution). /// /// + #[deprecated = "renamed to .no_engine_substitution()"] + pub fn no_engine_subsitution(self, flag_val: bool) -> Self { + self.no_engine_substitution(flag_val) + } + pub fn no_engine_substitution(mut self, flag_val: bool) -> Self { self.no_engine_substitution = flag_val; self From 0e8206c30cccdbff5c377ba24fe610cc6e860750 Mon Sep 17 00:00:00 2001 From: Kol Influence <104323920+kolinfluence@users.noreply.github.com> Date: Fri, 9 Aug 2024 23:07:37 -0400 Subject: [PATCH 4/6] Update mod.rs --- sqlx-mysql/src/options/mod.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sqlx-mysql/src/options/mod.rs b/sqlx-mysql/src/options/mod.rs index 31c64c99c0..a258b9f753 100644 --- a/sqlx-mysql/src/options/mod.rs +++ b/sqlx-mysql/src/options/mod.rs @@ -354,7 +354,18 @@ impl MySqlConnectOptions { pub fn no_engine_subsitution(self, flag_val: bool) -> Self { self.no_engine_substitution(flag_val) } - + + /// Flag that enables or disables the `NO_ENGINE_SUBSTITUTION` sql_mode setting after + /// connection. + /// + /// If not set, if the available storage engine specified by a `CREATE TABLE` is not available, + /// a warning is given and the default storage engine is used instead. + /// + /// By default, this is `true` (`NO_ENGINE_SUBSTITUTION` is passed, forbidding engine + /// substitution). + /// + /// + #[deprecated = "renamed to .no_engine_substitution()"] pub fn no_engine_substitution(mut self, flag_val: bool) -> Self { self.no_engine_substitution = flag_val; self From 9cd06f2b26bfcb2d97ec4bc83d98a0af2df666d6 Mon Sep 17 00:00:00 2001 From: Kol Influence <104323920+kolinfluence@users.noreply.github.com> Date: Fri, 9 Aug 2024 23:11:54 -0400 Subject: [PATCH 5/6] Update mod.rs --- sqlx-mysql/src/options/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/sqlx-mysql/src/options/mod.rs b/sqlx-mysql/src/options/mod.rs index a258b9f753..7e7630b637 100644 --- a/sqlx-mysql/src/options/mod.rs +++ b/sqlx-mysql/src/options/mod.rs @@ -365,7 +365,6 @@ impl MySqlConnectOptions { /// substitution). /// /// - #[deprecated = "renamed to .no_engine_substitution()"] pub fn no_engine_substitution(mut self, flag_val: bool) -> Self { self.no_engine_substitution = flag_val; self From 85e7abc472d3fd63d40d7f7513f8be5cb84f43b7 Mon Sep 17 00:00:00 2001 From: Kol Influence <104323920+kolinfluence@users.noreply.github.com> Date: Fri, 9 Aug 2024 23:13:45 -0400 Subject: [PATCH 6/6] Update mod.rs --- sqlx-mysql/src/options/mod.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sqlx-mysql/src/options/mod.rs b/sqlx-mysql/src/options/mod.rs index 7e7630b637..7881fe8ca2 100644 --- a/sqlx-mysql/src/options/mod.rs +++ b/sqlx-mysql/src/options/mod.rs @@ -340,16 +340,6 @@ impl MySqlConnectOptions { self } - /// Flag that enables or disables the `NO_ENGINE_SUBSTITUTION` sql_mode setting after - /// connection. - /// - /// If not set, if the available storage engine specified by a `CREATE TABLE` is not available, - /// a warning is given and the default storage engine is used instead. - /// - /// By default, this is `true` (`NO_ENGINE_SUBSTITUTION` is passed, forbidding engine - /// substitution). - /// - /// #[deprecated = "renamed to .no_engine_substitution()"] pub fn no_engine_subsitution(self, flag_val: bool) -> Self { self.no_engine_substitution(flag_val)