Details

    Description

      Oracle example hr ddl script has following command:

      CREATE SEQUENCE EMPLOYEES_SEQ 
          INCREMENT BY 1 
          MAXVALUE 9999999999999999999999999999 
          MINVALUE 1 
          NOCACHE 
      ;
      

      Which fails in 10.3.0 with sql_mode='oracle'::

      MariaDB [test]> CREATE SEQUENCE EMPLOYEES_SEQ
          ->     INCREMENT BY 1
          ->     MAXVALUE 9999999999999999999999999999
          ->     MINVALUE 1
          ->     NOCACHE
          -> ;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '9999999999999999999999999999
          MINVALUE 1
          NOCACHE' at line 3
      

      The command succeeds when MAXVALUE is reduced down to 18x9s, i.e.:

      MariaDB [test]> create sequence d18 maxvalue 999999999999999999;
      Query OK, 0 rows affected (0.03 sec)
       
      MariaDB [test]> create sequence d19 maxvalue 9999999999999999999;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '9999999999999999999' at line 1
      

      I am not sure that we should implement sequence with such high range, but we definitely should make sure that such commands succeed (maybe with a warning that maxvalue was adjusted). That should simplify typical migration and eventual testing with existing scripts.

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Michael Widenius made transition -
            Open In Progress
            317d 14h 45m 1
            Michael Widenius made transition -
            In Progress Closed
            49s 1

            People

              monty Michael Widenius
              anikitin Andrii Nikitin (Inactive)
              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.