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

If a materialized VIEW is used multiple times in a query, several temporary tables are created




      There is a couple of comments to MDEV-5535 which makes me think that something does not work quite as expected:

      Sergei Petrunia added a comment - 2015-11-26 03:33
      [No MDEV yet] Materialized view processing. Currently, if a materialized VIEW is used multiple times in the query, several temporary tables will be created and populated.

      Sergei Golubchik added a comment - 2015-11-26 19:08
      Nirbhay Choubey, note the comment above. It means that one should be able to reopen internal temporary tables too.

      Currently it looks like it works the old way (or maybe I misunderstood what the new way should be):

      MariaDB [test]> create algorithm=temptable view v1 as select 1;
      Query OK, 0 rows affected (0.27 sec)
      MariaDB [test]> flush status;
      Query OK, 0 rows affected (0.00 sec)
      MariaDB [test]> select * from v1 v1a, v1 v1b;
      | 1 | 1 |
      | 1 | 1 |
      1 row in set (0.00 sec)
      MariaDB [test]> show status like 'Created_tmp_tables';
      | Variable_name      | Value |
      | Created_tmp_tables | 2     |
      1 row in set (0.00 sec)

      If it's indeed not the desired behavior, I'm not sure whether it's because something wasn't done in the scope of MDEV-5535, or because it requires additional changes in view processing. In the latter case, please feel free to convert this bug into a task and edit summary/description as necessary.


          Issue Links



              Unassigned Unassigned
              elenst Elena Stepanova
              0 Vote for this issue
              1 Start watching this issue



                  Git Integration

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