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

build_table_filename() doesn't support temporary tables

    Details

      Description

      build_table_filename() doesn't support temporary tables. Indeed, it always builds the path as datadir/db_name/table_name, while temporary tables are in the tmpdir. This shows up in various DDL statements that use temporary tables:

      create temporary table t1 (a int);
      rename table t1 to t2;
      

      This fails. Or

      create temporary table t1(a int not null primary key, b int, key(b)) engine=innodb;
      --error 1005
      alter table t1 add foreign key(b) references t1(a);
      drop table t1;
      --source include/restart_mysqld.inc
      

      This test case succeeds but leaves an orphant temporary frm in the tmpdir (and it causes a warning on restart).

      Note: when this is fixed, please uncomment the corresponding test in innodb-fk-warnings.test

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                Unassigned
                Reporter:
                serg Sergei Golubchik
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: