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

CREATE_TIME is not populated for temporary InnoDB tables

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
       
      drop table if exists tbase_innodb, ttmp_innodb;
       
      create table tbase_innodb (a int) engine=InnoDB;
      create temporary table ttmp_innodb (a int) engine=InnoDB;
       
      select table_name, table_type, create_time, update_time from information_schema.tables where table_schema = 'test' order by table_name;
       
      --sleep 2
       
      insert into tbase_innodb values (1);
      insert into ttmp_innodb values (1);
       
      select table_name, table_type, create_time, update_time from information_schema.tables where table_schema = 'test' order by table_name;
       
      # Cleanup
      drop table if exists tbase_innodb, ttmp_innodb;
      

      For the base table, CREATE_TIME is set. For the temporary table it is not.
      UPDATE_TIME is set for both.
      Aria and MyISAM temporary tables get CREATE_TIME.

      preview-10.9-MDEV-20119-misc c906db30

      create temporary table ttmp_innodb (a int) engine=InnoDB;
      select table_name, table_type, create_time, update_time from information_schema.tables where table_schema = 'test' order by table_name;
      table_name	table_type	create_time	update_time
      tbase_innodb	BASE TABLE	2022-04-17 21:55:00	NULL
      ttmp_innodb	TEMPORARY	NULL	NULL
      insert into tbase_innodb values (1);
      insert into ttmp_innodb values (1);
      select table_name, table_type, create_time, update_time from information_schema.tables where table_schema = 'test' order by table_name;
      table_name	table_type	create_time	update_time
      tbase_innodb	BASE TABLE	2022-04-17 21:55:00	2022-04-17 21:55:02
      ttmp_innodb	TEMPORARY	NULL	2022-04-17 21:55:02
      

      Attachments

        Issue Links

          Activity

            People

              anel Anel Husakovic
              elenst Elena Stepanova
              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.