Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-5772

Granting multiple roles in single statement does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Stalled (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.0.8
    • Fix Version/s: 10.1
    • Component/s: None
    • Labels:
      None

      Description

      One can create several roles at once:

      MariaDB [test]> create role r1, r2;
      Query OK, 0 rows affected (0.01 sec)
       

      One can grant multiple privileges to multiple users at once:

      MariaDB [test]> grant SELECT,INSERT on db.* to foo@localhost, bar@localhost;
      Query OK, 0 rows affected (0.00 sec)
       

      But one cannot grant multiple roles at once:

      MariaDB [test]> grant r1, r2 to foo@localhost;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' r2 to foo@localhost' at line 1

      SQL standard seems to think that it should work.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cvicentiu Vicențiu Ciorbaru
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: