maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #11956
Re: c3d2998a038: MDEV-16130 wrong error message adding AS ROW START to versioned table
Hi Sergei!
Fixed in `bb-10.3-midenok`.
On Fri, Aug 30, 2019 at 8:49 PM Sergei Golubchik <serg@xxxxxxxxxxx> wrote:
> Hi, Aleksey!
>
> On Aug 30, Aleksey Midenkov wrote:
> > revision-id: c3d2998a038 (versioning-1.0.3-71-gc3d2998a038)
> > parent(s): 611488e3d90
> > author: Aleksey Midenkov <midenok@xxxxxxxxx>
> > committer: Aleksey Midenkov <midenok@xxxxxxxxx>
> > timestamp: 2018-05-23 22:45:08 +0300
> > message:
> >
> > MDEV-16130 wrong error message adding AS ROW START to versioned table
> >
> > Closes tempesta-tech/mariadb#494
> >
> > ---
> > mysql-test/suite/versioning/r/alter.result | 12 ++++++++----
> > mysql-test/suite/versioning/t/alter.test | 7 ++++++-
> > sql/handler.cc | 3 ++-
> > sql/share/errmsg-utf8.txt | 2 +-
> > sql/sql_table.cc | 6 ------
> > 5 files changed, 17 insertions(+), 13 deletions(-)
> >
> > diff --git a/mysql-test/suite/versioning/r/alter.result
> b/mysql-test/suite/versioning/r/alter.result
> > index fafcf3c30b0..666420dc2e5 100644
> > --- a/mysql-test/suite/versioning/r/alter.result
> > +++ b/mysql-test/suite/versioning/r/alter.result
> > @@ -76,13 +76,17 @@ t CREATE TABLE `t` (
> > `a` int(11) DEFAULT NULL
> > ) ENGINE=MyISAM DEFAULT CHARSET=latin1
> > alter table t add column trx_start timestamp(6) as row start;
> > -ERROR HY000: Table `t` is not system-versioned
> > +ERROR HY000: Can not add system property AS ROW START/END for field
> `trx_start`
>
> This is very strange wording. What is a "system property"? The standard
> has no such concept. Neither does MariaDB, it's not used anywhere in the
> manual, as far as I know. Here you can use, for example,
> ER_VERS_DUPLICATE_ROW_START_END:
>
> Duplicate ROW START column `trx_start`
>
> > alter table t add system versioning;
> > show create table t;
> > Table Create Table
> > t CREATE TABLE `t` (
> > `a` int(11) DEFAULT NULL
> > ) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
> > +alter table t add column trx_start timestamp(6) as row start;
> > +ERROR HY000: Can not add system property AS ROW START/END for field
> `trx_start`
> > +alter table t modify a int as row start;
> > +ERROR HY000: Can not add system property AS ROW START/END for field `a`
> > alter table t add column b int;
> > show create table t;
> > Table Create Table
> > @@ -527,6 +531,6 @@ use test;
> > # MDEV-15956 Strange ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN upon
> ALTER on versioning column
> > create or replace table t1 (i int, j int as (i), s timestamp(6) as row
> start, e timestamp(6) as row end, period for system_time(s,e)) with system
> versioning;
> > alter table t1 modify s timestamp(6) as row start;
> > -ERROR HY000: Can not change system versioning field `s`
> > +ERROR HY000: Can not add system property AS ROW START/END for field `s`
>
> This doesn't look right either. The statement does not add anything, the
> field `s` is already AS ROW START. Why is it an error at all?
>
> > drop database test;
> > create database test;
>
> Regards,
> Sergei
> VP of MariaDB Server Engineering
> and security@xxxxxxxxxxx
>
--
All the best,
Aleksey Midenkov
@midenok
References