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

Value of SEQUENCE table option is ignored upon creation

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.3
    • Fix Version/s: 10.3
    • Component/s: Sequences
    • Labels:
      None

      Description

      No matter which value the SEQUENCE option has, as long as it's present, the table is created as a sequence:

      Test case

      CREATE TABLE `s` (
        `next_not_cached_value` bigint(21) NOT NULL,
        `minimum_value` bigint(21) NOT NULL,
        `maximum_value` bigint(21) NOT NULL,
        `start_value` bigint(21) NOT NULL,
        `increment` bigint(21) NOT NULL,
        `cache_size` bigint(21) unsigned NOT NULL,
        `cycle_option` tinyint(1) unsigned NOT NULL,
        `cycle_count` bigint(21) NOT NULL
      ) SEQUENCE=0;
       
      SHOW CREATE TABLE s;
      SHOW CREATE SEQUENCE s;
       
      # Cleanup
      DROP TABLE s;
      

      Actual result

      MariaDB [test]> SHOW CREATE TABLE s \G
      *************************** 1. row ***************************
             Table: s
      Create Table: CREATE TABLE `s` (
        `next_not_cached_value` bigint(21) NOT NULL,
        `minimum_value` bigint(21) NOT NULL,
        `maximum_value` bigint(21) NOT NULL,
        `start_value` bigint(21) NOT NULL,
        `increment` bigint(21) NOT NULL,
        `cache_size` bigint(21) unsigned NOT NULL,
        `cycle_option` tinyint(1) unsigned NOT NULL,
        `cycle_count` bigint(21) NOT NULL
      ) ENGINE=InnoDB SEQUENCE=1
      1 row in set (0.00 sec)
      

      MariaDB [test]> SHOW CREATE SEQUENCE s \G
      *************************** 1. row ***************************
             Table: s
      Create Table: CREATE SEQUENCE `s` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB
      1 row in set (0.00 sec)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: