You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: parse SET/SHOW statements with simple parser
Parse SET/SHOW statements using the simple parser. Any connection variable that
is not covered by a regular expression client-side statement, will be picked up
by this simple parser.
In a following step, all regex-based client-side statements will be removed, and
the parsing will happen using the simple parser. This further simplifies and
unifies all client-side statement parsing and handling, and makes all connection
variables transactional.
t.Skip("temporarily skipped, as transactions get their settings from the connection when the BeginTx call is done, instead of reading them when the transaction is actually started")
742
+
t.Parallel()
743
+
744
+
db, server, teardown:=setupTestDBConnection(t)
745
+
deferteardown()
746
+
ctx:=context.Background()
747
+
748
+
// Start a transaction without specifying the isolation level.
749
+
tx, err:=db.BeginTx(ctx, &sql.TxOptions{})
750
+
iferr!=nil {
751
+
t.Fatal(err)
752
+
}
753
+
// We can set the isolation level only for this transaction using a SET LOCAL statement.
754
+
if_, err:=tx.ExecContext(context.Background(), "set local isolation_level = 'repeatable_read'"); err!=nil {
755
+
t.Fatal(err)
756
+
}
757
+
// The isolation level should now be 'RepeatableRead'.
0 commit comments