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

ANALYZE INSERT/REPLACE is accepted, but does not produce a plan

Details

    Description

      MariaDB [test]> analyze insert into t1 values (1),(2);
      Query OK, 2 rows affected (0.07 sec)
      Records: 2  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> explain insert into t1 values (1),(2);
      +------+-------------+-------+------+---------------+------+---------+------+------+-------+
      | id   | select_type | table | type | possible_keys | key  | key_len | ref  | rows | Extra |
      +------+-------------+-------+------+---------------+------+---------+------+------+-------+
      |    1 | INSERT      | t1    | ALL  | NULL          | NULL | NULL    | NULL | NULL | NULL  |
      +------+-------------+-------+------+---------------+------+---------+------+------+-------+
      1 row in set (0.00 sec)

      MariaDB [test]> analyze replace into t1 values (1),(2);
      Query OK, 2 rows affected (0.05 sec)
      Records: 2  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> explain replace into t1 values (1),(2);
      +------+-------------+-------+------+---------------+------+---------+------+------+-------+
      | id   | select_type | table | type | possible_keys | key  | key_len | ref  | rows | Extra |
      +------+-------------+-------+------+---------------+------+---------+------+------+-------+
      |    1 | INSERT      | t1    | ALL  | NULL          | NULL | NULL    | NULL | NULL | NULL  |
      +------+-------------+-------+------+---------------+------+---------+------+------+-------+
      1 row in set (0.00 sec)

      Branch: 10.1
      commit b95ec135533b13e921aa8de1b9c769d47b2efe60
      Author: Alexey Botchkov <holyfoot@montyprogram.com>
      Date:   Thu Jun 26 11:37:24 2014 +0500

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            elenst Elena Stepanova made changes -
            Description MariaDB [test]> analyze insert into t1 values (1),(2);
            Query OK, 2 rows affected (0.07 sec)
            Records: 2 Duplicates: 0 Warnings: 0

            {code:sql}
            MariaDB [test]> explain insert into t1 values (1),(2);
            +------+-------------+-------+------+---------------+------+---------+------+------+-------+
            | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
            +------+-------------+-------+------+---------------+------+---------+------+------+-------+
            | 1 | INSERT | t1 | ALL | NULL | NULL | NULL | NULL | NULL | NULL |
            +------+-------------+-------+------+---------------+------+---------+------+------+-------+
            1 row in set (0.00 sec)
            {code}

            {code:sql}
            MariaDB [test]> analyze replace into t1 values (1),(2);
            Query OK, 2 rows affected (0.05 sec)
            Records: 2 Duplicates: 0 Warnings: 0

            MariaDB [test]> explain replace into t1 values (1),(2);
            +------+-------------+-------+------+---------------+------+---------+------+------+-------+
            | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
            +------+-------------+-------+------+---------------+------+---------+------+------+-------+
            | 1 | INSERT | t1 | ALL | NULL | NULL | NULL | NULL | NULL | NULL |
            +------+-------------+-------+------+---------------+------+---------+------+------+-------+
            1 row in set (0.00 sec)
            {code}

            {noformat}
            Branch: 10.1
            commit b95ec135533b13e921aa8de1b9c769d47b2efe60
            Author: Alexey Botchkov <holyfoot@montyprogram.com>
            Date: Thu Jun 26 11:37:24 2014 +0500
            {noformat}
            {code:sql}
            MariaDB [test]> analyze insert into t1 values (1),(2);
            Query OK, 2 rows affected (0.07 sec)
            Records: 2 Duplicates: 0 Warnings: 0

            MariaDB [test]> explain insert into t1 values (1),(2);
            +------+-------------+-------+------+---------------+------+---------+------+------+-------+
            | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
            +------+-------------+-------+------+---------------+------+---------+------+------+-------+
            | 1 | INSERT | t1 | ALL | NULL | NULL | NULL | NULL | NULL | NULL |
            +------+-------------+-------+------+---------------+------+---------+------+------+-------+
            1 row in set (0.00 sec)
            {code}

            {code:sql}
            MariaDB [test]> analyze replace into t1 values (1),(2);
            Query OK, 2 rows affected (0.05 sec)
            Records: 2 Duplicates: 0 Warnings: 0

            MariaDB [test]> explain replace into t1 values (1),(2);
            +------+-------------+-------+------+---------------+------+---------+------+------+-------+
            | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
            +------+-------------+-------+------+---------------+------+---------+------+------+-------+
            | 1 | INSERT | t1 | ALL | NULL | NULL | NULL | NULL | NULL | NULL |
            +------+-------------+-------+------+---------------+------+---------+------+------+-------+
            1 row in set (0.00 sec)
            {code}

            {noformat}
            Branch: 10.1
            commit b95ec135533b13e921aa8de1b9c769d47b2efe60
            Author: Alexey Botchkov <holyfoot@montyprogram.com>
            Date: Thu Jun 26 11:37:24 2014 +0500
            {noformat}
            psergei Sergei Petrunia made changes -
            Component/s Optimizer [ 10200 ]
            Fix Version/s 10.1.1 [ 16801 ]
            Fix Version/s 10.1 [ 16100 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            psergei Sergei Petrunia made changes -
            Labels analyze-stmt
            ratzpo Rasmus Johansson (Inactive) made changes -
            Workflow MariaDB v2 [ 48415 ] MariaDB v3 [ 65254 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 65254 ] MariaDB v4 [ 147999 ]

            People

              psergei Sergei Petrunia
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.