summaryrefslogtreecommitdiff
path: root/sql/sql_sequence.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-06-08 11:45:28 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-06-08 11:45:28 +0300
commit57022dfb25b931a329905364d7056ac61950d300 (patch)
tree94a7131bfffa205d89a8563a5c749f843b920ecb /sql/sql_sequence.cc
parenteb14e073ea121954fb5be6fac92fd84b7d57bb07 (diff)
parentbefb0bed68b555852e01859a846bf7ac40f15dbb (diff)
downloadmariadb-git-57022dfb25b931a329905364d7056ac61950d300.tar.gz
Merge 10.3 into 10.4
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 0b73f3ef629..91959f85e64 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;