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

analyze table persistent for column (list) inconsistency

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Duplicate
    • 11.2
    • N/A
    • Optimizer
    • None

    Description

      create table t1 (c1 int, c2 int, c3 int);
      create table t2 (c4 int, c5 int, c6 int);

      MariaDB [test]> analyze table t1 persistent for all, t2 persistent for columns (c4,c5) indexes();
      +---------+---------+----------+-----------------------------------------+
      | Table   | Op      | Msg_type | Msg_text                                |
      +---------+---------+----------+-----------------------------------------+
      | test.t1 | analyze | status   | Engine-independent statistics collected |
      | test.t1 | analyze | error    | Invalid argument                        |
      | test.t2 | analyze | status   | Engine-independent statistics collected |
      | test.t2 | analyze | status   | OK                                      |
      +---------+---------+----------+-----------------------------------------+
      4 rows in set (0.038 sec)
      

      invalid argument is caused by the search for column(s) c4,c5 in table t1;

      It should either work as expected or produce a syntax error, from
      https://mariadb.com/kb/en/analyze-table/

      ANALYZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE tbl_name [,tbl_name ...]
        [PERSISTENT FOR 
          { ALL
            | COLUMNS ([col_name [,col_name ...]]) INDEXES ([index_name [,index_name ...]])
          }
        ]
      

      only one PERSISTENT clause is allowed.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Johnston Rex Johnston
              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.