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

ALTER USER IF EXISTS does not work, although documentation says it should

    XMLWordPrintable

    Details

      Description

      Documentation for ALTER USER says

      ALTER USER [IF EXISTS] 
       user_specification [,user_specification] ...
        [REQUIRE {NONE | tls_option [[AND] tls_option] ...}]
        [WITH resource_option [resource_option] ...]
      

      and even explains what effect IF EXISTS is supposed to have. Only the syntax does not work:

      MariaDB [test]> CREATE USER foo@bar;
      Query OK, 0 rows affected (0.09 sec)
       
      MariaDB [test]> ALTER USER IF EXISTS foo@bar REQUIRE SSL;
      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 'IF EXISTS foo@bar REQUIRE SSL' at line 1
      

      I'm not sure if it's an omission in the code or a mistake in documentation.

        Attachments

          Activity

            People

            • Assignee:
              holyfoot Alexey Botchkov
              Reporter:
              elenst Elena Stepanova
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: