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

ANALYZE SELECT/UPDATE/DELETE increments Com_select/update/delete, but not Com_analyze

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a Bug
    • Affects Version/s: N/A
    • Fix Version/s: N/A
    • Component/s: Optimizer
    • Labels:
      None

      Description

      MariaDB [test]> analyze select 1;
      +------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+----------------+
      | id   | select_type | table | type | possible_keys | key  | key_len | ref  | rows | r_rows | filtered | r_filtered | Extra          |
      +------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+----------------+
      |    1 | SIMPLE      | NULL  | NULL | NULL          | NULL | NULL    | NULL | NULL |   NULL |     NULL |       NULL | No tables used |
      +------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+----------------+
      1 row in set (0.01 sec)
      
      MariaDB [test]> show status like 'Com_analyze';
      +---------------+-------+
      | Variable_name | Value |
      +---------------+-------+
      | Com_analyze   | 0     |
      +---------------+-------+
      1 row in set (0.00 sec)
      
      MariaDB [test]> show status like 'Com_select';
      +---------------+-------+
      | Variable_name | Value |
      +---------------+-------+
      | Com_select    | 1     |
      +---------------+-------+
      1 row in set (0.00 sec)
      

      I don't know whether it's by design or a bug, but if it's intentional, at least it should be documented.

      Branch: 10.1
      commit 12d6f89b073351169e070355e8db363d0d649749
      Author: Sergei Petrunia <psergey@askmonty.org>
      Date:   Thu Jun 26 15:55:25 2014 +0400
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              serg Sergei Golubchik added a comment -

              I think this is correct. EXPLAIN SELECT doesn't increment Com_explain either, it only increments Com_select. There is no Com_explain at all.
              And DESCRIBE SELECT doesn't increment Com_describe, it increments Com_select.
              While DESCRIBE table increments Com_show_fields.

              Show
              serg Sergei Golubchik added a comment - I think this is correct. EXPLAIN SELECT doesn't increment Com_explain either, it only increments Com_select. There is no Com_explain at all. And DESCRIBE SELECT doesn't increment Com_describe, it increments Com_select. While DESCRIBE table increments Com_show_fields.
              Hide
              psergey Sergei Petrunia added a comment -

              Following Serg's opinion, closing as Not A Bug. If anybody strongly disagrees, please re-open.

              Show
              psergey Sergei Petrunia added a comment - Following Serg's opinion, closing as Not A Bug. If anybody strongly disagrees, please re-open.

                People

                • Assignee:
                  psergey Sergei Petrunia
                  Reporter:
                  elenst Elena Stepanova
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: