From bab410efd0e161b7a9a17008068c1d8ab7ee2d01 Mon Sep 17 00:00:00 2001 From: Rafi Shamim Date: Fri, 18 Aug 2023 05:30:23 +0000 Subject: [PATCH] logictestL remove unnecessary usage of a sequence This should make the test less flaky, since the IDs were not always stable. Release note: None --- .../logictest/testdata/logic_test/alter_table | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/pkg/sql/logictest/testdata/logic_test/alter_table b/pkg/sql/logictest/testdata/logic_test/alter_table index b0d86b39d7a7..345dcc591be0 100644 --- a/pkg/sql/logictest/testdata/logic_test/alter_table +++ b/pkg/sql/logictest/testdata/logic_test/alter_table @@ -2207,12 +2207,9 @@ COMMIT # backfill has occurred. subtest add_multiple_in_txn -statement ok -CREATE SEQUENCE IF NOT EXISTS multipleinstmt_seq MAXVALUE 9007199254740991; - statement ok CREATE TABLE IF NOT EXISTS multipleinstmt ( - id INT8 DEFAULT nextval('multipleinstmt_seq') PRIMARY KEY, key STRING, value STRING + key STRING PRIMARY KEY, value STRING ); statement ok @@ -2227,23 +2224,23 @@ ALTER TABLE multipleinstmt ADD COLUMN IF NOT EXISTS a BOOL DEFAULT false; ALTER TABLE multipleinstmt ADD COLUMN IF NOT EXISTS b STRING; COMMIT; -query ITTBT -SELECT * FROM multipleinstmt ORDER BY id ASC; +query TTBT +SELECT * FROM multipleinstmt ORDER BY key ASC; ---- -1 a a false NULL -2 b b false NULL -3 c c false NULL +a a false NULL +b b false NULL +c c false NULL statement ok ALTER TABLE multipleinstmt ADD COLUMN IF NOT EXISTS c BOOL DEFAULT true, ADD COLUMN IF NOT EXISTS d STRING; -query ITTBTBT -SELECT * FROM multipleinstmt ORDER BY id ASC; +query TTBTBT +SELECT * FROM multipleinstmt ORDER BY key ASC; ---- -1 a a false NULL true NULL -2 b b false NULL true NULL -3 c c false NULL true NULL +a a false NULL true NULL +b b false NULL true NULL +c c false NULL true NULL subtest column_backfiller_update_batching @@ -2408,8 +2405,8 @@ FROM ( LEFT JOIN pg_catalog.pg_depend r ON l.table_id = r.objid; ---- table_id name state refobjid -202 test_serial_b_seq PUBLIC 201 -201 test_serial PUBLIC NULL +201 test_serial_b_seq PUBLIC 200 +200 test_serial PUBLIC NULL statement ok DROP TABLE test_serial; @@ -2443,8 +2440,8 @@ FROM ( LEFT JOIN pg_catalog.pg_depend r ON l.table_id = r.objid; ---- table_id name state refobjid -204 test_serial_b_seq PUBLIC 203 -203 test_serial PUBLIC NULL +203 test_serial_b_seq PUBLIC 202 +202 test_serial PUBLIC NULL statement ok ALTER TABLE test_serial DROP COLUMN b; @@ -2459,7 +2456,7 @@ FROM ( LEFT JOIN pg_catalog.pg_depend r ON l.table_id = r.objid; ---- table_id name state refobjid -203 test_serial PUBLIC NULL +202 test_serial PUBLIC NULL statement ok DROP TABLE test_serial;