Skip to content

Commit 0272bd0

Browse files
committed
sql: fix ALTER TABLE SET LOGGED/UNLOGGED
This was recently added in b614b04, but for the notice to display correctly we must not return a nil planNode. No release note since the bug has not been released. Release note: None
1 parent 5374696 commit 0272bd0

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

pkg/sql/logictest/testdata/logic_test/alter_table

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4563,3 +4563,22 @@ statement ok
45634563
DROP TYPE e1;
45644564

45654565
subtest end
4566+
4567+
subtest set_logged
4568+
4569+
statement ok
4570+
CREATE TABLE t_set_logged (a INT PRIMARY KEY);
4571+
4572+
skipif config weak-iso-level-configs
4573+
query T noticetrace
4574+
ALTER TABLE t_set_logged SET LOGGED;
4575+
----
4576+
NOTICE: SET LOGGED is not supported and has no effect
4577+
4578+
skipif config weak-iso-level-configs
4579+
query T noticetrace
4580+
ALTER TABLE t_set_logged SET UNLOGGED;
4581+
----
4582+
NOTICE: SET UNLOGGED is not supported and has no effect
4583+
4584+
subtest end

pkg/sql/unimplemented.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,5 @@ func (p *planner) AlterTableSetLogged(
9191
operation,
9292
),
9393
)
94-
return nil, nil
94+
return &zeroNode{}, nil
9595
}

0 commit comments

Comments
 (0)