alter-table-1 isolation test spec contains a duplicate step name

Started by Robert Haasover 10 years ago3 messageshackers
Jump to latest
#1Robert Haas
robertmhaas@gmail.com

Commit f14a6bbedb79adce2298d0d4f5e2abe8563e0eca added an isolation
test, alter-table-1.spec, which reads in part:

session "s2"
setup { BEGIN; }
step "rx1" { SELECT * FROM b WHERE a_id = 1 LIMIT 1; }
step "wx" { INSERT INTO b VALUES (0); }
step "rx1" { SELECT * FROM b WHERE a_id = 3 LIMIT 3; }
step "c2" { COMMIT; }

The step name "rx1" is used twice, a condition the isolation tester
should probably reject as an error but currently doesn't. This
happens to work OK at the moment because we don't specify a list of
permutations, and except for that, the names aren't used for anything
that cares about whether they are duplicated. Nonetheless, this seems
like it should probably be changed.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Robert Haas (#1)
Re: alter-table-1 isolation test spec contains a duplicate step name

Robert Haas <robertmhaas@gmail.com> writes:

Commit f14a6bbedb79adce2298d0d4f5e2abe8563e0eca added an isolation
test, alter-table-1.spec, which reads in part:

session "s2"
setup { BEGIN; }
step "rx1" { SELECT * FROM b WHERE a_id = 1 LIMIT 1; }
step "wx" { INSERT INTO b VALUES (0); }
step "rx1" { SELECT * FROM b WHERE a_id = 3 LIMIT 3; }
step "c2" { COMMIT; }

The step name "rx1" is used twice, a condition the isolation tester
should probably reject as an error but currently doesn't.

+1 for throwing an error ... this is clearly a mistake.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Robert Haas
robertmhaas@gmail.com
In reply to: Tom Lane (#2)
Re: alter-table-1 isolation test spec contains a duplicate step name

On Fri, Aug 14, 2015 at 5:18 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Robert Haas <robertmhaas@gmail.com> writes:

Commit f14a6bbedb79adce2298d0d4f5e2abe8563e0eca added an isolation
test, alter-table-1.spec, which reads in part:

session "s2"
setup { BEGIN; }
step "rx1" { SELECT * FROM b WHERE a_id = 1 LIMIT 1; }
step "wx" { INSERT INTO b VALUES (0); }
step "rx1" { SELECT * FROM b WHERE a_id = 3 LIMIT 3; }
step "c2" { COMMIT; }

The step name "rx1" is used twice, a condition the isolation tester
should probably reject as an error but currently doesn't.

+1 for throwing an error ... this is clearly a mistake.

OK, done. I made it throw an error, and changed the step name to rx3.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers