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

Warning for a failed INTERVAL partition creation shows %s.%s instead of the table name

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 13.1, 13.2
    • 13.1
    • Partitioning
    • None

    Description

      Likely cause: commit e6fc36cfe3d4831c1ffff80b8401b9d841fc89ac (MDEV-15621), which added the ER_RANGE_INTERVAL_PART_FAILED message.

      --source include/have_partition.inc
      --source include/have_innodb.inc
       
      call mtr.add_suppression("Error number .*(File exists|file operation)");
      call mtr.add_suppression("InnoDB: The file '.*test/t1#P#p1\\.ibd' already exists");
      SET timestamp= UNIX_TIMESTAMP('2026-05-02 00:00:00');
      CREATE TABLE t1 (c DATE) ENGINE=InnoDB PARTITION BY RANGE COLUMNS (c) INTERVAL 1 DAY (PARTITION p0 VALUES LESS THAN ('2026-04-20'));
      --let $datadir= `SELECT @@datadir`
      --let $dummy= $datadir/test/t1#P#p1.ibd
      --write_file $dummy
      EOF
      --error ER_GET_ERRNO
      INSERT INTO t1 VALUES ('2026-04-22');
      GET DIAGNOSTICS CONDITION 2 @m= MESSAGE_TEXT;
      --remove_file $dummy
      --let $m= `SELECT @m`
      if (`SELECT LOCATE('%s', @m) > 0`)
      {
        --die Warning 4268 for the failed INTERVAL partition creation reads: $m
      }
      DROP TABLE t1;

      Leads to:

      CS 13.1.2 87e62ca17270e163a6d41b3fc8d6f4d440f1bb88 (Optimized, Clang 22.1.8-20260622) Build 06/10/2026

      mysqltest: At line 19: Warning 4268 for the failed INTERVAL partition creation reads: Range partition table %s.%s: adding INTERVAL partition(s) failed

      The result file of main.partition_range_interval records this warning, after # Auto-create failed error. An INSERT that fails with ERROR 1517, as in MDEV-41628, gives the same warning. Debug builds give the same result.

      From the code it seems that ER_RANGE_INTERVAL_PART_FAILED in sql/share/errmsg-utf8.txt uses the %`s format, which my_error() prints as %s. It is the only message in the file that does. Other messages that quote a name use %sQ, as ER_VERS_HIST_PART_FAILED does.

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 0d
                  0d
                  Remaining:
                  Time Spent - 1h Remaining Estimate - 1.5d
                  1.5d
                  Logged:
                  Time Spent - 1h Remaining Estimate - 1.5d
                  1h

                  Git Integration

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