Skip to content

Commit

Permalink
Merge #48796
Browse files Browse the repository at this point in the history
48796: sql: Rename experimental_serial_normalization to serial_normalization r=rohany a=RichardJCai

Fixes #48550

Release note (sql change): Rename experimental_serial_normalization session variable to serial_normalization since the setting is no longer experimental.

Co-authored-by: richardjcai <[email protected]>
  • Loading branch information
craig[bot] and RichardJCai committed May 13, 2020
2 parents a51cbf9 + 94a3de7 commit fbc1595
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions pkg/sql/logictest/testdata/logic_test/int_size
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ subtest serial_rowid
# return type of unique_rowid()

statement ok
SET default_int_size=4; SET experimental_serial_normalization='rowid';
SET default_int_size=4; SET serial_normalization='rowid';

statement ok
CREATE TABLE i4_rowid (a SERIAL)
Expand All @@ -98,7 +98,7 @@ i4_rowid CREATE TABLE i4_rowid (
)

statement ok
SET default_int_size=8; SET experimental_serial_normalization='rowid';
SET default_int_size=8; SET serial_normalization='rowid';

statement ok
CREATE TABLE i8_rowid (a SERIAL)
Expand All @@ -115,7 +115,7 @@ subtest serial_sql_sequence
# When using rowid, we should see an INTx that matches the current size setting.

statement ok
SET default_int_size=4; SET experimental_serial_normalization='sql_sequence';
SET default_int_size=4; SET serial_normalization='sql_sequence';

statement ok
CREATE TABLE i4_sql_sequence (a SERIAL)
Expand All @@ -129,7 +129,7 @@ i4_sql_sequence CREATE TABLE i4_sql_sequence (
)

statement ok
SET default_int_size=8; SET experimental_serial_normalization='sql_sequence';
SET default_int_size=8; SET serial_normalization='sql_sequence';

statement ok
CREATE TABLE i8_sql_sequence (a SERIAL)
Expand All @@ -147,7 +147,7 @@ subtest serial_virtual_sequence
# return an INT8 value.

statement ok
SET default_int_size=4; SET experimental_serial_normalization='virtual_sequence';
SET default_int_size=4; SET serial_normalization='virtual_sequence';

statement ok
CREATE TABLE i4_virtual_sequence (a SERIAL)
Expand All @@ -161,7 +161,7 @@ i4_virtual_sequence CREATE TABLE i4_virtual_sequence (
)

statement ok
SET default_int_size=8; SET experimental_serial_normalization='virtual_sequence';
SET default_int_size=8; SET serial_normalization='virtual_sequence';

statement ok
CREATE TABLE i8_virtual_sequence (a SERIAL)
Expand Down
6 changes: 3 additions & 3 deletions pkg/sql/logictest/testdata/logic_test/pg_catalog
Original file line number Diff line number Diff line change
Expand Up @@ -1695,7 +1695,6 @@ enable_zigzag_join on NULL NULL
experimental_enable_hash_sharded_indexes off NULL NULL NULL string
experimental_enable_temp_tables off NULL NULL NULL string
experimental_optimizer_foreign_key_cascades off NULL NULL NULL string
experimental_serial_normalization rowid NULL NULL NULL string
extra_float_digits 0 NULL NULL NULL string
force_savepoint_restart off NULL NULL NULL string
foreign_key_cascades_limit 10000 NULL NULL NULL string
Expand All @@ -1715,6 +1714,7 @@ require_explicit_primary_keys off NULL NULL
results_buffer_size 16384 NULL NULL NULL string
row_security off NULL NULL NULL string
search_path public NULL NULL NULL string
serial_normalization rowid NULL NULL NULL string
server_encoding UTF8 NULL NULL NULL string
server_version 9.5.0 NULL NULL NULL string
server_version_num 90500 NULL NULL NULL string
Expand Down Expand Up @@ -1759,7 +1759,6 @@ enable_zigzag_join on NULL user
experimental_enable_hash_sharded_indexes off NULL user NULL off off
experimental_enable_temp_tables off NULL user NULL off off
experimental_optimizer_foreign_key_cascades off NULL user NULL off off
experimental_serial_normalization rowid NULL user NULL rowid rowid
extra_float_digits 0 NULL user NULL 0 2
force_savepoint_restart off NULL user NULL off off
foreign_key_cascades_limit 10000 NULL user NULL 10000 10000
Expand All @@ -1779,6 +1778,7 @@ require_explicit_primary_keys off NULL user
results_buffer_size 16384 NULL user NULL 16384 16384
row_security off NULL user NULL off off
search_path public NULL user NULL public public
serial_normalization rowid NULL user NULL rowid rowid
server_encoding UTF8 NULL user NULL UTF8 UTF8
server_version 9.5.0 NULL user NULL 9.5.0 9.5.0
server_version_num 90500 NULL user NULL 90500 90500
Expand Down Expand Up @@ -1819,7 +1819,6 @@ enable_zigzag_join NULL NULL NULL NULL
experimental_enable_hash_sharded_indexes NULL NULL NULL NULL NULL
experimental_enable_temp_tables NULL NULL NULL NULL NULL
experimental_optimizer_foreign_key_cascades NULL NULL NULL NULL NULL
experimental_serial_normalization NULL NULL NULL NULL NULL
extra_float_digits NULL NULL NULL NULL NULL
force_savepoint_restart NULL NULL NULL NULL NULL
foreign_key_cascades_limit NULL NULL NULL NULL NULL
Expand All @@ -1840,6 +1839,7 @@ require_explicit_primary_keys NULL NULL NULL NULL
results_buffer_size NULL NULL NULL NULL NULL
row_security NULL NULL NULL NULL NULL
search_path NULL NULL NULL NULL NULL
serial_normalization NULL NULL NULL NULL NULL
server_encoding NULL NULL NULL NULL NULL
server_version NULL NULL NULL NULL NULL
server_version_num NULL NULL NULL NULL NULL
Expand Down
4 changes: 2 additions & 2 deletions pkg/sql/logictest/testdata/logic_test/serial
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ DROP TABLE serials, smallbig, serial
subtest serial_virtual_sequence

statement ok
SET experimental_serial_normalization = virtual_sequence
SET serial_normalization = virtual_sequence

# Force the sequence for column "c" to bump to 2.
statement ok
Expand Down Expand Up @@ -199,7 +199,7 @@ DROP TABLE serials, smallbig, serial
subtest serial_sql_sequence

statement ok
SET experimental_serial_normalization = sql_sequence
SET serial_normalization = sql_sequence

statement ok
CREATE TABLE serial (
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/logictest/testdata/logic_test/show_source
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ enable_zigzag_join on
experimental_enable_hash_sharded_indexes off
experimental_enable_temp_tables off
experimental_optimizer_foreign_key_cascades off
experimental_serial_normalization rowid
extra_float_digits 0
force_savepoint_restart off
foreign_key_cascades_limit 10000
Expand All @@ -64,6 +63,7 @@ require_explicit_primary_keys off
results_buffer_size 16384
row_security off
search_path public
serial_normalization rowid
server_encoding UTF8
server_version 9.5.0
server_version_num 90500
Expand Down
4 changes: 2 additions & 2 deletions pkg/sql/logictest/testdata/logic_test/temp_table
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ DROP SEQUENCE pg_temp.temp_seq

# Allow temporary tables to use serial for temporary schemas.
statement ok
SET experimental_serial_normalization='sql_sequence'
SET serial_normalization='sql_sequence'

statement ok
CREATE TEMP TABLE ref_temp_table (a SERIAL)
Expand All @@ -216,7 +216,7 @@ statement ok
DROP SEQUENCE pg_temp.temp_seq; DROP SEQUENCE pg_temp.ref_temp_table_a_seq; DROP TABLE a

statement ok
SET experimental_serial_normalization='rowid'
SET serial_normalization='rowid'

subtest table_with_on_commit

Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/temporary_schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestCleanupSchemaObjects(t *testing.T) {

_, err = conn.ExecContext(ctx, `
SET experimental_enable_temp_tables=true;
SET experimental_serial_normalization='sql_sequence';
SET serial_normalization='sql_sequence';
CREATE TEMP TABLE a (a SERIAL, c INT);
ALTER TABLE a ADD COLUMN b SERIAL;
CREATE TEMP SEQUENCE a_sequence;
Expand Down
4 changes: 2 additions & 2 deletions pkg/sql/vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -642,11 +642,11 @@ var varGen = map[string]sessionVar{
},

// CockroachDB extension.
`experimental_serial_normalization`: {
`serial_normalization`: {
Set: func(_ context.Context, m *sessionDataMutator, s string) error {
mode, ok := sessiondata.SerialNormalizationModeFromString(s)
if !ok {
return newVarValueError(`experimental_serial_normalization`, s,
return newVarValueError(`serial_normalization`, s,
"rowid", "virtual_sequence", "sql_sequence")
}
m.SetSerialNormalizationMode(mode)
Expand Down

0 comments on commit fbc1595

Please sign in to comment.