Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-14946

ALTER TABLE silently ignores AS ROW attribute

    XMLWordPrintable

Details

    Description

      create or replace table t1 (i int);
      alter table t1 add r timestamp(6) generated always as row start;
      

      show create table t1 \G
       
             Table: t1
      Create Table: CREATE TABLE `t1` (
        `i` int(11) DEFAULT NULL,
        `r` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000'
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1
      1 row in set (0.00 sec)
      

      As discussed, it shouldn't be happening.
      CREATE TABLE properly rejects an attempt to create such a table:

      MariaDB [test]> create or replace table t1 (i int, r timestamp(6) generated always as row start);
      ERROR 4123 (HY000): Wrong parameters for `t1`: missing 'WITH SYSTEM VERSIONING'
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.