John Singleton wrote: > Hello all, > > So I think I've pretty much got MaxDB's name resolution system down. But > I just wanted to post to the list to make sure :) > > So, from what I've been able to determine, it works like this: > > 1) Say I have three users. DBA, DBA2, and DBA2USER. DBA creates DBA2 > then DBA2 creates the resource user DBA2USER. > The ownership looks like this: > DBA > DBA2 > DBA2USER > > 1) As user DBA2USER I issue the query, "Select * from sometable" > > > (Please excuse the pseudo-code :) ) > > Level 1: > Searches for an object named "sometable" owned by DBA2USER. > > IF FOUND > RETURN SUCCESS > ELSE > CONTINUE TO LEVEL 2 > > Level 2: > Searches for an object named "sometable" owned by DBA2 (the owner of > DBA2USER) > > IF FOUND > IF DBA2USER HAS PRIVILEGES > RETURN SUCCESS > ELSE > RETURN FAIL > ELSE > CONTINUE TO LEVEL3 > > Level3: > Searches for an object "sometable" owned by DBA (the owner of DBA2) > > IF FOUND > IF DBA2USER HAS PRIVILEGES > RETURN SUCCESS > ELSE > RETURN FAIL > ELSE > CONTINUE TO LEVEL 4 > > Level 4: > Searches for a public synonym named "sometable" > > IF EXISTS A PUBLIC SYNONYM "SOMETABLE" > IF DBA2USER HAS PRIVILEGES > RETURN SUCCESS > ELSE > RETURN FAIL > ELSE > RETURN FAIL > > > Test Questions: > 1) How does this look? This model has been working in all of my tests > so far.
It looks nearly correct. But public synonym would not be level 4, but level 2, increasing the levels of search in dba2 and dba. > 2) Some statements do not perform resolution. For example, the CREATE > SYNONYM statement does not perform resolution. The Select statement, > however, does. > > Example: > Given the catalog: > DBA.SOMETABLE > DBA.DBA2 > DBA2.DBA2USER (where the user DBA2USER has all privileges on > DBA.SOMETABLE) > > If DBA2USER does: "select * from SOMETABLE" then the query succeeds. > However if DBA2USER does, "CREATE PUBLIC SYNONYM S_SOMETABLE FOR > SOMETABLE" then the query fails. > > Is there a list of statements that do not perform name resolution? > Yes, DDL does not perform name resolution Elke SAP Labs Berlin > > Many many thanks, > > JLS > > > > -- > MaxDB Discussion Mailing List > For list archives: http://lists.mysql.com/maxdb > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
