Skip to content

Commit 6ff7857

Browse files
craig[bot]fqazirail
committed
148576: sql: enable create_table_with_schema_locked by default r=fqazi a=fqazi To achieve more optimal change feed behavior, users previously had to manually enable the `schema_locked` setting on every new table. This change simplifies the process by enabling the `create_table_with_schema_locked session` variable by default. The SQL package is also updated to automatically disable `schema_locked` when explicit transactions or the legacy schema changer are used. In support of this change, tests and workloads across various packages have been updated to handle tables as schema-locked by default. This includes updates to tests in: - workload/movr - kvfollowereadccl - telemetryccl - spanconfigccl - crosscluster - acceptance - importccl - partitionccl - rttanalysis - multiregion - changefeedccl - backup Note: The test updates have a commit per package to make things easier to follow. They will be squashed before merging. Fixes: #129694 Release note (SQL changes): The `create_table_with_schema_locked` session variable is now enabled by default. As a result, all new tables will be created as `schema-locked`. This setting must be manually disabled before running operations that do not support schema-locking automatically, such as explicit transactions or `ALTER TABLE ... SET LOCALITY`. 148796: workflows: run update_releases on release-25.3 r=jlinder a=rail Release note: none Epic: none Co-authored-by: Faizan Qazi <[email protected]> Co-authored-by: Rail Aliiev <[email protected]>
3 parents 758f3aa + f28b79b + 875742c commit 6ff7857

File tree

84 files changed

+423
-129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+423
-129
lines changed

.github/workflows/update_releases.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- "release-24.3"
3333
- "release-25.1"
3434
- "release-25.2"
35+
- "release-25.3"
3536
name: Update pkg/testutils/release/cockroach_releases.yaml on ${{ matrix.branch }}
3637
runs-on: ubuntu-latest
3738
steps:

pkg/backup/backup_test.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8777,8 +8777,15 @@ func TestBackupOnlyPublicIndexes(t *testing.T) {
87778777
// appear in the backup once it is PUBLIC.
87788778
var g errgroup.Group
87798779
g.Go(func() error {
8780+
// This test intentionally uses hooks that require the legacy schema changer. Because
8781+
// the legacy schema changer cannot toggle schema_locked for backfilling schema changes,
8782+
// we will manually do that here.
8783+
_, err := sqlDB.DB.ExecContext(ctx, `ALTER TABLE data.bank SET (schema_locked=false)`)
8784+
if err != nil {
8785+
return errors.Wrap(err, "unsetting schema_locked")
8786+
}
87808787
// We use the underlying DB since the goroutine should not call t.Fatal.
8781-
_, err := sqlDB.DB.ExecContext(ctx,
8788+
_, err = sqlDB.DB.ExecContext(ctx,
87828789
`CREATE INDEX new_balance_idx ON data.bank(balance)`)
87838790
return errors.Wrap(err, "creating index")
87848791
})
@@ -11158,7 +11165,7 @@ CREATE TABLE child_pk (k INT8 PRIMARY KEY REFERENCES parent);
1115811165
sqlDB.Exec(t, `CREATE DATABASE test`)
1115911166
sqlDB.Exec(t, fmt.Sprintf(`RESTORE TABLE test.circular FROM LATEST IN $1 AS OF SYSTEM TIME %s`, ts[0]), localFoo)
1116011167
require.Equal(t, [][]string{
11161-
{"test.public.circular", "CREATE TABLE public.circular (\n\tk INT8 NOT NULL,\n\tselfid INT8 NULL,\n\tCONSTRAINT circular_pkey PRIMARY KEY (k ASC),\n\tCONSTRAINT self_fk FOREIGN KEY (selfid) REFERENCES public.circular(selfid) NOT VALID,\n\tUNIQUE INDEX circular_selfid_key (selfid ASC)\n);"},
11168+
{"test.public.circular", "CREATE TABLE public.circular (\n\tk INT8 NOT NULL,\n\tselfid INT8 NULL,\n\tCONSTRAINT circular_pkey PRIMARY KEY (k ASC),\n\tCONSTRAINT self_fk FOREIGN KEY (selfid) REFERENCES public.circular(selfid) NOT VALID,\n\tUNIQUE INDEX circular_selfid_key (selfid ASC)\n) WITH (schema_locked = true);"},
1116211169
}, sqlDB.QueryStr(t, `SHOW CREATE TABLE test.circular`))
1116311170
sqlDB.Exec(t, fmt.Sprintf(`RESTORE TABLE test.parent, test.child FROM LATEST IN $1 AS OF SYSTEM TIME %s `, ts[0]), localFoo)
1116411171
sqlDB.Exec(t, `SELECT * FROM pg_catalog.pg_constraint`)

pkg/backup/show_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ ORDER BY object_type, object_name`, full)
229229
b INT8 NULL,
230230
CONSTRAINT tablea_pkey PRIMARY KEY (a ASC),
231231
INDEX tablea_b_idx (b ASC)
232-
)`
232+
) WITH (schema_locked = true)`
233233
expectedCreateView := "CREATE VIEW viewa (\n\ta\n) AS SELECT a FROM data.public.tablea"
234234
expectedCreateSeq := `CREATE SEQUENCE seqa MINVALUE 1 MAXVALUE 20 INCREMENT 2 START 1`
235235

@@ -263,13 +263,13 @@ ORDER BY object_type, object_name`, full)
263263
b INT8 NULL,
264264
CONSTRAINT fkreftable_pkey PRIMARY KEY (a ASC),
265265
CONSTRAINT fkreftable_b_fkey FOREIGN KEY (b) REFERENCES public.fksrc(a)
266-
)`
266+
) WITH (schema_locked = true)`
267267
wantDiffDB := `CREATE TABLE fkreftable (
268268
a INT8 NOT NULL,
269269
b INT8 NULL,
270270
CONSTRAINT fkreftable_pkey PRIMARY KEY (a ASC),
271271
CONSTRAINT fkreftable_b_fkey FOREIGN KEY (b) REFERENCES data.public.fksrc(a)
272-
)`
272+
) WITH (schema_locked = true)`
273273

274274
showBackupRows = sqlDBRestore.QueryStr(t, fmt.Sprintf(`SELECT create_statement FROM [SHOW BACKUP SCHEMAS FROM LATEST IN '%s'] WHERE object_type='table'`, includedFK))
275275
createStmtSameDB := showBackupRows[1][0]
@@ -293,7 +293,7 @@ ORDER BY object_type, object_name`, full)
293293
a INT8 NOT NULL,
294294
b INT8 NULL,
295295
CONSTRAINT fkreftable_pkey PRIMARY KEY (a ASC)
296-
)`
296+
) WITH (schema_locked = true)`
297297

298298
showBackupRows = sqlDBRestore.QueryStr(t, fmt.Sprintf(`SELECT create_statement FROM [SHOW BACKUP SCHEMAS FROM LATEST IN '%s'] WHERE object_type='table'`, missingFK))
299299
createStmt := showBackupRows[0][0]

pkg/backup/testdata/backup-restore/multiregion-mismatch-table-locality

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ defaultdb root <nil> <nil> {} <nil>
2222
postgres root <nil> <nil> {} <nil>
2323
system node <nil> <nil> {} <nil>
2424

25+
# We need to currently unset and set schema_locked when
26+
# modifying table locality, since this functionality is not
27+
# supported in the declarative schema changer.
28+
exec-sql
29+
ALTER TABLE d.t SET (schema_locked=false);
30+
----
31+
2532
# make our table regional by row
2633
exec-sql
2734
ALTER TABLE d.t SET LOCALITY REGIONAL BY ROW;

pkg/backup/testdata/backup-restore/online-restore-auto-stats

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ data.public.reg CREATE TABLE public.reg (
4444
i INT8 NOT NULL,
4545
s STRING NULL,
4646
CONSTRAINT reg_pkey PRIMARY KEY (i ASC)
47-
);
47+
) WITH (schema_locked = true);
4848

4949
query-sql
5050
SHOW CREATE TABLE data.stats
@@ -53,7 +53,7 @@ data.public.stats CREATE TABLE public.stats (
5353
i INT8 NOT NULL,
5454
s STRING NULL,
5555
CONSTRAINT stats_pkey PRIMARY KEY (i ASC)
56-
) WITH (sql_stats_automatic_collection_enabled = true);
56+
) WITH (sql_stats_automatic_collection_enabled = true, schema_locked = true);
5757

5858
query-sql
5959
SHOW CREATE TABLE data.nostats
@@ -62,4 +62,4 @@ data.public.nostats CREATE TABLE public.nostats (
6262
i INT8 NOT NULL,
6363
s STRING NULL,
6464
CONSTRAINT nostats_pkey PRIMARY KEY (i ASC)
65-
) WITH (sql_stats_automatic_collection_enabled = false);
65+
) WITH (sql_stats_automatic_collection_enabled = false, schema_locked = true);

pkg/backup/testdata/backup-restore/online-restore-cluster

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,3 @@ SELECT count(*) FROM [SHOW JOBS] WHERE description LIKE '%Background Data Downlo
3333
1
3434

3535

36-

pkg/backup/testdata/backup-restore/restore-regionless-regional-by-row

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ defaultdb root <nil> <nil> {} <nil>
2727
postgres root <nil> <nil> {} <nil>
2828
system node <nil> <nil> {} <nil>
2929

30+
# We need to currently unset and set schema_locked when
31+
# modifying table locality, since this functionality is not
32+
# supported in the declarative schema changer.
33+
exec-sql
34+
ALTER TABLE d.t SET (schema_locked=false);
35+
----
36+
3037
# make our table regional by row
3138
exec-sql
3239
ALTER TABLE d.t SET LOCALITY REGIONAL BY ROW;

pkg/backup/testdata/backup-restore/restore-schema-only

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ d.public.t1 CREATE TABLE public.t1 (
2020
x INT8 NULL,
2121
rowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),
2222
CONSTRAINT t1_pkey PRIMARY KEY (rowid ASC)
23-
);
23+
) WITH (schema_locked = true);
2424
COMMENT ON TABLE public.t1 IS 'This comment better get restored from the backed up system table!';
2525

2626
# drop and create defaultDB to ensure it has a higher ID than by default. We will check that when
@@ -104,7 +104,7 @@ d.public.t1 CREATE TABLE public.t1 (
104104
x INT8 NULL,
105105
rowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),
106106
CONSTRAINT t1_pkey PRIMARY KEY (rowid ASC)
107-
);
107+
) WITH (schema_locked = true);
108108
COMMENT ON TABLE public.t1 IS 'This comment better get restored from the backed up system table!';
109109

110110
# Ensure the defaultdb from the backed up cluster was restored.

pkg/backup/testdata/backup-restore/restore-validation-only

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ d.public.t1 CREATE TABLE public.t1 (
2626
x INT8 NULL,
2727
rowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),
2828
CONSTRAINT t1_pkey PRIMARY KEY (rowid ASC)
29-
);
29+
) WITH (schema_locked = true);
3030
COMMENT ON TABLE public.t1 IS 'This comment better get restored from the backed up system table!';
3131

3232
# drop and create defaultDB to ensure it has a higher ID than by default. We will check that when
@@ -111,7 +111,7 @@ d.public.t1 CREATE TABLE public.t1 (
111111
x INT8 NULL,
112112
rowid INT8 NOT VISIBLE NOT NULL DEFAULT unique_rowid(),
113113
CONSTRAINT t1_pkey PRIMARY KEY (rowid ASC)
114-
);
114+
) WITH (schema_locked = true);
115115
COMMENT ON TABLE public.t1 IS 'This comment better get restored from the backed up system table!';
116116

117117
# Ensure the defaultdb from the backed up cluster was restored.

pkg/backup/testdata/backup-restore/row_level_ttl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ CREATE TABLE public.t (
3939
id INT8 NOT NULL,
4040
crdb_internal_expiration TIMESTAMPTZ NOT VISIBLE NOT NULL DEFAULT current_timestamp():::TIMESTAMPTZ + '00:10:00':::INTERVAL ON UPDATE current_timestamp():::TIMESTAMPTZ + '00:10:00':::INTERVAL,
4141
CONSTRAINT t_pkey PRIMARY KEY (id ASC)
42-
) WITH (ttl = 'on', ttl_expire_after = '00:10:00':::INTERVAL);
42+
) WITH (ttl = 'on', ttl_expire_after = '00:10:00':::INTERVAL, schema_locked = true);
4343

4444
query-sql
4545
SELECT count(1) FROM [SHOW SCHEDULES]
@@ -72,7 +72,7 @@ CREATE TABLE public.t (
7272
id INT8 NOT NULL,
7373
crdb_internal_expiration TIMESTAMPTZ NOT VISIBLE NOT NULL DEFAULT current_timestamp():::TIMESTAMPTZ + '00:10:00':::INTERVAL ON UPDATE current_timestamp():::TIMESTAMPTZ + '00:10:00':::INTERVAL,
7474
CONSTRAINT t_pkey PRIMARY KEY (id ASC)
75-
) WITH (ttl = 'on', ttl_expire_after = '00:10:00':::INTERVAL);
75+
) WITH (ttl = 'on', ttl_expire_after = '00:10:00':::INTERVAL, schema_locked = true);
7676

7777
query-sql
7878
SELECT count(1) FROM [SHOW SCHEDULES]
@@ -109,7 +109,7 @@ CREATE TABLE public.t (
109109
id INT8 NOT NULL,
110110
crdb_internal_expiration TIMESTAMPTZ NOT VISIBLE NOT NULL DEFAULT current_timestamp():::TIMESTAMPTZ + '00:10:00':::INTERVAL ON UPDATE current_timestamp():::TIMESTAMPTZ + '00:10:00':::INTERVAL,
111111
CONSTRAINT t_pkey PRIMARY KEY (id ASC)
112-
) WITH (ttl = 'on', ttl_expire_after = '00:10:00':::INTERVAL);
112+
) WITH (ttl = 'on', ttl_expire_after = '00:10:00':::INTERVAL, schema_locked = true);
113113

114114
query-sql
115115
SELECT count(1) FROM [SHOW SCHEDULES]

pkg/backup/testdata/backup-restore/user-defined-functions-in-checks

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ CREATE TABLE sc1.t1 (
5757
b INT8 NULL,
5858
CONSTRAINT t1_pkey PRIMARY KEY (a ASC),
5959
CONSTRAINT check_b CHECK (sc1.f1(b) > 1:::INT8)
60-
);
60+
) WITH (schema_locked = true);
6161

6262
# Make sure that the CHECK constraint still applies correctly
6363
query-sql
@@ -142,7 +142,7 @@ CREATE TABLE sc1.t1 (
142142
b INT8 NULL,
143143
CONSTRAINT t1_pkey PRIMARY KEY (a ASC),
144144
CONSTRAINT check_b CHECK (sc1.f1(b) > 1:::INT8)
145-
);
145+
) WITH (schema_locked = true);
146146

147147
# Make sure that CHECK constraint still applies correctly
148148
query-sql
@@ -231,7 +231,7 @@ CREATE TABLE sc1.t1 (
231231
a INT8 NOT NULL,
232232
b INT8 NULL,
233233
CONSTRAINT t1_pkey PRIMARY KEY (a ASC)
234-
);
234+
) WITH (schema_locked = true);
235235

236236
exec-sql
237237
USE db1
@@ -272,4 +272,4 @@ CREATE TABLE sc1.t1 (
272272
a INT8 NOT NULL,
273273
b INT8 NULL,
274274
CONSTRAINT t1_pkey PRIMARY KEY (a ASC)
275-
);
275+
) WITH (schema_locked = true);

pkg/backup/testdata/backup-restore/user-defined-functions-in-defaults

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ CREATE TABLE sc1.t1 (
5454
a INT8 NOT NULL,
5555
b INT8 NULL DEFAULT sc1.f1(),
5656
CONSTRAINT t1_pkey PRIMARY KEY (a ASC)
57-
);
57+
) WITH (schema_locked = true);
5858

5959
# Make sure that the DEFAULT expression still works.
6060
query-sql
@@ -141,7 +141,7 @@ CREATE TABLE sc1.t1 (
141141
a INT8 NOT NULL,
142142
b INT8 NULL DEFAULT sc1.f1(),
143143
CONSTRAINT t1_pkey PRIMARY KEY (a ASC)
144-
);
144+
) WITH (schema_locked = true);
145145

146146
# Make sure that the DEFAULT expression still works.
147147
query-sql
@@ -233,7 +233,7 @@ CREATE TABLE sc1.t1 (
233233
a INT8 NOT NULL,
234234
b INT8 NULL,
235235
CONSTRAINT t1_pkey PRIMARY KEY (a ASC)
236-
);
236+
) WITH (schema_locked = true);
237237

238238
exec-sql
239239
USE db1
@@ -274,4 +274,4 @@ CREATE TABLE sc1.t1 (
274274
a INT8 NOT NULL,
275275
b INT8 NULL,
276276
CONSTRAINT t1_pkey PRIMARY KEY (a ASC)
277-
);
277+
) WITH (schema_locked = true);

pkg/backup/testdata/backup-restore/virtual-columns

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ d.public.tab CREATE TABLE public.tab (
4747
CONSTRAINT tab_pkey PRIMARY KEY (k ASC),
4848
INDEX tab_v_idx (v ASC),
4949
UNIQUE INDEX tab_a_b_key (a ASC, b ASC) WHERE v > 0:::INT8
50-
);
50+
) WITH (schema_locked = true);

pkg/bench/rttanalysis/audit_bench_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func init() {
1212
reg.Register("Audit", []RoundTripBenchTestCase{
1313
{
1414
Name: "select from an audit table",
15-
Setup: `CREATE TABLE audit_table(a INT);
15+
Setup: `CREATE TABLE audit_table(a INT) WITH (schema_locked = false);
1616
ALTER TABLE audit_table EXPERIMENTAL_AUDIT SET READ WRITE;`,
1717
Stmt: "SELECT * from audit_table",
1818
},

pkg/bench/rttanalysis/testdata/benchmark_expectations

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ exp,benchmark
1212
17,AlterTableAddForeignKey/alter_table_add_2_foreign_keys
1313
19,AlterTableAddForeignKey/alter_table_add_3_foreign_keys
1414
15,AlterTableAddForeignKey/alter_table_add_foreign_key_with_3_columns
15-
8,AlterTableConfigureZone/alter_table_configure_zone_5_replicas
16-
8,AlterTableConfigureZone/alter_table_configure_zone_7_replicas_
17-
8,AlterTableConfigureZone/alter_table_configure_zone_ranges
15+
14,AlterTableConfigureZone/alter_table_configure_zone_5_replicas
16+
14,AlterTableConfigureZone/alter_table_configure_zone_7_replicas_
17+
14,AlterTableConfigureZone/alter_table_configure_zone_ranges
1818
21,AlterTableDropColumn/alter_table_drop_1_column
1919
21,AlterTableDropColumn/alter_table_drop_2_columns
2020
21,AlterTableDropColumn/alter_table_drop_3_columns

pkg/bench/rttanalysis/virtual_table_bench_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ CREATE TABLE t2 (i INT PRIMARY KEY, j INT REFERENCES t1(i));
3737
Name: "virtual table cache with schema change",
3838
Setup: `
3939
SET autocommit_before_ddl = false;
40+
SET create_table_with_schema_locked = false;
4041
CREATE TABLE t1 (i INT PRIMARY KEY);
4142
CREATE TABLE t2 (i INT PRIMARY KEY, j INT);`,
4243
Stmt: `
@@ -45,7 +46,8 @@ ALTER TABLE t1 ADD COLUMN j INT;
4546
SELECT * FROM crdb_internal.table_columns;
4647
CREATE INDEX idx ON t2 (j);
4748
SELECT * FROM crdb_internal.index_columns;`,
48-
Reset: "RESET autocommit_before_ddl;",
49+
Reset: "RESET autocommit_before_ddl;" +
50+
"RESET create_table_with_schema_locked;",
4951
},
5052
// This checks that catalog point lookups following a virtual table scan
5153
// access cached descriptors.

pkg/ccl/benchccl/rttanalysisccl/multi_region_bench_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func init() {
214214
Setup: `
215215
CREATE DATABASE test PRIMARY REGION "us-east1" REGIONS "us-east1", "us-east2", "us-east3";
216216
USE test;
217-
CREATE TABLE test (p int) LOCALITY GLOBAL;
217+
CREATE TABLE test (p int) WITH (schema_locked = false) LOCALITY GLOBAL;
218218
`,
219219
Stmt: `ALTER TABLE test SET LOCALITY REGIONAL IN PRIMARY REGION`,
220220
Reset: "DROP DATABASE test",
@@ -224,7 +224,7 @@ CREATE TABLE test (p int) LOCALITY GLOBAL;
224224
Setup: `
225225
CREATE DATABASE test PRIMARY REGION "us-east1" REGIONS "us-east1", "us-east2", "us-east3";
226226
USE test;
227-
CREATE TABLE test (p int) LOCALITY REGIONAL IN PRIMARY REGION;
227+
CREATE TABLE test (p int) WITH (schema_locked = false) LOCALITY REGIONAL IN PRIMARY REGION;
228228
`,
229229
Stmt: `ALTER TABLE test SET LOCALITY GLOBAL`,
230230
Reset: "DROP DATABASE test",
@@ -234,7 +234,7 @@ CREATE TABLE test (p int) LOCALITY REGIONAL IN PRIMARY REGION;
234234
Setup: `
235235
CREATE DATABASE test PRIMARY REGION "us-east1" REGIONS "us-east1", "us-east2", "us-east3";
236236
USE test;
237-
CREATE TABLE test (p int) LOCALITY GLOBAL;
237+
CREATE TABLE test (p int) WITH (schema_locked = false) LOCALITY GLOBAL;
238238
`,
239239
Stmt: `ALTER TABLE test SET LOCALITY REGIONAL BY ROW`,
240240
Reset: "DROP DATABASE test",
@@ -244,7 +244,7 @@ CREATE TABLE test (p int) LOCALITY GLOBAL;
244244
Setup: `
245245
CREATE DATABASE test PRIMARY REGION "us-east1" REGIONS "us-east1", "us-east2", "us-east3";
246246
USE test;
247-
CREATE TABLE test (p int) LOCALITY REGIONAL BY TABLE IN PRIMARY REGION;
247+
CREATE TABLE test (p int) WITH (schema_locked = false) LOCALITY REGIONAL BY TABLE IN PRIMARY REGION;
248248
`,
249249
Stmt: `ALTER TABLE test SET LOCALITY REGIONAL BY ROW`,
250250
Reset: "DROP DATABASE test",
@@ -254,7 +254,7 @@ CREATE TABLE test (p int) LOCALITY REGIONAL BY TABLE IN PRIMARY REGION;
254254
Setup: `
255255
CREATE DATABASE test PRIMARY REGION "us-east1" REGIONS "us-east1", "us-east2", "us-east3";
256256
USE test;
257-
CREATE TABLE test (p int) LOCALITY REGIONAL BY ROW;
257+
CREATE TABLE test (p int) WITH (schema_locked = false) LOCALITY REGIONAL BY ROW;
258258
`,
259259
Stmt: `ALTER TABLE test SET LOCALITY REGIONAL BY TABLE IN PRIMARY REGION`,
260260
Reset: "DROP DATABASE test",
@@ -264,7 +264,7 @@ CREATE TABLE test (p int) LOCALITY REGIONAL BY ROW;
264264
Setup: `
265265
CREATE DATABASE test PRIMARY REGION "us-east1" REGIONS "us-east1", "us-east2", "us-east3";
266266
USE test;
267-
CREATE TABLE test (p int) LOCALITY REGIONAL BY ROW;
267+
CREATE TABLE test (p int) WITH (schema_locked = false) LOCALITY REGIONAL BY ROW;
268268
`,
269269
Stmt: `ALTER TABLE test SET LOCALITY GLOBAL`,
270270
Reset: "DROP DATABASE test",

0 commit comments

Comments
 (0)