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

ALTER VIEW does not change ALGORITM

    XMLWordPrintable

Details

    • 5.5.44

    Description

      create table t1 (a int, b int);
      create algorithm=temptable view v2 (c) as select b+1 from t1;
      show create view v2;
      View	Create View	character_set_client	collation_connection
      v2	CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select (`t1`.`b` + 1) AS `c` from `t1`	latin1	latin1_swedish_ci
      alter algorithm=undefined view v2 (c) as select b+1 from t1;
      show create view v2;
      View	Create View	character_set_client	collation_connection
      v2	CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select (`t1`.`b` + 1) AS `c` from `t1`	latin1	latin1_swedish_ci
      alter algorithm=merge view v2 (c) as select b+1 from t1;
      show create view v2;
      View	Create View	character_set_client	collation_connection
      v2	CREATE ALGORITHM=MERGE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select (`t1`.`b` + 1) AS `c` from `t1`	latin1	latin1_swedish_ci
      drop view v2;
      drop table t1;

      test suite:

      create table t1 (a int, b int);
      create algorithm=temptable view v2 (c) as select b+1 from t1;
      show create view v2;
      alter algorithm=undefined view v2 (c) as select b+1 from t1;
      show create view v2;
      alter algorithm=merge view v2 (c) as select b+1 from t1;
      show create view v2;
      drop view v2;
      drop table t1;

      Attachments

        Issue Links

          Activity

            People

              svoj Sergey Vojtovich
              sanja Oleksandr Byelkin
              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.