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

Implement FLUSH TABLES tbl_name [, tbl_name] ... WITH READ LOCK for views

    Details

    • Type: Task
    • Status: In Progress (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Fix Version/s: 10.5
    • Component/s: Views
    • Labels:

      Description

      FLUSH TABLES tbl_name [, tbl_name] ... WITH READ LOCK does not currently work for views.

      For example, if we have this view:

      CREATE TABLE t (qty INT, price INT);
      CREATE VIEW v AS SELECT qty, price, qty*price AS value FROM t;
      

      We can see this behavior:

      MariaDB [db1]> FLUSH TABLES v WITH READ LOCK;
      ERROR 1347 (HY000): 'db1.v' is not BASE TABLE
      

      However, LOCK TABLES ... READ is smart enough to lock the underlying tables:

      MariaDB [db1]> LOCK TABLES v READ;
      Query OK, 0 rows affected (0.00 sec)
      

      Some users would like to see FLUSH TABLES tbl_name [, tbl_name] ... WITH READ LOCK work similarly for views.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                holyfoot Alexey Botchkov
                Reporter:
                GeoffMontee Geoff Montee
              • Votes:
                1 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated: