Skip to content

Commit

Permalink
Work around steffengy/tiberius#47
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhoo committed Feb 27, 2018
1 parent 2097117 commit 438b716
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions benchmarks/vote/clients/mssql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,14 @@ impl VoteClient for Client {
let db = args.value_of("database").unwrap();

let fixconn = |conn: tiberius::SqlConnection<Box<tiberius::BoxableIo>>| {
conn.simple_exec(format!(
"USE {}; \
SET NUMERIC_ROUNDABORT OFF; \
SET ANSI_PADDING, ANSI_WARNINGS, \
CONCAT_NULL_YIELDS_NULL, ARITHABORT, \
QUOTED_IDENTIFIER, ANSI_NULLS ON; \
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;",
db
))
conn.simple_exec(format!("USE {}", db))
.and_then(|(_, conn)| conn.simple_exec("SET NUMERIC_ROUNDABORT OFF"))
.and_then(|(_, conn)| {
conn.simple_exec("SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON")
})
.and_then(|(_, conn)| {
conn.simple_exec("SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED")
})
};

// Check whether database already exists, or whether we need to create it
Expand Down

0 comments on commit 438b716

Please sign in to comment.