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

Compressed table remains accessible without provider after unclean restart

    XMLWordPrintable

Details

    Description

      It isn't clear yet whether this can cause a real problem, but it appears somewhat unexpected and vaguely disturbing in the context of provider plugins, so I think at least it is worth thinking what possible side effects it may have.

      The test case is derived from plugins.compression, with only important difference that it sets shutdown_timeout to zero, thus disallowing the server to shut down normally.

      Then, even though after the server is restarted without the provider at all, SELECT from the compressed table succeeds instead of failing with ER_NO_SUCH_TABLE_IN_ENGINE.

      --source include/have_innodb.inc
       
      let $restart_parameters = --plugin-load-add=provider_snappy;
      source include/restart_mysqld.inc;
       
      set global innodb_compression_algorithm = snappy;
      create table t1 (a int, b text) engine=InnoDB page_compressed=1;
       
      insert t1 (a, b) values (0, repeat("abc", 100));
       
      let $restart_parameters =;
      --let $shutdown_timeout= 0
      source include/restart_mysqld.inc;
       
      #error ER_NO_SUCH_TABLE_IN_ENGINE;
      select a, left(b, 9), length(b) from t1;
       
      drop table t1;
      

      preview-10.7-MDEV-12933-provider-plugins 67a8fca9b

      # restart
      select a, left(b, 9), length(b) from t1;
      a	left(b, 9)	length(b)
      0	abcabcabc	300
      drop table t1;
      bug.t 'innodb'                           [ pass ]   2017
      ***Warnings generated in error logs during shutdown after running tests: bug.t
       
      2021-10-04 21:46:14 0 [Warning] InnoDB: Page compression errors: 3
      

      The warning on shutdown also hints that something has gone not quite as expected.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              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.