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

View created on view with order by does not keep sorting

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11
    • 10.4, 10.5, 10.6, 10.11
    • None

    Description

      Test:

      create table t1 (a int);
      insert into t1 values (3), (7), (1), (2), (4);
       
      create view v1 as select * from t1 order by a;
      create view v11 as select * from v1;
      select * from v11;
      drop view v1, v11;
      drop table t1;
      

      Expected result:

      a
      1
      2
      3
      4
      7
      

      Actual result:

      a
      3
      7
      1
      2
      4
      

      show create view v1;
      View	Create View	character_set_client	collation_connection
      v1	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` order by `t1`.`a`	latin1	latin1_swedish_ci
       
      show create view v11;
      View	Create View	character_set_client	collation_connection
      v11	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v11` AS select `v1`.`a` AS `a` from `v1`	latin1	latin1_swedish_ci
      
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              lstartseva Lena Startseva
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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