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

Handler and system versioning don't work well together: expired rows are returned

    XMLWordPrintable

Details

    Description

      HANDLER .. READ reads everything from a versioned table, regardless the system time, which is not really surprising, but probably not what one would expect (if there is anyone who uses HANDLER at all). If it's intentional, it needs to be documented. If it's not intentional, the best thing to do would be disable HANDLER for versioned tables, if possible; if not possible, then, again, document the current behavior.

      create or replace table t1 (a int) with system versioning;
      insert into t1 values (1),(2);
      delete from t1 where a = 1;
      handler t1 open as h;
      handler h read first;
      handler h read next;
      handler h close;
      

      10.3 d71a8855eef

      MariaDB [test]> handler h read first;
      +------+----------------------------+----------------------------+
      | a    | row_start                  | row_end                    |
      +------+----------------------------+----------------------------+
      |    1 | 2018-04-22 01:25:57.867781 | 2018-04-22 01:26:03.379678 |
      +------+----------------------------+----------------------------+
      1 row in set (0.00 sec)
       
      MariaDB [test]> handler h read next;
      +------+----------------------------+----------------------------+
      | a    | row_start                  | row_end                    |
      +------+----------------------------+----------------------------+
      |    2 | 2018-04-22 01:25:57.867781 | 2038-01-19 05:14:07.999999 |
      +------+----------------------------+----------------------------+
      1 row in set (0.01 sec)
      

      Attachments

        Activity

          People

            greenman Ian Gilfillan
            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.