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

MDEV-15621: Prelocking with range interval auto partitioning

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • N/A
    • N/A
    • Partitioning
    • None
    • Not for Release Notes
    • Q3/2026 Server Maintenance

    Description

      (Adapted from messages from psergei, based on the current MDEV-15621 patch)

      vers_switch_partition() has this

          We must do auto-creation for PRELOCK_ROUTINE tables at the initial
          open_tables() no matter what initiating sql_command is.
        */
        if (table_list->prelocking_placeholder != TABLE_LIST::PRELOCK_ROUTINE)
      

      We don't have an analog. A testcase for that would be

      CREATE table t1 (.... ) PARTITION ... INTERVAL 1 day;
      CREATE table t2 ( ... ) ; -- doesn't need to be partitioned
      CREATE TRIGGER ON t2  ON UPDATE  insert into t1 (...., NOW());
      -- suppose t1 doesn't have the partition for today
      UPDATE t2 SET ... WHERE ... ; -- cause the trigger to fire.
      

      The above quoted piece of C++ logic seems to create today's partition for any tables used by the trigger. So, versioning seems to do it, auto-partitioning doesn't seem to.

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              ycp Yuchen Pei
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1.65d
                  1.65d
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 1d 2h 11m Time Not Required
                  1d 2h 11m

                  Git Integration

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