Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Won't Fix
-
10.2.14
-
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)
|
|
|