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

Always print "Engine-independent statistic" warnings and might be filtering columns unintentionally from engines

Details

    • 10.1.13

    Description

      Warnings like "Engine-independent statistics are not collected for column 'test'" are always printed even the the Engine-independent statistics are not to be updated.

      Demonstration

      (root@localhost) [(none)]> create database testdatabase;
      Query OK, 1 row affected (0.01 sec)
       
      (root@localhost) [(none)]> use testdatabase;
      Database changed
       
      (root@localhost) [testdatabase]> create table simple (test blob);     
      Query OK, 0 rows affected (0.02 sec)
       
      (root@localhost) [testdatabase]> show variables like 'use_stat_tables';
      +-----------------+-------+
      | Variable_name   | Value |
      +-----------------+-------+
      | use_stat_tables | NEVER |
      +-----------------+-------+
      1 row in set (0.00 sec)
       
      (root@localhost) [testdatabase]> analyze table simple; 
      +---------------------+---------+----------+-------------------------------------------------------------------+
      | Table               | Op      | Msg_type | Msg_text                                                          |
      +---------------------+---------+----------+-------------------------------------------------------------------+
      | testdatabase.simple | analyze | Warning  | Engine-independent statistics are not collected for column 'test' |
      | testdatabase.simple | analyze | status   | OK                                                                |
      +---------------------+---------+----------+-------------------------------------------------------------------+
      2 rows in set (0.00 sec)

      The warning should not occur when neither PERSISTENT-clause nor use_stat_tables is set.

      I think this recent patch created this problem:
      https://github.com/MariaDB/server/commit/825f51d1aab51d363dc07ec9fe0829af33063883

      Later in the same function the clause of:

      (get_use_stat_tables_mode(thd) > NEVER || 
               lex->with_persistent_for_clause)

      is used.

      I would suggest this should be wrapped around the patch as well so the warning does not appear.

      Also - is the patch actually also filtering columns for the engines themselves? — if so I guess it shouldn't do that either?!

      While at it — maybe the should string "Engine-independent statistics collected" should also be internationalized?

      Attachments

        Issue Links

          Activity

            jkkn Kristian Kræmmer Nielsen created issue -
            serg Sergei Golubchik made changes -
            Field Original Value New Value
            Description Warnings like "Engine-independent statistics are not collected for column 'test'" are always printed even the the Engine-independent statistics are not to be updated.

            Demonstration:
            (root@localhost) [(none)]> create database testdatabase;
            Query OK, 1 row affected (0.01 sec)

            (root@localhost) [(none)]> use testdatabase;
            Database changed

            (root@localhost) [testdatabase]> create table simple (test blob);
            Query OK, 0 rows affected (0.02 sec)

            (root@localhost) [testdatabase]> show variables like 'use_stat_tables';
            +-----------------+-------+
            | Variable_name | Value |
            +-----------------+-------+
            | use_stat_tables | NEVER |
            +-----------------+-------+
            1 row in set (0.00 sec)

            (root@localhost) [testdatabase]> analyze table simple;
            +---------------------+---------+----------+-------------------------------------------------------------------+
            | Table | Op | Msg_type | Msg_text |
            +---------------------+---------+----------+-------------------------------------------------------------------+
            | testdatabase.simple | analyze | Warning | Engine-independent statistics are not collected for column 'test' |
            | testdatabase.simple | analyze | status | OK |
            +---------------------+---------+----------+-------------------------------------------------------------------+
            2 rows in set (0.00 sec)

            The warning should not occur when neither PERSISTENT-clause nor use_stat_tables is set.

            I think this recent patch created this problem:
            https://github.com/MariaDB/server/commit/825f51d1aab51d363dc07ec9fe0829af33063883

            Later in the same function the clause of:
            (get_use_stat_tables_mode(thd) > NEVER ||
                     lex->with_persistent_for_clause) is used.

            I would suggest this should be wrapped around the patch as well so the warning does not appear.

            Also - is the patch actually also filtering columns for the engines themselves? - if so I guess it shouldn't do that either?!

            While at it - maybe the should string "Engine-independent statistics collected" should also be internationalized?


            Warnings like "Engine-independent statistics are not collected for column 'test'" are always printed even the the Engine-independent statistics are not to be updated.

            {noformat:title=Demonstration}
            (root@localhost) [(none)]> create database testdatabase;
            Query OK, 1 row affected (0.01 sec)

            (root@localhost) [(none)]> use testdatabase;
            Database changed

            (root@localhost) [testdatabase]> create table simple (test blob);
            Query OK, 0 rows affected (0.02 sec)

            (root@localhost) [testdatabase]> show variables like 'use_stat_tables';
            +-----------------+-------+
            | Variable_name | Value |
            +-----------------+-------+
            | use_stat_tables | NEVER |
            +-----------------+-------+
            1 row in set (0.00 sec)

            (root@localhost) [testdatabase]> analyze table simple;
            +---------------------+---------+----------+-------------------------------------------------------------------+
            | Table | Op | Msg_type | Msg_text |
            +---------------------+---------+----------+-------------------------------------------------------------------+
            | testdatabase.simple | analyze | Warning | Engine-independent statistics are not collected for column 'test' |
            | testdatabase.simple | analyze | status | OK |
            +---------------------+---------+----------+-------------------------------------------------------------------+
            2 rows in set (0.00 sec)
            {noformat}
            The warning should not occur when neither PERSISTENT-clause nor use_stat_tables is set.

            I think this recent patch created this problem:
            https://github.com/MariaDB/server/commit/825f51d1aab51d363dc07ec9fe0829af33063883

            Later in the same function the clause of:
            {code}(get_use_stat_tables_mode(thd) > NEVER ||
                     lex->with_persistent_for_clause){code} is used.

            I would suggest this should be wrapped around the patch as well so the warning does not appear.

            Also - is the patch actually also filtering columns for the engines themselves? --- if so I guess it shouldn't do that either?!

            While at it — maybe the should string "Engine-independent statistics collected" should also be internationalized?


            elenst Elena Stepanova made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            elenst Elena Stepanova made changes -
            Fix Version/s 10.1 [ 16100 ]
            Assignee Oleksandr Byelkin [ sanja ]
            jkkn Kristian Kræmmer Nielsen made changes -
            Affects Version/s 10.1.12 [ 21502 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Sprint 10.1.13 [ 42 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Rank Ranked lower
            sanja Oleksandr Byelkin made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            sanja Oleksandr Byelkin made changes -
            Assignee Oleksandr Byelkin [ sanja ] Sergei Petrunia [ psergey ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            sanja Oleksandr Byelkin made changes -
            Assignee Sergei Petrunia [ psergey ] Oleksandr Byelkin [ sanja ]
            sanja Oleksandr Byelkin made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            sanja Oleksandr Byelkin made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            sanja Oleksandr Byelkin made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            sanja Oleksandr Byelkin made changes -
            sanja Oleksandr Byelkin made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            sanja Oleksandr Byelkin made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            sanja Oleksandr Byelkin made changes -
            Fix Version/s 10.1.13 [ 21803 ]
            Fix Version/s 10.1 [ 16100 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 74024 ] MariaDB v4 [ 150125 ]

            People

              sanja Oleksandr Byelkin
              jkkn Kristian Kræmmer Nielsen
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.