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

innodb.innodb_stats_del_mark test failure

Details

    Description

      10.2 at commit 96247be1a0dfa3035580b53b1c27a7247a410713

      15:27:44 + cmake /source -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_PROTOBUF=system -DWITH_NDB_JAVA=NO -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ '-DCMAKE_C_FLAGS_RELWITHDEBINFO=-O3 -g -mtune=native' '-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-O3 -g -mtune=native' '-DCMAKE_C_FLAGS=-O3 -g -mtune=native' '-DCMAKE_CXX_FLAGS=-O3 -g -mtune=native' -DWITH_SSL=system -DCMAKE_INSTALL_PREFIX=/mysql/mariadb-upstream-RelWithDebInfo-10.2 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 -DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 -DWITHOUT_TOKUDB_STORAGE_ENGINE=1
      15:27:44 -- Running cmake version 3.5.1
      15:27:44 -- The C compiler identification is GNU 5.4.0
      15:27:44 -- The CXX compiler identification is GNU 5.4.0
      15:27:44 -- Check for working C compiler: /usr/bin/gcc
      15:27:44 -- Check for working C compiler: /usr/bin/gcc -- works
      

      15:32:31 CURRENT_TEST: innodb.innodb_stats_del_mark
      15:32:31 --- /source/mysql-test/suite/innodb/r/innodb_stats_del_mark.result	2017-05-05 05:26:02.606491603 +0000
      15:32:31 +++ /source/mysql-test/suite/innodb/r/innodb_stats_del_mark.reject	2017-05-05 05:32:30.724783725 +0000
      15:32:31 @@ -37,9 +37,6 @@
      15:32:31  DELETE FROM t1;
      15:32:31  SELECT COUNT(*) FROM t1;
      15:32:31  connection default;
      15:32:31 -Test correctly estimates the number of rows as > 20000
      15:32:31 -even when in other uncommmited transaction
      15:32:31 -all rows have been deleted.
      15:32:31  connection con1;
      15:32:31  COUNT(*)
      15:32:31  0
      15:32:31 
      15:32:31 mysqltest: Result length mismatch
      15:32:31 
      

      Attachments

        Issue Links

          Activity

            The expected output is apparently missing because this condition is not satisfied:

            let $row_count= query_get_value(EXPLAIN SELECT * FROM t1 WHERE val=4, rows,1);
            if ($row_count > 20000)
            {
            --echo Test correctly estimates the number of rows as > 20000
            --echo even when in other uncommmited transaction
            --echo all rows have been deleted.
            }
            

            This condition was indeed failing already when the test was introduced by MDEV-11751. My bad.

            marko Marko Mäkelä added a comment - The expected output is apparently missing because this condition is not satisfied: let $row_count= query_get_value(EXPLAIN SELECT * FROM t1 WHERE val=4, rows,1); if ($row_count > 20000) { --echo Test correctly estimates the number of rows as > 20000 --echo even when in other uncommmited transaction --echo all rows have been deleted. } This condition was indeed failing already when the test was introduced by MDEV-11751 . My bad.

            For me, the estimated count of rows is 145 or 1, which is well below 20000.
            The test inserts 262144 rows into the table, apparently with a uniform distribution of keys, and about 1/20 or 13107 rows should match the condition.
            If I remove the preceding DELETE statement, then the rows estimated by EXPLAIN will be 260406 without a WHERE condition, or 22310 with the WHERE condition.
            This is suggesting a bad merge of the original MySQL 5.7 fix.
            Maybe we should do some further clean-up of the test, similar to what Oracle did in 3 follow-up commits.

            marko Marko Mäkelä added a comment - For me, the estimated count of rows is 145 or 1, which is well below 20000. The test inserts 262144 rows into the table, apparently with a uniform distribution of keys, and about 1/20 or 13107 rows should match the condition. If I remove the preceding DELETE statement, then the rows estimated by EXPLAIN will be 260406 without a WHERE condition, or 22310 with the WHERE condition. This is suggesting a bad merge of the original MySQL 5.7 fix . Maybe we should do some further clean-up of the test, similar to what Oracle did in 3 follow-up commits .

            There are a few extra parameters in MariaDB that the test should probably reset.

            SET GLOBAL innodb_stats_traditional=false;
            SET GLOBAL innodb_stats_modified_counter=1;
            

            I think that the Oracle bug fix is incomplete. I do not see anything that would schedule the statistics to be recalculated on rollback. I am working on a fix.

            marko Marko Mäkelä added a comment - There are a few extra parameters in MariaDB that the test should probably reset. SET GLOBAL innodb_stats_traditional=false; SET GLOBAL innodb_stats_modified_counter=1; I think that the Oracle bug fix is incomplete. I do not see anything that would schedule the statistics to be recalculated on rollback. I am working on a fix.
            marko Marko Mäkelä added a comment - bb-10.2-marko

            ok to push. In my opinion the rollback change can be also considered as a bug fix.

            jplindst Jan Lindström (Inactive) added a comment - ok to push. In my opinion the rollback change can be also considered as a bug fix.

            People

              marko Marko Mäkelä
              danblack Daniel Black
              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.