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

LASTVAL(t1) and LASTVAL(T1) do not work well with lower-case-table-names=0

Details

    Description

      I run this script:

      create or replace sequence t1;
      create or replace sequence T1;
      select nextval(t1), lastval(t1);
      select nextval(T1), lastval(T1);
      select lastval(t1), lastval(T1);
      

      The last statement returnt these results:

      +-------------+-------------+
      | lastval(t1) | lastval(T1) |
      +-------------+-------------+
      |        NULL |        NULL |
      +-------------+-------------+
      

      Look wrong. The expected result should be:

      +-------------+-------------+
      | lastval(t1) | lastval(T1) |
      +-------------+-------------+
      |           1 |           1 |
      +-------------+-------------+
      

      Attachments

        Issue Links

          Activity

            bar Alexander Barkov created issue -
            bar Alexander Barkov made changes -
            Field Original Value New Value
            bar Alexander Barkov made changes -
            Assignee Alexander Barkov [ bar ]
            bar Alexander Barkov made changes -
            Fix Version/s 11.4.2 [ 29633 ]
            Fix Version/s 11.5.1 [ 29634 ]
            Fix Version/s 10.5.26 [ 29832 ]
            Fix Version/s 10.6.19 [ 29833 ]
            Fix Version/s 10.11.9 [ 29834 ]
            Fix Version/s 11.1.6 [ 29835 ]
            Fix Version/s 11.2.5 [ 29836 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 11.4 [ 29301 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            dbart Daniel Bartholomew made changes -
            Fix Version/s 11.4.3 [ 29837 ]
            Fix Version/s 11.5.2 [ 29838 ]
            dbart Daniel Bartholomew made changes -
            Fix Version/s 11.4.2 [ 29633 ]
            Fix Version/s 11.5.1 [ 29634 ]

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.