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

Better handling of system versioning for generated stored columns

    XMLWordPrintable

Details

    Description

      Now generated stored columns are always system versioned. WITH/WITHOUT SYSTEM VERSIONING is not supported for generated columns at parser level:

      field_def:
                opt_attribute
              | opt*generated_always AS virtual_column*func
               {
                 Lex->last*field->vcol*info= $3;
                 Lex->last*field->flags&= ~NOT_NULL*FLAG; // undo automatic NOT NULL for timestamps
               }
                vcol*opt_specifier vcol_opt*attribute
              | opt*generated_always AS ROW_SYM START_SYM opt_asrow*attribute
                {
                  if (Lex->last*field_generated_always_as_row*start())
                    MYSQL_YYABORT;
                }
              | opt*generated_always AS ROW_SYM END opt_asrow*attribute
                {
                  if (Lex->last*field_generated_always_as_row*end())
                    MYSQL_YYABORT;
                }
              ;
      

      Better feature would be to detect if all the components of generated stored column are WITHOUT SYSTEM VERSIONING and make it so accordingly. Of course independent WITHOUT SYSTEM VERSIONING for generated stored also makes sense.

      Please vote if your production use case will benefit from these features.

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              midenok Aleksey Midenkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.