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

Value of SEQUENCE table option is ignored upon creation

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3
    • 10.3.3
    • Sequences
    • 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

              monty Michael Widenius
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.