Details
-
New Feature
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
Description
This is a list of trivial features for Sequence (originally mentioned as part of MDEV-13005)
- Support syntax "CREATE SEQUENCE x AS <some_int_type>';
<some_int_type> can mean all the integers that we support
Currently (as per documentation) maximum value that sequence can support is 9223372036854775806.
But unsigned bigint can have maximum (unsigned) value: 18446744073709551615
So adding support for this maximum (unsigned) value is needed.
Also, set maximum minimum based on the datatype
- Allow in parser very big numbers (decimal) for MAXVALUE but change these to LONGLONG_MAX-1, with a note for the user. This is needes as it's common practice to use
MAXVALUE 9999999999999999999999999999 in Oracle examples.
- Create information_schema.sequences that lists all sequences and their information. Should work similar to views:
select * from information_schema.sequences where table_schema="test";
The column names are:
SEQUENCE_CATALOG, SEQUENCE_SCHEMA, SEQUENCE_NAME, DATA_TYPE, NUMERIC_PRECISION, NUMERIC_PRECISION_RADIX, NUMERIC_SCALE, START_VALUE, MINIMUM_VALUE, MAXIMUM_VALUE, INCREMENT, CYCLE_OPTION, DECLARED_DATA_TYPE, DECLARED_NUMERIC_PRECISION, DECLARED_NUMERIC_SCALE
Some suggested values:
DATA_TYPE BIGINT
DECLARED_DATA_TYPE BIGINT
NUMERIC_PRECISION 19
NUMERIC_PRECISION_RADIX 10
DECLARED_DATA_TYPE NULL
DECLARED_NUMERIC_PRECISION NULL
DECLARED_NUMERIC_SCALE NULL
Attachments
Issue Links
- causes
-
MDEV-33012 Alter sequence with second execution of prepare statement crashes server
-
- Closed
-
-
MDEV-33734 sql_sequence.next fails with UBSAN in buildbot and outside
-
- Closed
-
-
MDEV-33739 Assertion `0' failed in Type_handler_typelib::max_display_length_for_field
-
- Closed
-
-
MDEV-33836 Assertion `(ulonglong) next_free_value % real_increment == (ulonglong) offset' failed in void sequence_definition::adjust_values(longlong)
-
- Closed
-
- is blocked by
-
MDEV-33012 Alter sequence with second execution of prepare statement crashes server
-
- Closed
-
- relates to
-
MDEV-13005 Fixing bugs in SEQUENCE, part 3
-
- Closed
-
-
MDEV-25729 Fetch MariaDB Sequences metadata
-
- Closed
-
-
BLOG-249 Loading...
Initial version of the second item done: https://github.com/MariaDB/server/commit/84675ed91f4, where for consistency we
1. truncate not only decimals, but also ulonglong, -ulonglong, LONGLONG_MAX and LONGLONG_MIN
2. truncate not only maxvalue but also minvalue (obviously)
Now working on the first item.