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

Reset Sequence doesn't reset the value the second time.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Won't Fix
    • 10.2.14
    • N/A
    • Sequences
    • None

    Description

      Reset Sequence doesn't reset the value the second time.

       
      Test case:-
       
      MariaDB [test1]> set sql_mode=ORACLE;
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [test1]> CREATE or replace SEQUENCE "entkaisgc_sg" start with 1 minvalue 1 maxvalue 9999999999999999 increment by 1 cache 20 cycle ;
      Query OK, 0 rows affected (0.022 sec)
       
      MariaDB [test1]> select entkaisgc_sg.nextval;
      +----------------------+
      | entkaisgc_sg.nextval |
      +----------------------+
      | 1 |
      +----------------------+
      1 row in set (0.012 sec)
       
      MariaDB [test1]> select entkaisgc_sg.nextval;
      +----------------------+
      | entkaisgc_sg.nextval |
      +----------------------+
      | 2 |
      +----------------------+
      1 row in set (0.001 sec)
       
      MariaDB [test1]> SELECT setval(entkaisgc_sg,9999999999999999);
      +---------------------------------------+
      | setval(entkaisgc_sg,9999999999999999) |
      +---------------------------------------+
      | 9999999999999999 |
      +---------------------------------------+
      1 row in set (0.001 sec)
       
      MariaDB [test1]> select entkaisgc_sg.nextval;
      +----------------------+
      | entkaisgc_sg.nextval |
      +----------------------+
      | 1 |
      +----------------------+
      1 row in set (0.001 sec)
       
      MariaDB [test1]> select entkaisgc_sg.nextval;
      +----------------------+
      | entkaisgc_sg.nextval |
      +----------------------+
      | 2 |
      +----------------------+
      1 row in set (0.000 sec)
       
      MariaDB [test1]> SELECT setval(entkaisgc_sg,9999999999999999);
      +---------------------------------------+
      | setval(entkaisgc_sg,9999999999999999) |
      +---------------------------------------+
      | NULL |
      +---------------------------------------+
      1 row in set (0.000 sec)
       
      MariaDB [test1]> select entkaisgc_sg.nextval;
      +----------------------+
      | entkaisgc_sg.nextval |
      +----------------------+
      | 3 |
      +----------------------+
      1 row in set (0.001 sec)
       
      
      

      Attachments

        Activity

          People

            greenman Ian Gilfillan
            pramod.mahto@mariadb.com Pramod Mahto
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.