[MDEV-12698] innodb.innodb_stats_del_mark test failure Created: 2017-05-05  Updated: 2017-12-04  Resolved: 2017-05-22

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Tests
Affects Version/s: 10.2.6
Fix Version/s: 10.2.7

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
causes MDEV-13534 InnoDB STATS_PERSISTENT fails to igno... Closed
is caused by MDEV-11751 Merge new release of InnoDB MySQL 5.7... Closed
Relates
relates to MDEV-7069 Fix buildbot failures in main server ... Stalled

 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 



 Comments   
Comment by Marko Mäkelä [ 2017-05-15 ]

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.

Comment by Marko Mäkelä [ 2017-05-15 ]

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.

Comment by Marko Mäkelä [ 2017-05-15 ]

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.

Comment by Marko Mäkelä [ 2017-05-16 ]

bb-10.2-marko

Comment by Jan Lindström (Inactive) [ 2017-05-16 ]

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

Generated at Thu Feb 08 07:59:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.