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

CREATE TEMPORARY TABLES privilege is insufficient for SHOW COLUMNS

    XMLWordPrintable

    Details

      Description

      CREATE TEMPORARY TABLES privilege is supposed to allow all actions with temporary tables created by the session.
      However, while it also allows to run SHOW COLUMNS on such tables, it's not sufficient to get a result, it remains empty.
      Oddly, SHOW INDEX works.

      create database db;
      create user foo@localhost;
      grant create temporary tables on db.* to foo@localhost;
       
      --connect (con1,localhost,foo,,db)
      create temporary table tmp (a int, key(a));
      show create table tmp;
      show columns in tmp;
      show index in tmp;
       
      # Cleanup
      --disconnect con1
      --connection default
      drop database db;
      drop user foo@localhost;
      

      bb-10.9-anel 32274c3e8a4

      show columns in tmp;
      Field	Type	Null	Key	Default	Extra
      show index in tmp;
      Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment	Index_comment	Ignored
      tmp	1	a	1	a	A	NULL	NULL	NULL	YES	BTREE			NO
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:

                  Git Integration

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