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

create table ... select is metadata locking information_schema

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.4.8
    • Fix Version/s: 10.4
    • Component/s: Server
    • Labels:
      None

      Description

      When issuing a CREATE TABLE .... SELECT, the information schema becomes unusable because it gets metadata-locked. This is creating issues to monitoring systems that normally query information_schema for monitoring purposes (queries stack up in processlist waiting for metadata lock).

      How to reproduce:

      In terminal 1:

      create table test (id int not null primary key default 0) select 1, sleep(100);
      

      In termninal 2:

      SELECT SUM((DATA_LENGTH+INDEX_LENGTH)) FROM INFORMATION_SCHEMA.TABLES;
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              serg Sergei Golubchik
              Reporter:
              rpizzi Rick Pizzi
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated: