From 46c74c74b0b3111c590f9bd6950a41ac21513612 Mon Sep 17 00:00:00 2001 From: Lev Kokotov Date: Tue, 8 Aug 2023 13:48:20 -0700 Subject: [PATCH] Preserve existing behavior --- src/config.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 0e4b8c7d..803d3a75 100644 --- a/src/config.rs +++ b/src/config.rs @@ -513,7 +513,7 @@ pub struct Pool { pub query_parser_max_length: Option, - #[serde(default)] // False + #[serde(default = "Pool::query_parser_read_write_splitting")] // False pub query_parser_read_write_splitting: bool, #[serde(default)] // False @@ -592,6 +592,10 @@ impl Pool { true } + pub fn query_parser_read_write_splitting() -> bool { + true + } + pub fn validate(&mut self) -> Result<(), Error> { match self.default_role.as_ref() { "any" => (),