summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2018-05-23 22:15:04 +0300
committerAleksey Midenkov <midenok@gmail.com>2019-10-10 00:20:34 +0300
commit647a38818a44012c22128e0e1cad96739aa8a5c2 (patch)
tree72efc690af89c2e910720e9bec3bb59a9822e3f8 /sql/handler.cc
parent75ba5c815d0272b35a28225d495a4a03fe63d29f (diff)
downloadmariadb-git-647a38818a44012c22128e0e1cad96739aa8a5c2.tar.gz
MDEV-16130 wrong error message adding AS ROW START to versioned table
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 587ec633245..1494060e24d 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -7301,13 +7301,15 @@ bool Vers_parse_info::fix_alter_info(THD *thd, Alter_info *alter_info,
return false;
}
+ if (!(alter_info->flags & ALTER_ADD_SYSTEM_VERSIONING))
{
List_iterator_fast<Create_field> it(alter_info->create_list);
while (Create_field *f= it++)
{
- if (f->change.length && f->flags & VERS_SYSTEM_FIELD)
+ if (f->flags & VERS_SYSTEM_FIELD)
{
- my_error(ER_VERS_ALTER_SYSTEM_FIELD, MYF(0), f->field_name.str);
+ my_error(ER_VERS_DUPLICATE_ROW_START_END, MYF(0),
+ f->flags & VERS_SYS_START_FLAG ? "START" : "END", f->field_name.str);
return true;
}
}