summaryrefslogtreecommitdiff
path: root/sql/sql_sequence.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-06-08 12:58:11 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-06-08 12:58:11 +0300
commitd3681335b18b82cf1cfb090ce1938de2ee6b21fc (patch)
tree4af0c9cc3024248ad08967bf8922a13cabb794ac /sql/sql_sequence.cc
parent996431fdac468a01219feff5aa0062df9d480ace (diff)
parent57022dfb25b931a329905364d7056ac61950d300 (diff)
downloadmariadb-git-d3681335b18b82cf1cfb090ce1938de2ee6b21fc.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'sql/sql_sequence.cc')
-rw-r--r--sql/sql_sequence.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc
index e351a0332e6..c0cbd532331 100644
--- a/sql/sql_sequence.cc
+++ b/sql/sql_sequence.cc
@@ -203,6 +203,16 @@ bool check_sequence_fields(LEX *lex, List<Create_field> *fields)
reason= "Sequence tables cannot have any keys";
goto err;
}
+ if (lex->alter_info.check_constraint_list.elements > 0)
+ {
+ reason= "Sequence tables cannot have any constraints";
+ goto err;
+ }
+ if (lex->alter_info.flags & ALTER_ORDER)
+ {
+ reason= "ORDER BY";
+ goto err;
+ }
for (field_no= 0; (field= it++); field_no++)
{
@@ -210,7 +220,8 @@ bool check_sequence_fields(LEX *lex, List<Create_field> *fields)
if (my_strcasecmp(system_charset_info, field_def->field_name,
field->field_name.str) ||
field->flags != field_def->flags ||
- field->type_handler() != field_def->type_handler)
+ field->type_handler() != field_def->type_handler ||
+ field->check_constraint || field->vcol_info)
{
reason= field->field_name.str;
goto err;