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

Lock wait timeout during CREATE TABLE AS SELECT FROM mysql.innodb_table_stats

    XMLWordPrintable

Details

    • Bug
    • Status: In Progress (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.11
    • 10.6
    • None
    • Can result in hang or crash

    Description

      I couldn't reproduce it in the test suite, but the issue is repeatable in the client:

      MariaDB [test]> use test;
      MariaDB [test]> create table t1 (a int, key(a)) engine=InnoDB;
      MariaDB [test]> analyze table t1;
       
      MariaDB [test]> create table t1_stat as SELECT *  FROM mysql.innodb_table_stats WHERE table_name='t1';
      Query OK, 1 row affected, 1 warning (50.114 sec)
      Records: 1  Duplicates: 0  Warnings: 1
       
      MariaDB [test]> show warnings;
      +---------+------+-----------------------------------------------------------------------+
      | Level   | Code | Message                                                               |
      +---------+------+-----------------------------------------------------------------------+
      | Warning | 1088 | Error updating stats for table after table rebuild: Lock wait timeout |
      +---------+------+-----------------------------------------------------------------------+
      1 row in set (0.000 sec)
      

      Same effect if there is `mysql.innodb_index_stats` instead of `mysql.innodb_table_stats` in the CREATE TABLE statement.

      May be caused or related to MDEV-38667.

      Attachments

        Issue Links

          Activity

            People

              gkodinov Georgi Kodinov
              oleg.smirnov Oleg Smirnov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.