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

A metadata lock never dies

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • None
    • None
    • None
    • None

    Description

      1) Open a console and run:

      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 8
      Server version: 5.5.30-MariaDB mariadb.org binary distribution
       
      Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.
       
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
       
      MariaDB [(none)]> DELIMITER ||
      MariaDB [(none)]> DROP FUNCTION IF EXISTS `test`.`f`;
          -> CREATE FUNCTION `test`.`f`() RETURNS TINYINT UNSIGNED
          -> BEGIN
          ->  RETURN 1;
          -> END;
          -> ||
      Query OK, 0 rows affected (0.00 sec)
       
      Query OK, 0 rows affected (0.24 sec)
       
      MariaDB [(none)]>

      2) Open ANOTHER console and run:

      MariaDB [test]> SELECT test.f();
      +----------+
      | test.f() |
      +----------+
      |        1 |
      +----------+
      1 row in set (0.00 sec)
       
      MariaDB [test]>

      3) Go back to the first console, and run:

      MariaDB [(none)]> DROP FUNCTION IF EXISTS `test`.`f`;
          -> ||

      Everything freezes. Then I ask for a processlist using the second console:

      MariaDB [test]> SHOW FULL PROCESSLIST;
      +----+------+----------------+------+---------+------+-------------------------------------------+------------------------------------+----------+
      | Id | User | Host           | db   | Command | Time | State                 | Info                               | Progress |
      +----+------+----------------+------+---------+------+-------------------------------------------+------------------------------------+----------+
      |  6 | root | localhost:3504 | test | Query   |    0 | NULL                 | SHOW FULL PROCESSLIST              |    0.000 |
      |  8 | root | localhost:3508 | NULL | Query   |  594 | Waiting for stored function metadata lock | DROP FUNCTION IF EXISTS `test`.`f` |    0.000 |
      +----+------+----------------+------+---------+------+-------------------------------------------+------------------------------------+----------+
      2 rows in set (0.00 sec)
       
      MariaDB [test]>

      This always happens with 5.5.30 and 10.0.2 on WinXP. Didn't try Linux or older Maria versions. Happens with both functions and procedures.

      Attachments

        Activity

          People

            elenst Elena Stepanova
            f_razzoli Federico Razzoli
            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.