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"#); } diff --git a/sqlx-mysql/src/options/mod.rs b/sqlx-mysql/src/options/mod.rs index dd2214f76d..7881fe8ca2 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, } @@ -340,6 +340,11 @@ impl MySqlConnectOptions { self } + #[deprecated = "renamed to .no_engine_substitution()"] + 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. /// @@ -350,8 +355,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 }