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

Strange ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN upon ALTER on versioning column

Details

    Description

      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;
      

      ALTER returns the error:

      MariaDB [test]> alter table t1 modify s timestamp(6) as row start;
      ERROR 1907 (HY000): This is not yet supported for generated columns
      

      This is strange, because ALTER doesn't even modify anything; and even more strange, because ALTER on the same table for a generated column not related to versioning works all right:

      MariaDB [test]> alter table t1 modify j int as (i);
      Query OK, 0 rows affected (0.00 sec)
      Records: 0  Duplicates: 0  Warnings: 0
      

      It would be understandable if it said that ALTER is not supported for versioning columns (if that's indeed so), but the error as it is now is wrong.

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            krizhanovsky Alexander Krizhanovsky made changes -
            Assignee Alexander Krizhanovsky [ krizhanovsky ] Aleksey Midenkov [ midenok ]
            midenok Aleksey Midenkov made changes -
            Status Open [ 1 ] In Progress [ 3 ]

            #0  my_error (nr=1907, MyFlags=0) at /home/midenok/src/mariadb/trunk/src/mysys/my_error.c:113
            #1  0x0000000000b15370 in Vers_parse_info::fix_alter_info (this=0x7fffe52ab4e0, thd=0x7fff84000d50, alter_info=0x7fffe52ab2e0, create_info=0x7fffe52ab390, table=0x7fff840fae50) at /home/midenok/src/mariadb/trunk/src/sql/handler.cc:7150
            #2  0x00000000008ac55e in mysql_alter_table (thd=0x7fff84000d50, new_db=0x7fff84005398, new_name=0x7fff84005748, create_info=0x7fffe52ab390, table_list=0x7fff84013a88, alter_info=0x7fffe52ab2e0, order_num=0, order=0x0, ignore=false) at /home/midenok/src/mariadb/trunk/src/sql/sql_table.cc:9349
            #3  0x0000000000954a61 in Sql_cmd_alter_table::execute (this=0x7fff84014208, thd=0x7fff84000d50) at /home/midenok/src/mariadb/trunk/src/sql/sql_alter.cc:328
            #4  0x00000000007b6d91 in mysql_execute_command (thd=0x7fff84000d50) at /home/midenok/src/mariadb/trunk/src/sql/sql_parse.cc:6292
            #5  0x00000000007a89a3 in mysql_parse (thd=0x7fff84000d50, rawbuf=0x7fff84013978 "alter table t1 modify s timestamp(6) as row start", length=49, parser_state=0x7fffe52ae640, is_com_multi=false, is_next_command=false) at /home/midenok/src/mariadb/trunk/src/sql/sql_parse.cc:8021
            

            midenok Aleksey Midenkov added a comment - #0 my_error (nr=1907, MyFlags=0) at /home/midenok/src/mariadb/trunk/src/mysys/my_error.c:113 #1 0x0000000000b15370 in Vers_parse_info::fix_alter_info (this=0x7fffe52ab4e0, thd=0x7fff84000d50, alter_info=0x7fffe52ab2e0, create_info=0x7fffe52ab390, table=0x7fff840fae50) at /home/midenok/src/mariadb/trunk/src/sql/handler.cc:7150 #2 0x00000000008ac55e in mysql_alter_table (thd=0x7fff84000d50, new_db=0x7fff84005398, new_name=0x7fff84005748, create_info=0x7fffe52ab390, table_list=0x7fff84013a88, alter_info=0x7fffe52ab2e0, order_num=0, order=0x0, ignore=false) at /home/midenok/src/mariadb/trunk/src/sql/sql_table.cc:9349 #3 0x0000000000954a61 in Sql_cmd_alter_table::execute (this=0x7fff84014208, thd=0x7fff84000d50) at /home/midenok/src/mariadb/trunk/src/sql/sql_alter.cc:328 #4 0x00000000007b6d91 in mysql_execute_command (thd=0x7fff84000d50) at /home/midenok/src/mariadb/trunk/src/sql/sql_parse.cc:6292 #5 0x00000000007a89a3 in mysql_parse (thd=0x7fff84000d50, rawbuf=0x7fff84013978 "alter table t1 modify s timestamp(6) as row start", length=49, parser_state=0x7fffe52ae640, is_com_multi=false, is_next_command=false) at /home/midenok/src/mariadb/trunk/src/sql/sql_parse.cc:8021

            Fixed:

            ERROR 4130 (HY000): Can not change system versioning field `s`
            

            midenok Aleksey Midenkov added a comment - Fixed: ERROR 4130 (HY000): Can not change system versioning field `s`
            midenok Aleksey Midenkov made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            midenok Aleksey Midenkov made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            midenok Aleksey Midenkov made changes -
            Assignee Aleksey Midenkov [ midenok ] Sergei Golubchik [ serg ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.3.7 [ 23005 ]
            Fix Version/s 10.3 [ 22126 ]
            Assignee Sergei Golubchik [ serg ] Aleksey Midenkov [ midenok ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 86693 ] MariaDB v4 [ 154206 ]

            People

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