Open chengxiong-ruan opened 1 year ago
This can be easily solved if we can support resolving temp schemas across sessions by ID as described in https://github.com/cockroachdb/cockroach/issues/97822
This bug still a problem, latest: https://github.com/cockroachlabs/support/issues/3062 and https://cockroachdb.zendesk.com/agent/tickets/23016
Describe the problem When adding a value to an enum type, we loop through all tables in the database to find out all regional tables (they could use enum type). And when looping through the tables (including the tmp table), we also do a look up of tables' parent schema descriptor (just for schema name), however, there is no descriptor for the tmp schema, so it error and stuck the job.
To fix this, we may return the temp schema name for temp tables instead of looking from descriptors.
To Reproduce
Expected behavior ALTER TYPE...ADD VALUE should succeed.
Environment: This bug exists in at least master, 22.2 and 22.1
Jira issue: CRDB-25002
gz#23016