Skip to content

sql: backfilling volatile expressions is broken #81448

@postamar

Description

@postamar

This affects all supported versions. To repro:

CREATE TABLE t (a INT PRIMARY KEY);
INSERT INTO t VALUES (1), (2);
ALTER TABLE t ADD COLUMN b FLOAT NOT NULL UNIQUE DEFAULT random();

Expected: SELECT b FROM t@t_pkey and SELECT b FROM t@t_b_key yield the same results.
Actual: they don't, this appears to be true for any volatile default expr.

Jira issue: CRDB-15179

Metadata

Metadata

Assignees

Labels

C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.C-technical-advisoryCaused a technical advisoryT-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)branch-release-21.1Used to mark GA and release blockers, technical advisories, and bugs for 21.1branch-release-21.2Used to mark GA and release blockers, technical advisories, and bugs for 21.2branch-release-22.1Used to mark GA and release blockers, technical advisories, and bugs for 22.1

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions