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

EXPLAIN PARTITIONS INSERT doesn't show target partition

    XMLWordPrintable

Details

    • 10.1.20

    Description

      CREATE OR REPLACE TABLE t
      (
      	id INT UNSIGNED NOT NULL AUTO_INCREMENT,
      	timestamp DATETIME NOT NULL,
      	PRIMARY KEY (id, timestamp)
      )
      	ENGINE = InnoDB
      PARTITION BY RANGE (YEAR(timestamp))
      (
      	PARTITION p0 VALUES LESS THAN (2010),
      	PARTITION p1 VALUES LESS THAN (2015),
      	PARTITION p2 VALUES LESS THAN (2020)
      );
       
      MariaDB [test]> EXPLAIN PARTITIONS INSERT INTO t (id, timestamp) VALUES (NULL, NOW());
      +------+-------------+-------+------------+------+---------------+------+---------+------+------+-------+
      | id   | select_type | table | partitions | type | possible_keys | key  | key_len | ref  | rows | Extra |
      +------+-------------+-------+------------+------+---------------+------+---------+------+------+-------+
      |    1 | INSERT      | t     | NULL       | ALL  | NULL          | NULL | NULL    | NULL | NULL | NULL  |
      +------+-------------+-------+------------+------+---------------+------+---------+------+------+-------+
      1 row in set (0.00 sec)

      Only tested on 10.0.

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              f_razzoli Federico Razzoli
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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