[MDEV-12883] CREATE SEQUENCE with huge MAXVALUE Created: 2017-05-23 Updated: 2018-04-06 Resolved: 2018-04-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser, Sequences |
| Affects Version/s: | 10.3.0 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andrii Nikitin (Inactive) | Assignee: | Michael Widenius |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | Compatibility | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Oracle example hr ddl script has following command:
Which fails in 10.3.0 with sql_mode='oracle'::
The command succeeds when MAXVALUE is reduced down to 18x9s, i.e.:
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. |
| Comments |
| Comment by Michael Widenius [ 2018-04-06 ] |
|
https://mariadb.com/kb/en/library/create-sequence/ gives the minimum/minimum value for each of the create sequence parameters: MAXVALUE >= start The reason for the error message is that MAXVALUE expects an integer as argument and the number 9999999999999999999999999999 is not an integer. You get the same error for the given number if it's used as an argument for anything that expects an integer. I don't see any big reason for making MAXVALUE a special case |