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

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

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

            The latest fix is ok to push.

            psergei Sergei Petrunia added a comment - The latest fix is ok to push.

            It is still in testing though, issues have been and are being discussed outside JIRA.

            elenst Elena Stepanova added a comment - It is still in testing though, issues have been and are being discussed outside JIRA.

            The exchange of information regarding intermediate issues was happening on slack.

            The last test run on be4b1fd502981f93dff6b976ea59f5fce690b2fc didn't reveal any problems specific to the change, so it can be pushed into 10.6 main.

            elenst Elena Stepanova added a comment - The exchange of information regarding intermediate issues was happening on slack. The last test run on be4b1fd502981f93dff6b976ea59f5fce690b2fc didn't reveal any problems specific to the change, so it can be pushed into 10.6 main.

            the commits are in the mainline, shouldnt the ticket be closed?

            nikitamalyavin Nikita Malyavin added a comment - the commits are in the mainline, shouldnt the ticket be closed?

            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.