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

ALTER TABLE ENGINE=s3 fails

    XMLWordPrintable

Details

    Description

      Notes:
      The easiest way to run tests with S3 locally is to use MinIO. You can find the tips in the description of MDEV-31031, or follow steps of mtr-s3 tests from buildbot logs (which should be more or less the same). Alternatively, you can try to use the instruction from the KB, but it's possible that it's no longer applicable if the currently available MinIO version changed too much. The buildbot uses an old MinIO release.

      Once you have started MinIO, you can put the testcase under suite/s3 and run it normally as ./mtr s3.testname.

      --source include/have_s3.inc
      --source include/have_debug_sync.inc
       
      drop table if exists t;
      create table t (a int) engine=Aria;
      insert into t values (1),(2);
       
      --send set debug_sync= 'now wait_for go_dml'
       
      --connect (con1,localhost,root,,)
      set debug_sync= 'alter_table_online_progress signal go_dml wait_for go_alter';
      --send alter table t engine=S3
       
      --connection default
      --reap
      update t set a = 11 where a = 1;
      set debug_sync= 'now signal go_alter';
       
      --connection con1
      --reap
      select * from t;
      show create table t;
       
      # Cleanup
      --disconnect con1
      --connection default
      drop table t;
      set debug_sync= reset;
      

      bb-11.2-oalter 23ae9f1b2c69abc454484410a7ac3959cead0605

      At line 20: query 'reap' failed: ER_OPEN_AS_READONLY (1036): Table 't' is read only
      

      This error normally happens upon DML on a table which is already S3.
      If we follow the logic that concurrent online alter should work as if ALTER was executed after DML, then we shouldn't have the error, since DML is executed on the table while it's still Aria, and then Aria table is converted into S3 – both are permitted operations.

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              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.