From ea80570cb1f13c0a87f31a4e412b67fc53c74532 Mon Sep 17 00:00:00 2001 From: tison Date: Thu, 7 Dec 2023 00:14:09 +0800 Subject: [PATCH] fix: mysql version function result (#2884) Signed-off-by: tison --- src/servers/src/mysql/federated.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/servers/src/mysql/federated.rs b/src/servers/src/mysql/federated.rs index e3d4a8ce803e..80d0cb54ab94 100644 --- a/src/servers/src/mysql/federated.rs +++ b/src/servers/src/mysql/federated.rs @@ -323,10 +323,7 @@ pub(crate) fn check( // get GreptimeDB's version. fn get_version() -> String { - format!( - "{}-greptime", - env::var("CARGO_PKG_VERSION").unwrap_or_else(|_| "unknown".to_string()), - ) + format!("{}-greptime", env!("CARGO_PKG_VERSION")) } #[cfg(test)] mod test {