Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-2.1: sql,pgwire: fix a host of pgwire/sql interaction bugs #31002

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/cli/interactive_tests/test_sql_safe_updates.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ send "$argv sql | cat\r"
eexpect "brief introduction"
sleep 0.4
send "show sql_safe_updates;\r"
eexpect "true"
eexpect "on"
eexpect "\r\n"
send "delete from d.t;\r"
eexpect "rejected: DELETE without WHERE clause (sql_safe_updates = true)"
Expand Down
124 changes: 56 additions & 68 deletions pkg/server/admin.go

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions pkg/server/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ func TestAdminAPIDatabases(t *testing.T) {
}

// Verify Descriptor ID.
path, err := ts.admin.queryDescriptorIDPath(ctx, sql.SessionArgs{User: security.RootUser}, []string{testdb})
path, err := ts.admin.queryDescriptorIDPath(ctx, security.RootUser, []string{testdb})
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -508,9 +508,8 @@ func TestAdminAPITableDetails(t *testing.T) {
}

// Verify Descriptor ID.
path, err := ts.admin.queryDescriptorIDPath(
ctx, sql.SessionArgs{User: security.RootUser}, []string{tc.dbName, tc.tblName},
)
path, err := ts.admin.queryDescriptorIDPath(ctx,
security.RootUser, []string{tc.dbName, tc.tblName})
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -601,9 +600,7 @@ func TestAdminAPIZoneDetails(t *testing.T) {

// Get ID path for table. This will be an array of three IDs, containing the ID of the root namespace,
// the database, and the table (in that order).
idPath, err := ts.admin.queryDescriptorIDPath(
ctx, sql.SessionArgs{User: security.RootUser}, []string{"test", "tbl"},
)
idPath, err := ts.admin.queryDescriptorIDPath(ctx, security.RootUser, []string{"test", "tbl"})
if err != nil {
t.Fatal(err)
}
Expand Down
Loading