This is really weird.
I have 2 view, one with access rights and other with read rights to table.
replace view v1_read as locking row for read select id1 from t1; replace view v2_access as locking row for access select id2 from t2;
Then I run such select query and look explain plan:
select id1, id2 from v2_access left join v1_read on v2_access.id2=v1_read.id1;
Teradata blocks table t2 for read, but it should block for access. Is it bug?
I can say Teradata to start it block for access manually this way:
lock table t2 for access -- before the query
However there is the problem with such solution – administrators does not give such grants.
TD Release: 15.10.03.07
TD Version: 15.10.03.09
How can I fix that?
Advertisement
Answer
If you write such select query with join without specifying anything, TD will get max rights from both view. So this is why t2
blocked for read.
- Always check blocks with
explain
- If you arent agree, manually block it
lock table t2 for access