From 60329f68ef32df3663889cb9eacb36fe3076f476 Mon Sep 17 00:00:00 2001 From: hantmac Date: Thu, 21 Mar 2024 11:08:51 +0800 Subject: [PATCH] fix handle error --- driver/src/conn.rs | 6 +++--- driver/tests/driver/common/mod.rs | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/driver/src/conn.rs b/driver/src/conn.rs index 641e9e75e..41df3e338 100644 --- a/driver/src/conn.rs +++ b/driver/src/conn.rs @@ -191,17 +191,17 @@ pub trait Connection: DynClone + Send + Sync { } async fn begin(&self) -> Result<()> { - let _ = self.exec("BEGIN").await; + self.exec("BEGIN").await?; Ok(()) } async fn commit(&self) -> Result<()> { - let _ = self.exec("COMMIT").await; + self.exec("COMMIT").await?; Ok(()) } async fn rollback(&self) -> Result<()> { - let _ = self.exec("ROLLBACK").await; + self.exec("ROLLBACK").await?; Ok(()) } diff --git a/driver/tests/driver/common/mod.rs b/driver/tests/driver/common/mod.rs index 3e236be46..e7e066b06 100644 --- a/driver/tests/driver/common/mod.rs +++ b/driver/tests/driver/common/mod.rs @@ -12,4 +12,5 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub static DEFAULT_DSN: &str = "databend://root:@localhost:8000/default?sslmode=disable"; +pub static DEFAULT_DSN: &str = + "databend://databend:databend@localhost:8000/default?sslmode=disable";