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

Auto-create: 2nd and further executions of PS or SP fail to create partition

    XMLWordPrintable

Details

    Description

      First execution of PS can auto-create partition fine (if it's needed). But the 2nd execution cannot.

      --source include/have_partition.inc
       
      create table t (a int) with system versioning
        partition by system_time interval 1 hour auto;
       
      insert into t values (1),(2);
      prepare stmt from "update t set a = a + 1";
      set @@timestamp= @@timestamp+3601;
      execute stmt;
      set @@timestamp= @@timestamp+3601;
      execute stmt;
       
      # Cleanup
      drop table t;
      

      bb-10.6-midenok-MDEV-17554 edbc73ac4

      prepare stmt from "update t set a = a + 1";
      set @@timestamp= @@timestamp+3601;
      execute stmt;
      set @@timestamp= @@timestamp+3601;
      execute stmt;
      Warnings:
      Warning	4114	Versioned table `test`.`t`: last HISTORY partition (`p1`) is out of INTERVAL, need more HISTORY partitions
      

      Same with stored procedures.

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.