Details
-
Bug
-
Status: Done
-
Medium
-
Resolution: Fixed
-
5.7.21-21, 5.6.41-84.1, 8.0.12-2rc1
-
None
Description
The rocksdb.index_merge_rocksdb2 MTR test inadvertently runs some of its queries against InnoDB tables rather than MyRocks. Which results from a combination of 2 things:
- the way the test is implemented by Facebook is setting the engine_type variable, then including a number of include/index_merge*.inc files. All of which do "SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type" so that the specified engine is used when the tables are later created without an explicit storage engine specification;
- and then there are Percona-specific changes to those include/index_merge*.inc files introduced by https://github.com/percona/percona-server/commit/35afd73da3ca. Which restart the server at certain points in time, thus resetting the default storage engine set earlier by the test. Which also means all further tables in the test are created with the default-default storage engine, i.e. InnoDB.
Here's an easy way to verify. Apply the following patch and run ./mtr rocksdb.index_merge_rocksdb2 --big-test:
diff --git a/mysql-test/include/index_merge1.inc b/mysql-test/include/index_merge1.inc --- a/mysql-test/include/index_merge1.inc +++ b/mysql-test/include/index_merge1.inc @@ -648,6 +648,9 @@ while ($1) --enable_query_log +select @@session.default_storage_engine; +SHOW CREATE TABLE t1; + OPTIMIZE TABLE t1; select count(*) from t1;
This is what I see in the output on the latest Percona Server clone:
+select @@session.default_storage_engine; +@@session.default_storage_engine +InnoDB +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `cola` char(3) NOT NULL, + `colb` char(3) NOT NULL, + `filler` char(200) DEFAULT NULL, + KEY `cola` (`cola`), + KEY `colb` (`colb`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1
Attachments
Issue Links
- is triggering
-
PS-5024 query returns incorrect result for table with no PK and non-unique CHAR utf8mb4 SK
-
- Done
-