Uploaded image for project: 'Apache Trafodion'
  1. Apache Trafodion
  2. TRAFODION-1100

LP Bug: 1437470 - Creator of view in private schema unable to select from view

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-incubating
    • Component/s: sql-security
    • Labels:
      None

      Description

      Security is enabled on the instance.
      Table and view are created by user on a private schema where he is granted CREATE privilege.
      User is able to select from table, but unable to select from the view that he created.
      According to documentation, the creator of the object is granted full DML privileges on the object they create.

      SQL>select * from myview2;

          • ERROR[4481] The user does not have SELECT privilege on table or view TRAFODION.SCH001.MYVIEW2.

      See log of sequence below:

      Connected to Trafodion

      SQL>create schema sch001;

      — SQL operation complete.

      SQL>grant COMPONENT privilege "CREATE" on sql_operations to username1;

      — SQL operation complete.

      SQL>connect username1/password1
      Connected to Trafodion

      SQL>set schema sch001;

      — SQL operation complete.

      SQL>create table mytable (a int, b int);

      — SQL operation complete.

      SQL>insert into mytable values (1,1);

      — 1 row(s) inserted.

      SQL>create view myview2 as select * from mytable;

      — SQL operation complete.

      SQL>select * from mytable;

      A B
      ----------- -----------
      1 1

      — 1 row(s) selected.

      SQL>select * from myview2;

          • ERROR[4481] The user does not have SELECT privilege on table or view TRAFODION.SCH001.MYVIEW2.

        Attachments

          Activity

            People

            • Assignee:
              rmarton Roberta Marton
              Reporter:
              paul.low Paul Low
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: