Skip to content

Commit

Permalink
sql: fix unique column backfill conflict test
Browse files Browse the repository at this point in the history
The test breaks when the backfill runs using distsql because
each distsql node separately computes the default value to use
its for backfill. Converted to a constant to make the test
predictable.
  • Loading branch information
vivekmenezes committed Apr 11, 2017
1 parent d23e9e3 commit 9ef6d59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sql/testdata/logic_test/alter_table
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ SELECT a,b,f FROM add_default
# Adding a unique column to an existing table with data with a default value
# is illegal
statement error duplicate key value .* violates unique constraint \"add_default_g_key\"
ALTER TABLE add_default ADD g TIMESTAMP UNIQUE DEFAULT current_timestamp()
ALTER TABLE add_default ADD g INT UNIQUE DEFAULT 1

# Multiple columns can be added at once with heterogeneous DEFAULT usage
statement ok
Expand Down

0 comments on commit 9ef6d59

Please sign in to comment.