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

Extend CREATE TEMPORARY TABLES privilege to allow temp table operations

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • 5.5.32
    • 5.5.33
    • None
    • None

    Description

      This is actually a known MySQL bug (1), but I didn't find a report for MariaDB, which is behaving the same. What's more, it was fixed for MySQL 5.6, but they didn't back-port the fix to 5.5 and 5.1, which is a pity. If you could try to look at possible back-porting into that versions at least in MariaDB, that would be great.

      For the case MySQL bug report vanishes in the future, this is what is wrong:
      When we grant CREATE TEMPORARY TABLES privileges for a user, he won't be able to do anything with the table actually.

      Reproducer:

      $ mysql -u root
      mysql> CREATE USER temp_priv_user;
      mysql> CREATE DATABASE temp_priv;
      mysql> GRANT CREATE TEMPORARY TABLES ON temp_priv.* TO temp_priv_user@localhost;

      $ mysql -u temp_priv_user temp_priv
      mysql> CREATE TEMPORARY TABLE tmp1(a INT);
      mysql> INSERT INTO tmp1 VALUES (11), (12), (13);

      Actual results:

      ERROR 1142 (42000): INSERT command denied to user 'temp_priv_user'@'localhost' for table 'tmp1'

      Expected results:
      rows are inserted

      (1) http://bugs.mysql.com/bug.php?id=27480

      Attachments

        Activity

          People

            serg Sergei Golubchik
            hhorak Honza Horak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.