Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3.1
Description
This is a list smaller bugs for SEQUENCE's that should be fixed before 10.3.1. A lot of the following things where reported by Peter Gulutzan.
Bugs and missing features
- SET @x = PREVIOUS VALUE FOR x;
> Result = Error 1146 (42S02) Table 'test.x' doesn't exist
Should be SEQUENCE doesn't exists
- CREATE SEQUENCE x START WITH 1 INCREMENT BY 123456789012345678;
> Result = Error 4061 (HY000) Sequence 'test.x' values are conflicting
> This is not a helpful message, saying "too big number" would be better.
- Create better error messages for the test of initial seqeunce values in:
bool sequence_definition::check_and_adjust(bool set_reserved_until)
But try to create reusable error messages
Type:
%s must be less than %s
Too big value for %s
Add also a check the cache can't be < 0 and not equal or bigger than
LONGLONG_MAX.
- This should give an error for the second create:
CREATE TEMPORARY TABLE s1 (s1 INT);
CREATE TEMPORARY SEQUENCE s1 (s1 INT);
- CREATE TABLE s1 (s1 INT);
DROP SEQUENCE s1;
> Error 4066 (42S02) 'test.s1' is not a SEQUENCE
CREATE TEMPORARY TABLE s1 (s1 INT);
DROP TEMPORARY SEQUENCE s1;
> Error 4067 (42S02) Unknown SEQUENCE: 'test.s1'
The second DROP should also give error 4066
- create trigger s1 before update on sequence_name for each row set @a = 5;
The above should fail with a new error 'One can't create a trigger on
a sequence"
Attachments
Issue Links
- causes
-
MDEV-32795 ALTER SEQUENCE IF NOT EXISTS non_existing_seq Errors rather than note
-
- Closed
-
- is part of
-
MDEV-10139 Support for SEQUENCE objects
-
- Closed
-
- relates to
-
MDEV-22705 Assertion `llabs(next_free_value % real_increment) == offset' failed in sequence_definition::adjust_values, from sequence_definition::check_and_adjust and from SEQUENCE::read_stored_values
-
- Confirmed
-
-
MDEV-28152 Features for sequence
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue is part of |
Fix Version/s | 10.4 [ 22408 ] |
Labels | beginner-friendly |
Link | This issue relates to MDEV-22705 [ MDEV-22705 ] |
Assignee | Rucha Deodhar [ rucha174 ] |
Parent |
|
|
Issue Type | Technical task [ 7 ] | Bug [ 1 ] |
Epic Link | MDEV-11070 [ 58519 ] |
Workflow | MariaDB v3 [ 81112 ] | MariaDB v4 [ 140334 ] |
Comment | [ [~ralf.gebhardt@mariadb.com] I wouldn't mind splitting it up and agree that it would be better or I can make multiple commits , one for each bug. Whichever seems more right. ] |
Description |
This is a list of trivial missing features and smaller bugs for SEQUENCE's that should be fixed before 10.3.1. A lot of the following things where reported by Peter Gulutzan.
Bugs and missing features - SET @x = PREVIOUS VALUE FOR x; > Result = Error 1146 (42S02) Table 'test.x' doesn't exist Should be SEQUENCE doesn't exists - Support syntax "CREATE SEQUENCE x AS BIGINT'; - CREATE SEQUENCE x START WITH 1 INCREMENT BY 123456789012345678; > Result = Error 4061 (HY000) Sequence 'test.x' values are conflicting > This is not a helpful message, saying "too big number" would be better. - Create better error messages for the test of initial seqeunce values in: bool sequence_definition::check_and_adjust(bool set_reserved_until) But try to create reusable error messages Type: %s must be less than %s Too big value for %s Add also a check the cache can't be < 0 and not equal or bigger than LONGLONG_MAX. - 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. - This should give an error for the second create: CREATE TEMPORARY TABLE s1 (s1 INT); CREATE TEMPORARY SEQUENCE s1 (s1 INT); - CREATE TABLE s1 (s1 INT); DROP SEQUENCE s1; > Error 4066 (42S02) 'test.s1' is not a SEQUENCE CREATE TEMPORARY TABLE s1 (s1 INT); DROP TEMPORARY SEQUENCE s1; > Error 4067 (42S02) Unknown SEQUENCE: 'test.s1' The second DROP should also give error 4066 - create trigger s1 before update on sequence_name for each row set @a = 5; The above should fail with a new error 'One can't create a trigger on a sequence" - 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 |
This is a list smaller bugs for SEQUENCE's that should be fixed before 10.3.1. A lot of the following things where reported by Peter Gulutzan.
Bugs and missing features - SET @x = PREVIOUS VALUE FOR x; > Result = Error 1146 (42S02) Table 'test.x' doesn't exist Should be SEQUENCE doesn't exists - CREATE SEQUENCE x START WITH 1 INCREMENT BY 123456789012345678; > Result = Error 4061 (HY000) Sequence 'test.x' values are conflicting > This is not a helpful message, saying "too big number" would be better. - Create better error messages for the test of initial seqeunce values in: bool sequence_definition::check_and_adjust(bool set_reserved_until) But try to create reusable error messages Type: %s must be less than %s Too big value for %s Add also a check the cache can't be < 0 and not equal or bigger than LONGLONG_MAX. - This should give an error for the second create: CREATE TEMPORARY TABLE s1 (s1 INT); CREATE TEMPORARY SEQUENCE s1 (s1 INT); - CREATE TABLE s1 (s1 INT); DROP SEQUENCE s1; > Error 4066 (42S02) 'test.s1' is not a SEQUENCE CREATE TEMPORARY TABLE s1 (s1 INT); DROP TEMPORARY SEQUENCE s1; > Error 4067 (42S02) Unknown SEQUENCE: 'test.s1' The second DROP should also give error 4066 - create trigger s1 before update on sequence_name for each row set @a = 5; The above should fail with a new error 'One can't create a trigger on a sequence" |
Link |
This issue relates to |
Status | Open [ 1 ] | In Progress [ 3 ] |
Assignee | Rucha Deodhar [ rucha174 ] | Oleksandr Byelkin [ sanja ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Oleksandr Byelkin [ sanja ] | Rucha Deodhar [ rucha174 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Rucha Deodhar [ rucha174 ] | Oleksandr Byelkin [ sanja ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Oleksandr Byelkin [ sanja ] | Rucha Deodhar [ rucha174 ] |
Comment | [ review ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Fix Version/s | 10.4.25 [ 27510 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Fix Version/s | 10.5.16 [ 27508 ] | |
Fix Version/s | 10.6.8 [ 27506 ] | |
Fix Version/s | 10.7.4 [ 27504 ] | |
Fix Version/s | 10.8.3 [ 27502 ] | |
Fix Version/s | 10.9.1 [ 27114 ] |
Link |
This issue causes |
I am new dev and can help with this. I went through the code base, but couldn't find the code where these bugs are present. Any help is appreciated. Thanks.