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

Lock on temporary table exists, even after the table was dropped.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.5, 10.1, 10.2, 10.3, 10.4, 10.0
    • Fix Version/s: 5.5, 10.1, 10.2, 10.3, 10.4, 10.0
    • Component/s: None
    • Labels:
      None

      Description

      MariaDB [test]> create  table t2 (a int);
      Query OK, 0 rows affected (0.062 sec)
       
      MariaDB [test]> create temporary table t1 (a int);
      Query OK, 0 rows affected (0.013 sec)
       
      MariaDB [test]> lock table t1 write;
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [test]> drop temporary table t1;
      Query OK, 0 rows affected (0.007 sec)
       
      MariaDB [test]> select * from t2; 
      ERROR 1100 (HY000): Table 't2' was not locked with LOCK TABLES
      

      Compare with not-temorary table:

      MariaDB [test]> create  table t2 (a int);
      Query OK, 0 rows affected (0.054 sec)
       
      MariaDB [test]> create table t1 (a int);
      Query OK, 0 rows affected (0.048 sec)
       
      MariaDB [test]> lock table t1 write;
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [test]> drop table t1;
      Query OK, 0 rows affected (0.025 sec)
       
      MariaDB [test]> select * from t2;
      Empty set (0.005 sec)
      

        Attachments

          Activity

            People

            Assignee:
            sanja Oleksandr Byelkin
            Reporter:
            alice Alice Sherepa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: