diff options
author | Yuchen Pei <yuchen.pei@mariadb.com> | 2023-02-08 12:29:52 +1100 |
---|---|---|
committer | Yuchen Pei <yuchen.pei@mariadb.com> | 2023-03-20 17:37:09 +1100 |
commit | 725c759a1ad22cf9c11b6a1415d44c5249467c8b (patch) | |
tree | d7f80d2363880f844ec4845631b3904ea17e9259 /sql/sql_lex.h | |
parent | ce4a289f1c367987977f1a02bbb8d8b8e8e6bb53 (diff) | |
download | mariadb-git-bb-11.0-mdev-28152-squashed.tar.gz |
MDEV-28152 Features for sequencesbb-11.0-mdev-28152-squashed
- Add `as <int_type>` to sequence creation options
- int_type can be signed or unsigned integer types, including
tinyint, smallint, mediumint, int and bigint
- Limitation: when alter sequence as <new_int_type>, cannot have any
other alter options in the same statement
- Limitation: increment remains signed longlong, and the hidden
constraint (cache_size x abs(increment) < longlong_max) stays for
unsigned types. This means for bigint unsigned, neither
abs(increment) nor (cache_size x abs(increment)) can be between
longlong_max and ulonglong_max
- Truncating maxvalue and minvalue from user input to the nearest max
or min value of the type, plus or minus 1. When the truncation
happens, a warning is emitted
- Information schema table for sequences
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 95ed308103d..0d8dd837542 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -4093,8 +4093,9 @@ public: /* Create an item for "SETVAL(sequence_name, value [, is_used [, round]]) */ - Item *create_item_func_setval(THD *thd, Table_ident *ident, longlong value, - ulonglong round, bool is_used); + Item *create_item_func_setval(THD *thd, Table_ident *ident, + Longlong_hybrid value, ulonglong round, + bool is_used); /* Create an item for a name in LIMIT clause: LIMIT var |