You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will fail with the following message: pq: relation "test.public.a" does not exist
The error is raised when executing the DROP INDEX statement in the second transaction. But tables a and b have no relation whatsoever so an operation on a shouldn't prevent an operation on b.
The error message is also very confusing: the mention of b makes it seem that the error happens during the DROP TABLE statement, but it is actually about the DROP INDEX statement.
Currently it is necessary to split the second transaction into 2 different transactions for it to execute properly.
If executed on a Cockroach 2.1.4 server, the execution suceeds.
Environment:
CockroachDB version 19.1.2
Server OS: macOS 10.14.5
Client app: cockroach sql
The text was updated successfully, but these errors were encountered:
40485: sql: Fix a bug with ordinal_position in information_schema.columns r=arulajmani a=arulajmani
When a column other than the last is dropped, ordinal_position in
information_schema.columns virtual table no longer matches attnum from
the pg_attribute table. This PR fixes this issue.
Fixes#39787
Release note (bug fix): ordinal_position in information_schema.columns
matches pg_attribute.attnum after a column is dropped.
40511: exec: fix explain(vec) for queries with subqueries r=jordanlewis a=jordanlewis
Also add logic tests that show the explain(vec) plans for all of the
tpch queries.
Closes#40484.
Release note: None
40516: sql: fix table lookup for drop index r=pbardea a=pbardea
Previously, when searching for the table relevant to a particular index
when dropping the index, we would fetch all object names and require that
all those tables exist. However, if a table was deleted in the same
transaction that table name would not be resolvable and we would error.
We already had a check to see if the table being looked up was nil, but
this check would not be used because the `required` flag was set to true.
This PR just sets the flag to false, and looks at moves on to the next
table if one of them no longer is resolvable.
Addresses #38768.
Release note (bug fix): Fix faulty error when trying to delete a table
and an unrelated index in the same transaction.
Co-authored-by: Arul Ajmani <arula@cockroachlabs.com>
Co-authored-by: Jordan Lewis <jordanthelewis@gmail.com>
Co-authored-by: Paul Bardea <pbardea@gmail.com>
Describe the problem
Inside a single transaction, DDL statements about one table prevent modifications on another totally unrelated table.
This is a regression that happened somewhere between 2.1.4 (which worked) and 19.1.2 (which exhibits the bug).
To Reproduce
Put the following in a
repro.sql
file:Then execute it on Cockroach 19.1.2:
This will fail with the following message:
pq: relation "test.public.a" does not exist
The error is raised when executing the DROP INDEX statement in the second transaction. But tables
a
andb
have no relation whatsoever so an operation ona
shouldn't prevent an operation onb
.The error message is also very confusing: the mention of
b
makes it seem that the error happens during the DROP TABLE statement, but it is actually about the DROP INDEX statement.Currently it is necessary to split the second transaction into 2 different transactions for it to execute properly.
If executed on a Cockroach 2.1.4 server, the execution suceeds.
Environment:
cockroach sql
The text was updated successfully, but these errors were encountered: