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

Sequences with maxvalue <= cache size resets its value on alter sequence ... cycle

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.0(EOL)
    • 11.0(EOL)
    • Sequences
    • None

    Description

      When creating a sequence with maxvalue no greater than the cache size, altering it with cycle will reset its value. When the sequence is created with maxvalue greater than its cache size (default 1000), altering with cycle skips the cache which is the behaviour in MDEV-30865.

      d77aaa6994b 11.0

      create sequence s maxvalue 1000;
      select next value for s; # 1
      select next value for s; # 2
      alter sequence s cycle;
      select next value for s; # 1
      select next value for s; # 2
      drop sequence s;
       
      create sequence s maxvalue 1001;
      select next value for s; # 1
      select next value for s; # 2
      alter sequence s cycle;
      select next value for s; # 1001
      drop sequence s;
      

      Attachments

        Activity

          People

            ycp Yuchen Pei
            ycp Yuchen Pei
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.