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

Concurrent ALTER and ANALYZE collecting statistics can result in stale statistical data

    XMLWordPrintable

Details

    Description

      Test case from Monty:

      --source include/have_sequence.inc
      CREATE TABLE t (a INT, b VARCHAR(128));
      INSERT INTO t SELECT seq, CONCAT('s',seq) FROM seq_1_to_100;
      --connect (con1,localhost,root,,)
      --send ALTER TABLE t MODIFY b BLOB
      --connection default
      ANALYZE TABLE t PERSISTENT FOR ALL;
      --connection con1
      --reap
      ANALYZE TABLE t PERSISTENT FOR ALL;
      --connection default
      --disconnect con1
      select db_name,table_name,column_name from mysql.column_stats;
      drop table t;
      

      10.4 900c4d69

      select db_name,table_name,column_name from mysql.column_stats;
      db_name	table_name	column_name
      test	t	a
      test	t	b
      

      The column b shouldn't be there, as the statistics aren't collected for blobs.

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              Votes:
              1 Vote for this issue
              Watchers:
              6 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.