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

System versioning for system tables does not work as expected

Details

    Description

      I would think that adding system versioning for (some) system tables is a reasonable idea, given that they are not updated so often, but are extremely important. However, it doesn't work (in different ways), a couple examples are below; there are probably more, I didn't try other tables yet. Not sure whether it should be fixed or prohibited, but either one or another should be done.

      alter table mysql.user add system versioning;
      # Query OK, 2 rows affected (0.04 sec)
       
      select user, host, sys_trx_start, sys_trx_end from mysql.user for system_time all;
      # +------+-----------+----------------------------+----------------------------+
      # | user | host      | sys_trx_start              | sys_trx_end                |
      # +------+-----------+----------------------------+----------------------------+
      # | root | localhost | 2017-12-28 19:40:13.453770 | 2038-01-19 05:14:07.999999 |
      # | root | 127.0.0.1 | 2017-12-28 19:40:13.453770 | 2038-01-19 05:14:07.999999 |
      # +------+-----------+----------------------------+----------------------------+
       
      create user foo@localhost;
      # Query OK, 0 rows affected (0.00 sec)
       
      select user, host, sys_trx_start, sys_trx_end from mysql.user for system_time as of current_timestamp;
      # +------+-----------+----------------------------+----------------------------+
      # | user | host      | sys_trx_start              | sys_trx_end                |
      # +------+-----------+----------------------------+----------------------------+
      # | root | localhost | 2017-12-28 19:40:13.453770 | 2038-01-19 05:14:07.999999 |
      # | root | 127.0.0.1 | 2017-12-28 19:40:13.453770 | 2038-01-19 05:14:07.999999 |
      # +------+-----------+----------------------------+----------------------------+
       
      select user, host, sys_trx_start, sys_trx_end from mysql.user for system_time all;
      # +------+-----------+----------------------------+----------------------------+
      # | user | host      | sys_trx_start              | sys_trx_end                |
      # +------+-----------+----------------------------+----------------------------+
      # | root | localhost | 2017-12-28 19:40:13.453770 | 2038-01-19 05:14:07.999999 |
      # | root | 127.0.0.1 | 2017-12-28 19:40:13.453770 | 2038-01-19 05:14:07.999999 |
      # | foo  | localhost | NULL                       | 0000-00-00 00:00:00.000000 |
      # +------+-----------+----------------------------+----------------------------+
      

      alter table mysql.proc add system versioning;
      # Query OK, 2 rows affected (0.04 sec)
       
      create procedure pr() begin end;
      # ERROR 1805 (HY000): Column count of mysql.proc is wrong. Expected 21, found 23. The table is probably corrupted
      

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            Assignee Elena Stepanova [ elenst ] Sergei Golubchik [ serg ]
            elenst Elena Stepanova made changes -
            serg Sergei Golubchik made changes -
            Affects Version/s 10.3.4 [ 22904 ]
            Affects Version/s N/A [ 14700 ]
            serg Sergei Golubchik made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Alexander Krizhanovsky [ krizhanovsky ]
            krizhanovsky Alexander Krizhanovsky made changes -
            Assignee Alexander Krizhanovsky [ krizhanovsky ] Aleksey Midenkov [ midenok ]
            midenok Aleksey Midenkov made changes -
            Comment [ Is this really Critical priority? ]
            midenok Aleksey Midenkov made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            midenok Aleksey Midenkov made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Assignee Aleksey Midenkov [ midenok ] Sergei Golubchik [ serg ]
            serg Sergei Golubchik made changes -
            Status Stalled [ 10000 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Sprint 10.3.6 [ 240 ]
            svoj Sergey Vojtovich made changes -
            Labels contribution foundation
            serg Sergei Golubchik made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.3.6 [ 23003 ]
            Fix Version/s 10.3 [ 22126 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Labels contribution foundation
            ratzpo Rasmus Johansson (Inactive) made changes -
            Sprint 10.3.6 [ 240 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Rank Ranked higher
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 84626 ] MariaDB v4 [ 153454 ]

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.