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

System versioning doesn't support correct work for engine=connect and doesn't always give any warnings/errors

Details

    Description

      If add for engine=connect "system versioning" there is no any warnings/errors on creating table and inserting data, but "select" gives an empty result, "update" doesn't change value and "delete" fails with error:

      Test:

      create table t2 (
        x int,
        y int
      ) engine=connect table_type=FIX file_name='test.txt' with system versioning;
       
      insert into t2 values (1,1),(2,2),(3,3),(4,4),(5,5);
      select * from t2;
       
      update t2 set x=10 where y=4;
      select * from t2;
      delete from t2 where x=1;
      select * from t2;
       
      drop table t2;
      

      Result:

      create table t2 (
      x int,
      y int
      ) engine=connect table_type=FIX file_name='/test.txt' with system versioning;
      insert into t2 values (1,1),(2,2),(3,3),(4,4),(5,5);
      select * from t2;
      x	y
      update t2 set x=10 where y=4;
      select * from t2;
      x	y
      delete from t2 where x=1;
       
      mysqltest: At line 11: query 'delete from t2 where x=1' failed: ER_CRASHED_ON_USAGE (1194): Table 't2' is marked as crashed and should be repaired
      

      Attachments

        Issue Links

          Activity

            lstartseva Lena Startseva created issue -
            lstartseva Lena Startseva made changes -
            Field Original Value New Value
            lstartseva Lena Startseva made changes -
            Description If add for engine=connect "system versioning" there is no any warnings/errors on creating table and inserting data, but "select" gives an empty result, "update" doesn't change value and "delete" fails with error:

            Test:

            {code}
            create table t2 (
              x int,
              y int
            ) engine=connect table_type=FIX file_name='test.txt' with system versioning;

            insert into t2 values (1,1),(2,2),(3,3),(4,4),(5,5);
            select * from t2;

            update t2 set x=10 where y=4;
            select * from t2;
            delete from t2 where x=1;
            select * from t2;

            drop table t2;
            {code}

            Result:
            {code}
            create table t2 (
            x int,
            y int
            ) engine=connect table_type=FIX file_name='/test.txt' with system versioning;
            insert into t2 values (1,1),(2,2),(3,3),(4,4),(5,5);
            select * from t2;
            x y
            update t2 set x=10 where y=4;
            select * from t2;
            x y
            delete from t2 where x=1;
            versioning.bbb [ fail ]
                    Test ended at 2022-04-11 16:15:32

            CURRENT_TEST: versioning.bbb
            mysqltest: At line 11: query 'delete from t2 where x=1' failed: ER_CRASHED_ON_USAGE (1194): Table 't2' is marked as crashed and should be repaired
            {code}
            If add for engine=connect "system versioning" there is no any warnings/errors on creating table and inserting data, but "select" gives an empty result, "update" doesn't change value and "delete" fails with error:

            Test:

            {code}
            create table t2 (
              x int,
              y int
            ) engine=connect table_type=FIX file_name='test.txt' with system versioning;

            insert into t2 values (1,1),(2,2),(3,3),(4,4),(5,5);
            select * from t2;

            update t2 set x=10 where y=4;
            select * from t2;
            delete from t2 where x=1;
            select * from t2;

            drop table t2;
            {code}

            Result:
            {code}
            create table t2 (
            x int,
            y int
            ) engine=connect table_type=FIX file_name='/test.txt' with system versioning;
            insert into t2 values (1,1),(2,2),(3,3),(4,4),(5,5);
            select * from t2;
            x y
            update t2 set x=10 where y=4;
            select * from t2;
            x y
            delete from t2 where x=1;

            mysqltest: At line 11: query 'delete from t2 where x=1' failed: ER_CRASHED_ON_USAGE (1194): Table 't2' is marked as crashed and should be repaired
            {code}
            elenst Elena Stepanova made changes -
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Fix Version/s 10.8 [ 26121 ]
            Affects Version/s 10.3 [ 22126 ]
            Affects Version/s 10.4 [ 22408 ]
            Affects Version/s 10.5 [ 23123 ]
            Affects Version/s 10.6 [ 24028 ]
            Affects Version/s 10.7 [ 24805 ]
            Affects Version/s 10.8 [ 26121 ]
            elenst Elena Stepanova made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            elenst Elena Stepanova made changes -
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.7 [ 24805 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.3 [ 22126 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.8 [ 26121 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.4 [ 22408 ]
            midenok Aleksey Midenkov made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            midenok Aleksey Midenkov made changes -
            Assignee Aleksey Midenkov [ midenok ] Nikita Malyavin [ nikitamalyavin ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            nikitamalyavin Nikita Malyavin made changes -
            Assignee Nikita Malyavin [ nikitamalyavin ] Aleksey Midenkov [ midenok ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            midenok Aleksey Midenkov made changes -
            Labels reviewed
            midenok Aleksey Midenkov made changes -
            Fix Version/s 10.5.27 [ 29902 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            JIraAutomate JiraAutomate made changes -
            Fix Version/s 10.6.20 [ 29903 ]
            Fix Version/s 10.11.10 [ 29904 ]
            Fix Version/s 11.2.6 [ 29906 ]
            Fix Version/s 11.4.4 [ 29907 ]

            People

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