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

INSERT .. SELECT into user-defined versioning columns does not produce error/warning

    XMLWordPrintable

Details

    Description

      create table t (a int, s timestamp(6) as row start, e timestamp(6) as row end, period for system_time (s,e)) with system versioning;
      insert into t (a) values (1);
       
      --error ER_WARNING_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN
      insert into t values (2,now(),from_unixtime(2147483647.999999));
      --error ER_WARNING_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN
      insert into t (a,s,e) values (2,now(),from_unixtime(2147483647.999999));
      --error ER_WARNING_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN
      insert into t (a,s,e) select a,s,e from t;
       
      insert into t select * from t;
       
      # Cleanup
      drop table t;
      

      In the test case above, INSERT VALUES produces the error/warning regardless whether a list of column is provided; INSERT .. (column list) SELECT ... also produces it; but INSERT .. SELECT without the column list does not. For a table with usual virtual columns it does.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:

              Git Integration

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