summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-12-10 12:29:14 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2021-12-10 12:29:14 +0200
commit978116d99125d6577b5333457585a4c6d0678427 (patch)
tree750abf0b540da6101eff89d4be4fffda528a4a09
parentc88e37ff857a83387c4d86829fbaf2e277e4cf9f (diff)
parent28b27b96d0d549378f815a05294797279aab7ec8 (diff)
downloadmariadb-git-978116d99125d6577b5333457585a4c6d0678427.tar.gz
Merge 10.7 into 10.8
-rw-r--r--cmake/FindLZ4.cmake12
-rw-r--r--cmake/Internal/CPack/CPackRPM.cmake3
-rw-r--r--cmake/build_configurations/mysql_release.cmake4
-rw-r--r--mysql-test/main/range.result24
-rw-r--r--mysql-test/main/range.test24
-rw-r--r--mysql-test/main/range_mrr_icp.result24
-rwxr-xr-xmysql-test/mariadb-test-run.pl2
-rw-r--r--mysql-test/suite/innodb/t/alter_kill.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-index.test1
-rw-r--r--mysql-test/suite/innodb/t/log_file_name.test1
-rw-r--r--mysql-test/suite/perfschema/r/digest_view.result144
-rw-r--r--mysql-test/suite/perfschema/t/digest_view.test76
-rw-r--r--plugin/provider_bzip2/CMakeLists.txt3
-rw-r--r--plugin/provider_lz4/CMakeLists.txt5
-rw-r--r--plugin/provider_lzma/CMakeLists.txt3
-rw-r--r--plugin/provider_lzo/CMakeLists.txt3
-rw-r--r--plugin/provider_snappy/CMakeLists.txt3
-rw-r--r--sql/sql_select.cc7
-rw-r--r--storage/columnstore/CMakeLists.txt2
-rw-r--r--storage/innobase/dict/dict0load.cc6
-rw-r--r--storage/innobase/include/log0log.h20
-rw-r--r--storage/innobase/include/log0recv.h4
-rw-r--r--storage/innobase/log/log0log.cc101
-rw-r--r--storage/innobase/log/log0recv.cc414
-rw-r--r--storage/maria/CMakeLists.txt3
-rw-r--r--storage/mroonga/vendor/groonga/CMakeLists.txt4
-rw-r--r--storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt4
-rw-r--r--unittest/mysys/thr_template.c2
28 files changed, 634 insertions, 266 deletions
diff --git a/cmake/FindLZ4.cmake b/cmake/FindLZ4.cmake
index 48a7790afcd..eebd85969e3 100644
--- a/cmake/FindLZ4.cmake
+++ b/cmake/FindLZ4.cmake
@@ -1,9 +1,17 @@
find_path(LZ4_INCLUDE_DIRS NAMES lz4.h)
find_library(LZ4_LIBRARIES NAMES lz4)
+if(LZ4_INCLUDE_DIRS AND EXISTS "${LZ4_INCLUDE_DIRS}/lz4.h")
+ file(STRINGS "${LZ4_INCLUDE_DIRS}/lz4.h" LZ4_H REGEX "^#define LZ4_VERSION_[MR]")
+ string(REGEX REPLACE "LZ4_VERSION" "" LZ4_H "${LZ4_H}")
+ string(REGEX MATCHALL "[0-9]+" LZ4_H "${LZ4_H}")
+ string(REGEX REPLACE ";" "." LZ4_VERSION_STRING "${LZ4_H}")
+endif()
+
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
- LZ4 DEFAULT_MSG
- LZ4_LIBRARIES LZ4_INCLUDE_DIRS)
+ LZ4
+ REQUIRED_VARS LZ4_LIBRARIES LZ4_INCLUDE_DIRS
+ VERSION_VAR LZ4_VERSION_STRING)
mark_as_advanced(LZ4_INCLUDE_DIRS LZ4_LIBRARIES)
diff --git a/cmake/Internal/CPack/CPackRPM.cmake b/cmake/Internal/CPack/CPackRPM.cmake
index 1ca95670cfb..cd1d3e22a52 100644
--- a/cmake/Internal/CPack/CPackRPM.cmake
+++ b/cmake/Internal/CPack/CPackRPM.cmake
@@ -23,7 +23,8 @@ macro(restore WHAT)
endmacro()
foreach (WHAT SUMMARY DESCRIPTION)
- if(NOT CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${WHAT})
+ if(CPACK_RPM_PACKAGE_COMPONENT AND
+ NOT CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${WHAT})
message(FATAL_ERROR "CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${WHAT} is not defined")
endif()
endforeach()
diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake
index b9728ca1ab9..531352d0338 100644
--- a/cmake/build_configurations/mysql_release.cmake
+++ b/cmake/build_configurations/mysql_release.cmake
@@ -105,8 +105,7 @@ ELSEIF(RPM)
SET(SEMODULE_PACKAGE /usr/bin/semodule_package CACHE FILEPATH "")
SET(PLUGIN_AUTH_SOCKET YES CACHE STRING "")
SET(WITH_EMBEDDED_SERVER ON CACHE BOOL "")
- # not yet, SLES 12.3 doesn't provide pcre2
- #SET(WITH_PCRE system CACHE STRING "")
+ SET(WITH_PCRE system CACHE STRING "")
IF(RPM MATCHES "fedora|centos|rhel")
SET(WITH_ROCKSDB_BZip2 OFF CACHE STRING "")
ENDIF()
@@ -129,7 +128,6 @@ ELSE()
SET(WITH_JEMALLOC static CACHE STRING "")
SET(PLUGIN_AUTH_SOCKET STATIC CACHE STRING "")
SET(WITH_STRIPPED_CLIENT ON CACHE BOOL "Strip all client binaries")
- SET(WITH_PCRE bundled CACHE STRING "")
SET(WITH_ROCKSDB_BZip2 OFF CACHE STRING "")
SET(WITH_ROCKSDB_LZ4 OFF CACHE STRING "")
ENDIF()
diff --git a/mysql-test/main/range.result b/mysql-test/main/range.result
index 72f6ffd4b90..11bf47f4500 100644
--- a/mysql-test/main/range.result
+++ b/mysql-test/main/range.result
@@ -3342,6 +3342,30 @@ pk i v a b
2 2 4 2 4
drop table t1, t2;
#
+# MDEV-26553: Always FALSE/NULL disjunct on top level of WHERE is removed
+#
+create table t1 (a int, b int, index idx(a,b));
+insert into t1 values (1,1), (1,2), (2,1), (2,2), (3,3);
+create table t2 (c int);
+insert into t2 values (5), (2), (3), (4);
+select 1 from t1 s1
+where 1 not in (select 1 from t1
+where ((a = 1 or a = 2) and b = 1) or (b > 5 and b < 1));
+1
+select 1 from t1 s1
+where 1 not in (select 1 from t1
+where ((a = 1 or a = 2) and b = 1) or b = NULL);
+1
+select c from t2
+where 2 not in (select 1 from t1
+where ((a=1 or a=2) and b = 1) or (b > 5 and b < 1));
+c
+5
+2
+3
+4
+drop table t1,t2;
+#
# End of 10.2 tests
#
#
diff --git a/mysql-test/main/range.test b/mysql-test/main/range.test
index 6d43ad9090d..6a2e318e732 100644
--- a/mysql-test/main/range.test
+++ b/mysql-test/main/range.test
@@ -2240,6 +2240,30 @@ select * from t1 inner join t2 on ( t2.b = t1.v or t2.a = t1.pk);
drop table t1, t2;
--echo #
+--echo # MDEV-26553: Always FALSE/NULL disjunct on top level of WHERE is removed
+--echo #
+
+create table t1 (a int, b int, index idx(a,b));
+insert into t1 values (1,1), (1,2), (2,1), (2,2), (3,3);
+
+create table t2 (c int);
+insert into t2 values (5), (2), (3), (4);
+
+select 1 from t1 s1
+ where 1 not in (select 1 from t1
+ where ((a = 1 or a = 2) and b = 1) or (b > 5 and b < 1));
+
+select 1 from t1 s1
+ where 1 not in (select 1 from t1
+ where ((a = 1 or a = 2) and b = 1) or b = NULL);
+
+select c from t2
+ where 2 not in (select 1 from t1
+ where ((a=1 or a=2) and b = 1) or (b > 5 and b < 1));
+
+drop table t1,t2;
+
+--echo #
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/main/range_mrr_icp.result b/mysql-test/main/range_mrr_icp.result
index 39d1d8c66af..6da0fc9bd68 100644
--- a/mysql-test/main/range_mrr_icp.result
+++ b/mysql-test/main/range_mrr_icp.result
@@ -3331,6 +3331,30 @@ pk i v a b
2 2 4 2 4
drop table t1, t2;
#
+# MDEV-26553: Always FALSE/NULL disjunct on top level of WHERE is removed
+#
+create table t1 (a int, b int, index idx(a,b));
+insert into t1 values (1,1), (1,2), (2,1), (2,2), (3,3);
+create table t2 (c int);
+insert into t2 values (5), (2), (3), (4);
+select 1 from t1 s1
+where 1 not in (select 1 from t1
+where ((a = 1 or a = 2) and b = 1) or (b > 5 and b < 1));
+1
+select 1 from t1 s1
+where 1 not in (select 1 from t1
+where ((a = 1 or a = 2) and b = 1) or b = NULL);
+1
+select c from t2
+where 2 not in (select 1 from t1
+where ((a=1 or a=2) and b = 1) or (b > 5 and b < 1));
+c
+5
+2
+3
+4
+drop table t1,t2;
+#
# End of 10.2 tests
#
#
diff --git a/mysql-test/mariadb-test-run.pl b/mysql-test/mariadb-test-run.pl
index 1a2c1cb1094..bf2d6e9be00 100755
--- a/mysql-test/mariadb-test-run.pl
+++ b/mysql-test/mariadb-test-run.pl
@@ -5084,7 +5084,7 @@ sub mysqld_start ($$) {
$mysqld->{'started_opts'}= $extra_opts;
my $expect_file= "$opt_vardir/tmp/".$mysqld->name().".expect";
- my $rc= $oldexe eq $exe ||
+ my $rc= $oldexe eq ($exe || '') ||
sleep_until_file_created($mysqld->value('pid-file'), $expect_file,
$opt_start_timeout, $mysqld->{'proc'}, $warn_seconds);
if (!$rc)
diff --git a/mysql-test/suite/innodb/t/alter_kill.test b/mysql-test/suite/innodb/t/alter_kill.test
index 49aff22c89a..277d9b4e71b 100644
--- a/mysql-test/suite/innodb/t/alter_kill.test
+++ b/mysql-test/suite/innodb/t/alter_kill.test
@@ -15,7 +15,6 @@ call mtr.add_suppression("InnoDB: Operating system error.*in a file operation");
call mtr.add_suppression("InnoDB: \(The error means\|If you are\)");
call mtr.add_suppression("InnoDB: Ignoring tablespace `test/bug16720368` because it could not be opened");
call mtr.add_suppression("InnoDB: Tablespace .* was not found at.*bug16735660");
-call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace.");
call mtr.add_suppression("InnoDB: Plugin initialization aborted*");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test
index 1bc0bcf9690..c7aa6250da5 100644
--- a/mysql-test/suite/innodb/t/innodb-index.test
+++ b/mysql-test/suite/innodb/t/innodb-index.test
@@ -1196,7 +1196,6 @@ DROP TABLE t;
--disable_query_log
call mtr.add_suppression("InnoDB: Tablespace .* was not found at .*t[12].ibd.");
-call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace");
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
diff --git a/mysql-test/suite/innodb/t/log_file_name.test b/mysql-test/suite/innodb/t/log_file_name.test
index 2a7ed7b494d..895e945f4e3 100644
--- a/mysql-test/suite/innodb/t/log_file_name.test
+++ b/mysql-test/suite/innodb/t/log_file_name.test
@@ -152,7 +152,6 @@ call mtr.add_suppression("InnoDB: The file '.*t0\.ibd' already exists");
call mtr.add_suppression("InnoDB: Cannot open datafile for read-write: '.*t2\.ibd'");
# The following are for aborted startup without --innodb-force-recovery:
call mtr.add_suppression("InnoDB: Tablespace .* was not found at .*test");
-call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace");
call mtr.add_suppression("InnoDB: Cannot read first page of '.*test.[tu]2.ibd': I/O error");
call mtr.add_suppression("InnoDB: Cannot apply log to \\[page id: space=[1-9][0-9]*, page number=3\\] of corrupted file './test/t2\\.ibd'");
call mtr.add_suppression("InnoDB: Datafile '.*test.*ibd' is corrupted");
diff --git a/mysql-test/suite/perfschema/r/digest_view.result b/mysql-test/suite/perfschema/r/digest_view.result
new file mode 100644
index 00000000000..43a8bdb1577
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/digest_view.result
@@ -0,0 +1,144 @@
+CREATE TABLE test.v1 (a int, b int);
+INSERT INTO test.v1 VALUES (1, 100), (2, 200), (3, 300);
+CREATE TABLE test.t1 (a int, b int);
+INSERT INTO test.t1 VALUES (1, 100), (2, 200), (3, 300);
+TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
+EXPLAIN EXTENDED SELECT * from test.v1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE v1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`v1`.`a` AS `a`,`test`.`v1`.`b` AS `b` from `test`.`v1`
+EXPLAIN EXTENDED SELECT * from test.v1 where a = 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE v1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`v1`.`a` AS `a`,`test`.`v1`.`b` AS `b` from `test`.`v1` where `test`.`v1`.`a` = 1
+EXPLAIN EXTENDED SELECT * from test.v1 where b > 100;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE v1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`v1`.`a` AS `a`,`test`.`v1`.`b` AS `b` from `test`.`v1` where `test`.`v1`.`b` > 100
+EXPLAIN EXTENDED SELECT a, b from test.v1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE v1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`v1`.`a` AS `a`,`test`.`v1`.`b` AS `b` from `test`.`v1`
+EXPLAIN EXTENDED SELECT b, a from test.v1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE v1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`v1`.`b` AS `b`,`test`.`v1`.`a` AS `a` from `test`.`v1`
+SELECT * from test.v1;
+a b
+1 100
+2 200
+3 300
+SELECT * from test.v1 where a = 1;
+a b
+1 100
+SELECT * from test.v1 where b > 100;
+a b
+2 200
+3 300
+SELECT a, b from test.v1;
+a b
+1 100
+2 200
+3 300
+SELECT b, a from test.v1;
+b a
+100 1
+200 2
+300 3
+#
+# DIGESTS SEEN ON TABLE
+#
+SELECT SCHEMA_NAME, DIGEST_TEXT, COUNT_STAR
+FROM performance_schema.events_statements_summary_by_digest
+ORDER BY DIGEST_TEXT;
+SCHEMA_NAME DIGEST_TEXT COUNT_STAR
+test EXPLAIN EXTENDED SELECT * FROM `test` . `v1` 1
+test EXPLAIN EXTENDED SELECT * FROM `test` . `v1` WHERE `a` = ? 1
+test EXPLAIN EXTENDED SELECT * FROM `test` . `v1` WHERE `b` > ? 1
+test EXPLAIN EXTENDED SELECT `a` , `b` FROM `test` . `v1` 1
+test EXPLAIN EXTENDED SELECT `b` , `a` FROM `test` . `v1` 1
+test SELECT * FROM `test` . `v1` 1
+test SELECT * FROM `test` . `v1` WHERE `a` = ? 1
+test SELECT * FROM `test` . `v1` WHERE `b` > ? 1
+test SELECT `a` , `b` FROM `test` . `v1` 1
+test SELECT `b` , `a` FROM `test` . `v1` 1
+test SHOW WARNINGS 5
+test TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1
+DROP TABLE test.v1;
+CREATE VIEW test.v1 AS SELECT * FROM test.t1;
+EXPLAIN EXTENDED SELECT * from test.v1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`
+EXPLAIN EXTENDED SELECT * from test.v1 where a = 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`a` = 1
+EXPLAIN EXTENDED SELECT * from test.v1 where b > 100;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`b` > 100
+EXPLAIN EXTENDED SELECT a, b from test.v1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`
+EXPLAIN EXTENDED SELECT b, a from test.v1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t1`.`a` AS `a` from `test`.`t1`
+SELECT * from test.v1;
+a b
+1 100
+2 200
+3 300
+SELECT * from test.v1 where a = 1;
+a b
+1 100
+SELECT * from test.v1 where b > 100;
+a b
+2 200
+3 300
+SELECT a, b from test.v1;
+a b
+1 100
+2 200
+3 300
+SELECT b, a from test.v1;
+b a
+100 1
+200 2
+300 3
+#
+# DIGESTS SEEN ON VIEW
+#
+SELECT SCHEMA_NAME, DIGEST_TEXT, COUNT_STAR
+FROM performance_schema.events_statements_summary_by_digest
+ORDER BY DIGEST_TEXT;
+SCHEMA_NAME DIGEST_TEXT COUNT_STAR
+test CREATE VIEW `test` . `v1` AS SELECT * FROM `test` . `t1` 1
+test DROP TABLE `test` . `v1` 1
+test EXPLAIN EXTENDED SELECT * FROM `test` . `v1` 2
+test EXPLAIN EXTENDED SELECT * FROM `test` . `v1` WHERE `a` = ? 2
+test EXPLAIN EXTENDED SELECT * FROM `test` . `v1` WHERE `b` > ? 2
+test EXPLAIN EXTENDED SELECT `a` , `b` FROM `test` . `v1` 2
+test EXPLAIN EXTENDED SELECT `b` , `a` FROM `test` . `v1` 2
+test SELECT * FROM `test` . `v1` 2
+test SELECT * FROM `test` . `v1` WHERE `a` = ? 2
+test SELECT * FROM `test` . `v1` WHERE `b` > ? 2
+test SELECT SCHEMA_NAME , `DIGEST_TEXT` , `COUNT_STAR` FROM `performance_schema` . `events_statements_summary_by_digest` ORDER BY `DIGEST_TEXT` 1
+test SELECT `a` , `b` FROM `test` . `v1` 2
+test SELECT `b` , `a` FROM `test` . `v1` 2
+test SHOW WARNINGS 10
+test TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1
+DROP VIEW test.v1;
+DROP TABLE test.t1;
diff --git a/mysql-test/suite/perfschema/t/digest_view.test b/mysql-test/suite/perfschema/t/digest_view.test
new file mode 100644
index 00000000000..462d60556eb
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/digest_view.test
@@ -0,0 +1,76 @@
+# ----------------------------------------------------
+# Tests for the performance schema statement Digests.
+# ----------------------------------------------------
+
+# Test case to show behavior of statements digest when
+# using a view
+
+# Test requires: sp-protocol/ps-protocol/view-protocol/cursor-protocol disabled
+--source include/no_protocol.inc
+--source include/not_embedded.inc
+
+CREATE TABLE test.v1 (a int, b int);
+INSERT INTO test.v1 VALUES (1, 100), (2, 200), (3, 300);
+
+CREATE TABLE test.t1 (a int, b int);
+INSERT INTO test.t1 VALUES (1, 100), (2, 200), (3, 300);
+
+
+TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
+
+#
+# test.v1 is a table.
+# Every query here is different, and should have a different digest.
+#
+
+EXPLAIN EXTENDED SELECT * from test.v1;
+EXPLAIN EXTENDED SELECT * from test.v1 where a = 1;
+EXPLAIN EXTENDED SELECT * from test.v1 where b > 100;
+EXPLAIN EXTENDED SELECT a, b from test.v1;
+EXPLAIN EXTENDED SELECT b, a from test.v1;
+
+SELECT * from test.v1;
+SELECT * from test.v1 where a = 1;
+SELECT * from test.v1 where b > 100;
+SELECT a, b from test.v1;
+SELECT b, a from test.v1;
+
+--echo #
+--echo # DIGESTS SEEN ON TABLE
+--echo #
+
+SELECT SCHEMA_NAME, DIGEST_TEXT, COUNT_STAR
+ FROM performance_schema.events_statements_summary_by_digest
+ ORDER BY DIGEST_TEXT;
+
+DROP TABLE test.v1;
+CREATE VIEW test.v1 AS SELECT * FROM test.t1;
+
+#
+# test.v1 is now a view.
+# the query digests should be unchanged.
+#
+
+EXPLAIN EXTENDED SELECT * from test.v1;
+EXPLAIN EXTENDED SELECT * from test.v1 where a = 1;
+EXPLAIN EXTENDED SELECT * from test.v1 where b > 100;
+EXPLAIN EXTENDED SELECT a, b from test.v1;
+EXPLAIN EXTENDED SELECT b, a from test.v1;
+
+SELECT * from test.v1;
+SELECT * from test.v1 where a = 1;
+SELECT * from test.v1 where b > 100;
+SELECT a, b from test.v1;
+SELECT b, a from test.v1;
+
+--echo #
+--echo # DIGESTS SEEN ON VIEW
+--echo #
+
+SELECT SCHEMA_NAME, DIGEST_TEXT, COUNT_STAR
+ FROM performance_schema.events_statements_summary_by_digest
+ ORDER BY DIGEST_TEXT;
+
+DROP VIEW test.v1;
+DROP TABLE test.t1;
+
diff --git a/plugin/provider_bzip2/CMakeLists.txt b/plugin/provider_bzip2/CMakeLists.txt
index bb14f64f87a..e2ac4592b1b 100644
--- a/plugin/provider_bzip2/CMakeLists.txt
+++ b/plugin/provider_bzip2/CMakeLists.txt
@@ -1,5 +1,8 @@
FIND_PACKAGE(BZip2)
+SET(CPACK_RPM_provider-bzip2_PACKAGE_SUMMARY "BZip2 compression support in the server and storage engines" PARENT_SCOPE)
+SET(CPACK_RPM_provider-bzip2_PACKAGE_DESCRIPTION "BZip2 compression support in the server and storage engines" PARENT_SCOPE)
+
IF (BZIP2_FOUND)
GET_PROPERTY(dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
LIST(REMOVE_ITEM dirs ${CMAKE_SOURCE_DIR}/include/providers)
diff --git a/plugin/provider_lz4/CMakeLists.txt b/plugin/provider_lz4/CMakeLists.txt
index 9d47ab80602..daad63ac6da 100644
--- a/plugin/provider_lz4/CMakeLists.txt
+++ b/plugin/provider_lz4/CMakeLists.txt
@@ -1,4 +1,7 @@
-FIND_PACKAGE(LZ4)
+FIND_PACKAGE(LZ4 1.6)
+
+SET(CPACK_RPM_provider-lz4_PACKAGE_SUMMARY "LZ4 compression support in the server and storage engines" PARENT_SCOPE)
+SET(CPACK_RPM_provider-lz4_PACKAGE_DESCRIPTION "LZ4 compression support in the server and storage engines" PARENT_SCOPE)
IF (LZ4_FOUND)
GET_PROPERTY(dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
diff --git a/plugin/provider_lzma/CMakeLists.txt b/plugin/provider_lzma/CMakeLists.txt
index 569038f7f45..8b0781aaa33 100644
--- a/plugin/provider_lzma/CMakeLists.txt
+++ b/plugin/provider_lzma/CMakeLists.txt
@@ -1,5 +1,8 @@
FIND_PACKAGE(LibLZMA)
+SET(CPACK_RPM_provider-lzma_PACKAGE_SUMMARY "LZMA compression support in the server and storage engines" PARENT_SCOPE)
+SET(CPACK_RPM_provider-lzma_PACKAGE_DESCRIPTION "LZMA compression support in the server and storage engines" PARENT_SCOPE)
+
IF (LIBLZMA_FOUND)
GET_PROPERTY(dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
LIST(REMOVE_ITEM dirs ${CMAKE_SOURCE_DIR}/include/providers)
diff --git a/plugin/provider_lzo/CMakeLists.txt b/plugin/provider_lzo/CMakeLists.txt
index f9104b54f9d..8a8d31d238a 100644
--- a/plugin/provider_lzo/CMakeLists.txt
+++ b/plugin/provider_lzo/CMakeLists.txt
@@ -1,5 +1,8 @@
FIND_PACKAGE(LZO)
+SET(CPACK_RPM_provider-lzo_PACKAGE_SUMMARY "LZO compression support in the server and storage engines" PARENT_SCOPE)
+SET(CPACK_RPM_provider-lzo_PACKAGE_DESCRIPTION "LZO compression support in the server and storage engines" PARENT_SCOPE)
+
IF (LZO_FOUND)
GET_PROPERTY(dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
LIST(REMOVE_ITEM dirs ${CMAKE_SOURCE_DIR}/include/providers)
diff --git a/plugin/provider_snappy/CMakeLists.txt b/plugin/provider_snappy/CMakeLists.txt
index af91a90138a..d963029d75c 100644
--- a/plugin/provider_snappy/CMakeLists.txt
+++ b/plugin/provider_snappy/CMakeLists.txt
@@ -1,5 +1,8 @@
FIND_PACKAGE(Snappy)
+SET(CPACK_RPM_provider-snappy_PACKAGE_SUMMARY "Snappy compression support in the server and storage engines" PARENT_SCOPE)
+SET(CPACK_RPM_provider-snappy_PACKAGE_DESCRIPTION "Snappy compression support in the server and storage engines" PARENT_SCOPE)
+
IF (SNAPPY_FOUND)
GET_PROPERTY(dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
LIST(REMOVE_ITEM dirs ${CMAKE_SOURCE_DIR}/include/providers)
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 2830e65a49e..b08f2dd2545 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -5753,6 +5753,7 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
if (!s->const_keys.is_clear_all())
{
sargable_cond= get_sargable_cond(join, s->table);
+ bool is_sargable_cond_of_where= sargable_cond == &join->conds;
select= make_select(s->table, found_const_table_map,
found_const_table_map,
@@ -5769,6 +5770,12 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
*/
*sargable_cond= select->cond;
+ if (is_sargable_cond_of_where &&
+ join->conds && join->conds->type() == Item::COND_ITEM &&
+ ((Item_cond*) (join->conds))->functype() ==
+ Item_func::COND_AND_FUNC)
+ join->cond_equal= &((Item_cond_and*) (join->conds))->m_cond_equal;
+
s->quick=select->quick;
s->needed_reg=select->needed_reg;
select->quick=0;
diff --git a/storage/columnstore/CMakeLists.txt b/storage/columnstore/CMakeLists.txt
index 8bfc7893cc7..6669862f038 100644
--- a/storage/columnstore/CMakeLists.txt
+++ b/storage/columnstore/CMakeLists.txt
@@ -31,6 +31,8 @@ CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
SET(CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/columnstore/build/postInstall_storage_engine.sh PARENT_SCOPE)
SET(CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/columnstore/build/preUn_storage_engine.sh PARENT_SCOPE)
APPEND_FOR_CPACK(CPACK_RPM_columnstore-engine_PACKAGE_VERSION "")
+ SET(CPACK_RPM_columnstore-engine_PACKAGE_SUMMARY "MariaDB ColumnStore storage engine" PARENT_SCOPE)
+ SET(CPACK_RPM_columnstore-engine_PACKAGE_DESCRIPTION "The MariaDB ColumnStore storage engine is a high-performance columnar analytical engine, aimed at rapid processing of analytical queries on very large amounts of data." PARENT_SCOPE)
ENDIF()
INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/columnstore")
ENDIF()
diff --git a/storage/innobase/dict/dict0load.cc b/storage/innobase/dict/dict0load.cc
index 6694648bc5b..20ab06c8461 100644
--- a/storage/innobase/dict/dict0load.cc
+++ b/storage/innobase/dict/dict0load.cc
@@ -767,7 +767,7 @@ dict_sys_tables_rec_read(
" data dictionary contains invalid flags."
" SYS_TABLES.TYPE=" UINT32PF
" SYS_TABLES.N_COLS=" UINT32PF,
- name.size(), name.data(), type, *n_cols);
+ int(name.size()), name.data(), type, *n_cols);
return(false);
}
@@ -792,7 +792,7 @@ dict_sys_tables_rec_read(
" contains invalid flags."
" SYS_TABLES.TYPE=" UINT32PF
" SYS_TABLES.MIX_LEN=" UINT32PF,
- name.size(), name.data(),
+ int(name.size()), name.data(),
type, *flags2);
return(false);
}
@@ -2246,7 +2246,7 @@ static dict_table_t *dict_load_table_one(const span<const char> &name,
DBUG_ENTER("dict_load_table_one");
DBUG_PRINT("dict_load_table_one",
- ("table: %.*s", name.size(), name.data()));
+ ("table: %.*s", int(name.size()), name.data()));
ut_ad(dict_sys.locked());
diff --git a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h
index be28528adb0..76deace8fde 100644
--- a/storage/innobase/include/log0log.h
+++ b/storage/innobase/include/log0log.h
@@ -352,26 +352,6 @@ or the MySQL version that created the redo log file. */
header */
#define LOG_FILE_HDR_SIZE (4 * OS_FILE_LOG_BLOCK_SIZE)
-/** Memory mapped file */
-class mapped_file_t
-{
-public:
- mapped_file_t()= default;
- mapped_file_t(const mapped_file_t &)= delete;
- mapped_file_t &operator=(const mapped_file_t &)= delete;
- mapped_file_t(mapped_file_t &&)= delete;
- mapped_file_t &operator=(mapped_file_t &&)= delete;
- ~mapped_file_t() noexcept;
-
- dberr_t map(const char *path, bool read_only= false,
- bool nvme= false) noexcept;
- dberr_t unmap() noexcept;
- byte *data() noexcept { return m_area.data(); }
-
-private:
- span<byte> m_area;
-};
-
/** Abstraction for reading, writing and flushing file cache to disk */
class file_io
{
diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h
index c1cc5ce1108..04b59f33f4e 100644
--- a/storage/innobase/include/log0recv.h
+++ b/storage/innobase/include/log0recv.h
@@ -336,12 +336,12 @@ public:
bool is_initialised() const { return last_stored_lsn != 0; }
/** Register a redo log snippet for a page.
- @param page_id page identifier
+ @param it page iterator
@param start_lsn start LSN of the mini-transaction
@param lsn @see mtr_t::commit_lsn()
@param l redo log snippet @see log_t::FORMAT_10_5
@param len length of l, in bytes */
- inline void add(const page_id_t page_id, lsn_t start_lsn, lsn_t lsn,
+ inline void add(map::iterator it, lsn_t start_lsn, lsn_t lsn,
const byte *l, size_t len);
/** Parse and register one mini-transaction in log_t::FORMAT_10_5.
diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc
index 0313c6e1df0..349ce4cd7d0 100644
--- a/storage/innobase/log/log0log.cc
+++ b/storage/innobase/log/log0log.cc
@@ -224,47 +224,6 @@ void log_t::create()
(aligned_malloc(OS_FILE_LOG_BLOCK_SIZE, OS_FILE_LOG_BLOCK_SIZE));
}
-mapped_file_t::~mapped_file_t() noexcept
-{
- if (!m_area.empty())
- unmap();
-}
-
-dberr_t mapped_file_t::map(const char *path, bool read_only,
- bool nvme) noexcept
-{
- auto fd= mysql_file_open(innodb_log_file_key, path,
- read_only ? O_RDONLY : O_RDWR, MYF(MY_WME));
- if (fd == -1)
- return DB_ERROR;
-
- const auto file_size= os_file_get_size(path).m_total_size;
-
- const int nvme_flag= nvme ? MAP_SYNC : 0;
- void *ptr= my_mmap(0, static_cast<size_t>(file_size),
- read_only ? PROT_READ : PROT_READ | PROT_WRITE,
- MAP_SHARED_VALIDATE | nvme_flag, fd, 0);
- mysql_file_close(fd, MYF(MY_WME));
-
- if (ptr == MAP_FAILED)
- return DB_ERROR;
-
- m_area= {static_cast<byte *>(ptr),
- static_cast<span<byte>::size_type>(file_size)};
- return DB_SUCCESS;
-}
-
-dberr_t mapped_file_t::unmap() noexcept
-{
- ut_ad(!m_area.empty());
-
- if (my_munmap(m_area.data(), m_area.size()))
- return DB_ERROR;
-
- m_area= {};
- return DB_SUCCESS;
-}
-
file_os_io::file_os_io(file_os_io &&rhs) : m_fd(rhs.m_fd)
{
rhs.m_fd= OS_FILE_CLOSED;
@@ -334,6 +293,66 @@ dberr_t file_os_io::flush() noexcept
#include <libpmem.h>
+/** Memory mapped file */
+class mapped_file_t
+{
+public:
+ mapped_file_t()= default;
+ mapped_file_t(const mapped_file_t &)= delete;
+ mapped_file_t &operator=(const mapped_file_t &)= delete;
+ mapped_file_t(mapped_file_t &&)= delete;
+ mapped_file_t &operator=(mapped_file_t &&)= delete;
+ ~mapped_file_t() noexcept;
+
+ dberr_t map(const char *path, bool read_only= false,
+ bool nvme= false) noexcept;
+ dberr_t unmap() noexcept;
+ byte *data() noexcept { return m_area.data(); }
+
+private:
+ span<byte> m_area;
+};
+
+mapped_file_t::~mapped_file_t() noexcept
+{
+ if (!m_area.empty())
+ unmap();
+}
+
+dberr_t mapped_file_t::map(const char *path, bool read_only,
+ bool nvme) noexcept
+{
+ auto fd= mysql_file_open(innodb_log_file_key, path,
+ read_only ? O_RDONLY : O_RDWR, MYF(MY_WME));
+ if (fd == -1)
+ return DB_ERROR;
+
+ const auto file_size= size_t{os_file_get_size(path).m_total_size};
+
+ const int nvme_flag= nvme ? MAP_SYNC : 0;
+ void *ptr=
+ my_mmap(0, file_size, read_only ? PROT_READ : PROT_READ | PROT_WRITE,
+ MAP_SHARED_VALIDATE | nvme_flag, fd, 0);
+ mysql_file_close(fd, MYF(MY_WME));
+
+ if (ptr == MAP_FAILED)
+ return DB_ERROR;
+
+ m_area= {static_cast<byte *>(ptr), file_size};
+ return DB_SUCCESS;
+}
+
+dberr_t mapped_file_t::unmap() noexcept
+{
+ ut_ad(!m_area.empty());
+
+ if (my_munmap(m_area.data(), m_area.size()))
+ return DB_ERROR;
+
+ m_area= {};
+ return DB_SUCCESS;
+}
+
static bool is_pmem(const char *path) noexcept
{
mapped_file_t mf;
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc
index c83848d02dd..6c4ad0d3c58 100644
--- a/storage/innobase/log/log0recv.cc
+++ b/storage/innobase/log/log0recv.cc
@@ -55,6 +55,7 @@ Created 9/20/1997 Heikki Tuuri
#include "srv0srv.h"
#include "srv0start.h"
#include "fil0pagecompress.h"
+#include "log.h"
/** Read-ahead area in applying log records to file pages */
#define RECV_READ_AHEAD_AREA 32U
@@ -311,7 +312,8 @@ public:
if (undo_append(block, ++l, --rlen) && !srv_force_recovery)
{
page_corrupted:
- ib::error() << "Set innodb_force_recovery=1 to ignore corruption.";
+ sql_print_error("InnoDB: Set innodb_force_recovery=1"
+ " to ignore corruption.");
recv_sys.set_corrupt_log();
return applied;
}
@@ -1147,10 +1149,15 @@ same_space:
f.name = fname.name;
f.status = file_name_t::NORMAL;
} else {
- ib::error() << "Tablespace " << space_id
- << " has been found in two places: '"
- << f.name << "' and '" << name << "'."
- " You must delete one of them.";
+ sql_print_error("InnoDB: Tablespace " UINT32PF
+ " has been found"
+ " in two places:"
+ " '%.*s' and '%s'."
+ " You must delete"
+ " one of them.",
+ space_id,
+ int(f.name.size()),
+ f.name.data(), name);
recv_sys.set_corrupt_fs();
}
break;
@@ -1173,10 +1180,12 @@ same_space:
Enable some more diagnostics when
forcing recovery. */
- ib::info()
- << "At LSN: " << recv_sys.recovered_lsn
- << ": unable to open file " << name
- << " for tablespace " << space_id;
+ sql_print_information(
+ "InnoDB: At LSN: " LSN_PF
+ ": unable to open file %s"
+ " for tablespace " UINT32PF,
+ recv_sys.recovered_lsn,
+ name, space_id);
}
break;
@@ -1192,34 +1201,39 @@ same_space:
case FIL_LOAD_INVALID:
ut_ad(space == NULL);
if (srv_force_recovery == 0) {
- ib::warn() << "We do not continue the crash"
+ sql_print_warning(
+ "InnoDB: We do not continue the crash"
" recovery, because the table may"
" become corrupt if we cannot apply"
" the log records in the InnoDB log to"
" it. To fix the problem and start"
- " mysqld:";
- ib::info() << "1) If there is a permission"
+ " mariadbd:");
+ sql_print_information(
+ "InnoDB: 1) If there is a permission"
" problem in the file and mysqld"
" cannot open the file, you should"
- " modify the permissions.";
- ib::info() << "2) If the tablespace is not"
+ " modify the permissions.");
+ sql_print_information(
+ "InnoDB: 2) If the tablespace is not"
" needed, or you can restore an older"
" version from a backup, then you can"
" remove the .ibd file, and use"
" --innodb_force_recovery=1 to force"
- " startup without this file.";
- ib::info() << "3) If the file system or the"
+ " startup without this file.");
+ sql_print_information(
+ "InnoDB: 3) If the file system or the"
" disk is broken, and you cannot"
" remove the .ibd file, you can set"
- " --innodb_force_recovery.";
+ " --innodb_force_recovery.");
recv_sys.set_corrupt_fs();
break;
}
- ib::info() << "innodb_force_recovery was set to "
- << srv_force_recovery << ". Continuing crash"
- " recovery even though we cannot access the"
- " files for tablespace " << space_id << ".";
+ sql_print_information(
+ "InnoDB: innodb_force_recovery was set to %lu."
+ " Continuing crash recovery even though"
+ " we cannot access the files for tablespace "
+ UINT32PF ".", srv_force_recovery, space_id);
break;
}
}
@@ -1494,10 +1508,11 @@ fail:
}
if (recv_sys.report(time(NULL))) {
- ib::info() << "Read redo log up to LSN=" << *start_lsn;
- service_manager_extend_timeout(INNODB_EXTEND_TIMEOUT_INTERVAL,
- "Read redo log up to LSN=" LSN_PF,
- *start_lsn);
+ sql_print_information("InnoDB: Read redo log up to LSN="
+ LSN_PF, *start_lsn);
+ service_manager_extend_timeout(
+ INNODB_EXTEND_TIMEOUT_INTERVAL,
+ "Read redo log up to LSN=" LSN_PF, *start_lsn);
}
if (*start_lsn != end_lsn) {
@@ -1568,9 +1583,9 @@ static bool redo_file_sizes_are_correct()
if (it == paths.end())
return true;
- ib::error() << "Log file " << *it << " is of different size "
- << get_size(*it) << " bytes than other log files " << size
- << " bytes!";
+ sql_print_error("InnoDB: Log file %.*s is of different size " UINT64PF
+ " bytes than other log files " UINT64PF " bytes!",
+ int(it->size()), it->data(), get_size(*it), size);
return false;
}
@@ -1637,7 +1652,7 @@ ATTRIBUTE_COLD static dberr_t recv_log_recover_pre_10_2()
if (!log_crypt_101_read_checkpoint(buf))
{
- ib::error() << "Decrypting checkpoint failed";
+ sql_print_error("InnoDB: Decrypting checkpoint failed");
continue;
}
@@ -1659,11 +1674,11 @@ ATTRIBUTE_COLD static dberr_t recv_log_recover_pre_10_2()
if (!lsn)
{
- ib::error() << "Upgrade after a crash is not supported."
- " This redo log was created before MariaDB 10.2.2,"
- " and we did not find a valid checkpoint."
- " Please follow the instructions at"
- " https://mariadb.com/kb/en/library/upgrading/";
+ sql_print_error("InnoDB: Upgrade after a crash is not supported."
+ " This redo log was created before MariaDB 10.2.2,"
+ " and we did not find a valid checkpoint."
+ " Please follow the instructions at"
+ " https://mariadb.com/kb/en/library/upgrading/");
return DB_ERROR;
}
@@ -1671,7 +1686,7 @@ ATTRIBUTE_COLD static dberr_t recv_log_recover_pre_10_2()
log_sys.set_flushed_lsn(lsn);
const lsn_t source_offset= log_sys.log.calc_lsn_offset_old(lsn);
- static constexpr char NO_UPGRADE_RECOVERY_MSG[]=
+ static const char NO_UPGRADE_RECOVERY_MSG[]=
"Upgrade after a crash is not supported."
" This redo log was created before MariaDB 10.2.2";
@@ -1680,7 +1695,8 @@ ATTRIBUTE_COLD static dberr_t recv_log_recover_pre_10_2()
if (log_block_calc_checksum_format_0(buf) != log_block_get_checksum(buf) &&
!log_crypt_101_read_block(buf, lsn))
{
- ib::error() << NO_UPGRADE_RECOVERY_MSG << ", and it appears corrupted.";
+ sql_print_error("InnoDB: %s, and it appears corrupted.",
+ NO_UPGRADE_RECOVERY_MSG);
return DB_CORRUPTION;
}
@@ -1697,10 +1713,10 @@ ATTRIBUTE_COLD static dberr_t recv_log_recover_pre_10_2()
}
if (buf[20 + 32 * 9] == 2)
- ib::error() << "Cannot decrypt log for upgrading."
- " The encrypted log was created before MariaDB 10.2.2.";
+ sql_print_error("InnoDB: Cannot decrypt log for upgrading."
+ " The encrypted log was created before MariaDB 10.2.2.");
else
- ib::error() << NO_UPGRADE_RECOVERY_MSG << ".";
+ sql_print_error("InnoDB: %s.", NO_UPGRADE_RECOVERY_MSG);
return DB_ERROR;
}
@@ -1746,13 +1762,11 @@ static dberr_t recv_log_recover_10_4()
ulint cksum = log_block_get_checksum(buf);
if (UNIV_UNLIKELY(crc != cksum)) {
- ib::error() << "Invalid log block checksum."
- << " block: "
- << log_block_get_hdr_no(buf)
- << " checkpoint no: "
- << log_block_get_checkpoint_no(buf)
- << " expected: " << crc
- << " found: " << cksum;
+ sql_print_error("InnoDB: Invalid log block checksum."
+ " block: " ULINTPF " checkpoint no: " ULINTPF
+ " expected: " ULINTPF " found: " ULINTPF,
+ log_block_get_hdr_no(buf),
+ log_block_get_checkpoint_no(buf), crc, cksum);
return DB_CORRUPTION;
}
@@ -1807,7 +1821,7 @@ recv_find_max_checkpoint(ulint* max_field)
: 0;
if (log_sys.log.format != log_t::FORMAT_3_23
&& !recv_check_log_header_checksum(buf)) {
- ib::error() << "Invalid redo log header checksum.";
+ sql_print_error("InnoDB: Invalid redo log header checksum.");
return(DB_CORRUPTION);
}
@@ -1830,8 +1844,8 @@ recv_find_max_checkpoint(ulint* max_field)
case log_t::FORMAT_10_5 | log_t::FORMAT_ENCRYPTED:
break;
default:
- ib::error() << "Unsupported redo log format."
- " The redo log was created with " << creator << ".";
+ sql_print_error("InnoDB: Unsupported redo log format."
+ " The redo log was created with %s.", creator);
return(DB_ERROR);
}
@@ -1854,8 +1868,8 @@ recv_find_max_checkpoint(ulint* max_field)
if (log_sys.is_encrypted()
&& !log_crypt_read_checkpoint_buf(buf)) {
- ib::error() << "Reading checkpoint"
- " encryption info failed.";
+ sql_print_error("InnoDB: Reading checkpoint"
+ " encryption info failed.");
continue;
}
@@ -1880,14 +1894,14 @@ recv_find_max_checkpoint(ulint* max_field)
if (*max_field == 0) {
/* Before 10.2.2, we could get here during database
- initialization if we created an LOG_FILE_NAME file that
+ initialization if we created an ib_logfile0 file that
was filled with zeroes, and were killed. After
10.2.2, we would reject such a file already earlier,
when checking the file header. */
- ib::error() << "No valid checkpoint found"
- " (corrupted redo log)."
- " You can try --innodb-force-recovery=6"
- " as a last resort.";
+ sql_print_error("InnoDB: No valid checkpoint found"
+ " (corrupted redo log)."
+ " You can try --innodb-force-recovery=6"
+ " as a last resort.");
return(DB_ERROR);
}
@@ -1897,11 +1911,12 @@ recv_find_max_checkpoint(ulint* max_field)
break;
default:
if (dberr_t err = recv_log_recover_10_4()) {
- ib::error()
- << "Upgrade after a crash is not supported."
- " The redo log was created with " << creator
- << (err == DB_ERROR
- ? "." : ", and it appears corrupted.");
+ sql_print_error("InnoDB: Upgrade after a crash"
+ " is not supported."
+ " The redo log was created with %s%s.",
+ creator,
+ (err == DB_ERROR
+ ? "" : ", and it appears corrupted"));
return err;
}
}
@@ -1971,20 +1986,17 @@ inline void page_recv_t::will_not_read()
/** Register a redo log snippet for a page.
-@param page_id page identifier
+@param it page iterator
@param start_lsn start LSN of the mini-transaction
@param lsn @see mtr_t::commit_lsn()
@param recs redo log snippet @see log_t::FORMAT_10_5
@param len length of l, in bytes */
-inline void recv_sys_t::add(const page_id_t page_id,
- lsn_t start_lsn, lsn_t lsn, const byte *l,
- size_t len)
+inline void recv_sys_t::add(map::iterator it, lsn_t start_lsn, lsn_t lsn,
+ const byte *l, size_t len)
{
mysql_mutex_assert_owner(&mutex);
- std::pair<map::iterator, bool> p= pages.emplace(map::value_type
- (page_id, page_recv_t()));
- page_recv_t& recs= p.first->second;
- ut_ad(p.second == recs.log.empty());
+ page_id_t page_id = it->first;
+ page_recv_t &recs= it->second;
switch (*l & 0x70) {
case FREE_PAGE: case INIT_PAGE:
@@ -2078,6 +2090,7 @@ bool recv_sys_t::parse(lsn_t checkpoint_lsn, store_t *store, bool apply)
loop:
const byte *const log= buf + recovered_offset;
const lsn_t start_lsn= recovered_lsn;
+ map::iterator cached_pages_it = pages.end();
/* Check that the entire mini-transaction is included within the buffer */
const byte *l;
@@ -2088,17 +2101,19 @@ loop:
goto eom_found;
if (UNIV_LIKELY((*l & 0x70) != RESERVED));
else if (srv_force_recovery)
- ib::warn() << "Ignoring unknown log record at LSN " << recovered_lsn;
+ sql_print_warning("InnoDB: Ignoring unknown log record at LSN " LSN_PF,
+ recovered_lsn);
else
{
malformed:
- ib::error() << "Malformed log record;"
- " set innodb_force_recovery=1 to ignore.";
+ sql_print_error("InnoDB: Malformed log record;"
+ " set innodb_force_recovery=1 to ignore.");
corrupted:
const size_t trailing_bytes= std::min<size_t>(100, size_t(end - l));
- ib::info() << "Dump from the start of the mini-transaction (LSN="
- << start_lsn << ") to "
- << trailing_bytes << " bytes after the record:";
+ sql_print_information("InnoDB: Dump from the start of the"
+ " mini-transaction (LSN=" LSN_PF ") to %zu"
+ " bytes after the record:",
+ start_lsn, trailing_bytes);
ut_print_buf(stderr, log, l - log + trailing_bytes);
putc('\n', stderr);
found_corrupt_log= true;
@@ -2115,7 +2130,7 @@ corrupted:
const uint32_t addlen= mlog_decode_varint(l);
if (UNIV_UNLIKELY(addlen == MLOG_DECODE_ERROR))
{
- ib::error() << "Corrupted record length";
+ sql_print_error("InnoDB: Corrupted record length");
goto corrupted;
}
rlen= addlen + 15;
@@ -2181,7 +2196,8 @@ record_corrupted:
/* FREE_PAGE,INIT_PAGE cannot be with same_page flag */
if (!srv_force_recovery)
goto malformed;
- ib::warn() << "Ignoring malformed log record at LSN " << recovered_lsn;
+ sql_print_warning("InnoDB: Ignoring malformed log record at LSN "
+ LSN_PF, recovered_lsn);
last_offset= 1; /* the next record must not be same_page */
continue;
}
@@ -2194,12 +2210,13 @@ record_corrupted:
page_id_corrupted:
if (!srv_force_recovery)
{
- ib::error() << "Corrupted page identifier at " << recovered_lsn
- << "; set innodb_force_recovery=1 to ignore the record.";
+ sql_print_error("InnoDB: Corrupted page identifier at " LSN_PF
+ "; set innodb_force_recovery=1 to ignore the record.",
+ recovered_lsn);
goto corrupted;
}
- ib::warn() << "Ignoring corrupted page identifier at LSN "
- << recovered_lsn;
+ sql_print_warning("InnoDB: Ignoring corrupted page identifier at LSN "
+ LSN_PF, recovered_lsn);
continue;
}
space_id= mlog_decode_varint(l);
@@ -2401,8 +2418,12 @@ same_page:
/* fall through */
case STORE_YES:
if (!mlog_init.will_avoid_read(id, start_lsn))
- add(id, start_lsn, end_lsn, recs,
+ {
+ if (cached_pages_it == pages.end() || cached_pages_it->first != id)
+ cached_pages_it= pages.emplace(id, page_recv_t()).first;
+ add(cached_pages_it, start_lsn, end_lsn, recs,
static_cast<size_t>(l + rlen - recs));
+ }
continue;
case STORE_NO:
if (!is_init)
@@ -2455,7 +2476,8 @@ same_page:
default:
if (!srv_force_recovery)
goto malformed;
- ib::warn() << "Ignoring malformed log record at LSN " << recovered_lsn;
+ sql_print_warning("InnoDB: Ignoring malformed log record at LSN "
+ LSN_PF, recovered_lsn);
continue;
case FILE_DELETE:
case FILE_MODIFY:
@@ -2465,13 +2487,13 @@ same_page:
file_rec_error:
if (!srv_force_recovery)
{
- ib::error() << "Corrupted file-level record;"
- " set innodb_force_recovery=1 to ignore.";
+ sql_print_error("InnoDB: Corrupted file-level record;"
+ " set innodb_force_recovery=1 to ignore.");
goto corrupted;
}
- ib::warn() << "Ignoring corrupted file-level record at LSN "
- << recovered_lsn;
+ sql_print_warning("InnoDB: Ignoring corrupted file-level record"
+ " at LSN " LSN_PF, recovered_lsn);
continue;
}
/* fall through */
@@ -2626,12 +2648,13 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr,
if (skipped_after_init) {
skipped_after_init = false;
ut_ad(end_lsn == page_lsn);
- if (end_lsn != page_lsn)
- ib::warn()
- << "The last skipped log record LSN "
- << end_lsn
- << " is not equal to page LSN "
- << page_lsn;
+ if (end_lsn != page_lsn) {
+ sql_print_warning(
+ "InnoDB: The last skipped log record"
+ " LSN " LSN_PF
+ " is not equal to page LSN " LSN_PF,
+ end_lsn, page_lsn);
+ }
}
end_lsn = l->lsn;
@@ -2761,10 +2784,12 @@ set_start_lsn:
ut_ad(!recv_sys.pages.empty());
if (recv_sys.report(now)) {
- const ulint n = recv_sys.pages.size();
- ib::info() << "To recover: " << n << " pages from log";
- service_manager_extend_timeout(
- INNODB_EXTEND_TIMEOUT_INTERVAL, "To recover: " ULINTPF " pages from log", n);
+ const size_t n = recv_sys.pages.size();
+ sql_print_information("InnoDB: To recover: %zu pages from log",
+ n);
+ service_manager_extend_timeout(INNODB_EXTEND_TIMEOUT_INTERVAL,
+ "To recover: %zu pages"
+ " from log", n);
}
}
@@ -3038,8 +3063,8 @@ void recv_sys_t::apply(bool last_batch)
const char *msg= last_batch
? "Starting final batch to recover "
: "Starting a batch to recover ";
- const ulint n= pages.size();
- ib::info() << msg << n << " pages from redo log.";
+ const size_t n= pages.size();
+ sql_print_information("InnoDB: %s %zu pages from redo log.", msg, n);
sd_notifyf(0, "STATUS=%s" ULINTPF " pages from redo log", msg, n);
apply_log_recs= true;
@@ -3168,7 +3193,8 @@ next_page:
continue;
}
if (is_corrupt_fs() && !srv_force_recovery)
- ib::info() << "Set innodb_force_recovery=1 to ignore corrupted pages.";
+ sql_print_information("InnoDB: Set innodb_force_recovery=1"
+ " to ignore corrupted pages.");
mysql_mutex_unlock(&mutex);
return;
}
@@ -3407,14 +3433,18 @@ static bool recv_scan_log_recs(
recv_needed_recovery = true;
if (srv_read_only_mode) {
- ib::warn() << "innodb_read_only"
- " prevents crash recovery";
+ sql_print_warning(
+ "InnoDB: innodb_read_only"
+ " prevents crash recovery");
return(true);
}
- ib::info() << "Starting crash recovery from"
- " checkpoint LSN=" << checkpoint_lsn
- << "," << recv_sys.scanned_lsn;
+ sql_print_information("InnoDB: Starting"
+ " crash recovery from"
+ " checkpoint LSN=" LSN_PF
+ "," LSN_PF,
+ checkpoint_lsn,
+ recv_sys.scanned_lsn);
}
/* We were able to find more log data: add it to the
@@ -3428,15 +3458,17 @@ static bool recv_scan_log_recs(
if (recv_sys.len + 4 * OS_FILE_LOG_BLOCK_SIZE
>= recv_parsing_buf_size) {
- ib::error() << "Log parsing buffer overflow."
- " Recovery may have failed!";
+ sql_print_error("InnoDB: Log parsing buffer"
+ " overflow."
+ " Recovery may have failed!");
recv_sys.set_corrupt_log();
if (!srv_force_recovery) {
- ib::error()
- << "Set innodb_force_recovery"
- " to ignore this error.";
+ sql_print_information(
+ "InnoDB: Set"
+ " innodb_force_recovery"
+ " to ignore this error.");
return(true);
}
} else if (!recv_sys.is_corrupt_log()) {
@@ -3583,29 +3615,38 @@ recv_init_missing_space(dberr_t err, const recv_spaces_t::const_iterator& i)
case SRV_OPERATION_RESTORE:
case SRV_OPERATION_RESTORE_EXPORT:
if (i->second.name.find("/#sql") != std::string::npos) {
- ib::warn() << "Tablespace " << i->first << " was not"
- " found at " << i->second.name << " when"
- " restoring a (partial?) backup. All redo log"
- " for this file will be ignored!";
+ sql_print_warning("InnoDB: Tablespace " UINT32PF
+ " was not found at %.*s when"
+ " restoring a (partial?) backup."
+ " All redo log"
+ " for this file will be ignored!",
+ i->first, int(i->second.name.size()),
+ i->second.name.data());
}
return(err);
}
if (srv_force_recovery == 0) {
- ib::error() << "Tablespace " << i->first << " was not"
- " found at " << i->second.name << ".";
+ sql_print_error("InnoDB: Tablespace " UINT32PF " was not"
+ " found at %.*s.", i->first,
+ int(i->second.name.size()),
+ i->second.name.data());
if (err == DB_SUCCESS) {
- ib::error() << "Set innodb_force_recovery=1 to"
+ sql_print_information(
+ "InnoDB: Set innodb_force_recovery=1 to"
" ignore this and to permanently lose"
- " all changes to the tablespace.";
+ " all changes to the tablespace.");
err = DB_TABLESPACE_NOT_FOUND;
}
} else {
- ib::warn() << "Tablespace " << i->first << " was not"
- " found at " << i->second.name << ", and"
- " innodb_force_recovery was set. All redo log"
- " for this tablespace will be ignored!";
+ sql_print_warning("InnoDB: Tablespace " UINT32PF
+ " was not found at %.*s"
+ ", and innodb_force_recovery was set."
+ " All redo log for this tablespace"
+ " will be ignored!",
+ i->first, int(i->second.name.size()),
+ i->second.name.data());
}
return(err);
@@ -3680,20 +3721,25 @@ func_exit:
missing_tablespace = true;
- if (srv_force_recovery > 0) {
- ib::warn() << "Tablespace " << rs.first
- <<" was not found at " << rs.second.name
- <<", and innodb_force_recovery was set."
- <<" All redo log for this tablespace"
- <<" will be ignored!";
+ if (srv_force_recovery) {
+ sql_print_warning("InnoDB: Tablespace " UINT32PF
+ " was not found at %.*s,"
+ " and innodb_force_recovery was set."
+ " All redo log for this tablespace"
+ " will be ignored!",
+ rs.first, int(rs.second.name.size()),
+ rs.second.name.data());
continue;
}
if (!rescan) {
- ib::info() << "Tablespace " << rs.first
- << " was not found at '"
- << rs.second.name << "', but there"
- <<" were no modifications either.";
+ sql_print_information("InnoDB: Tablespace " UINT32PF
+ " was not found at '%.*s',"
+ " but there were"
+ " no modifications either.",
+ rs.first,
+ int(rs.second.name.size()),
+ rs.second.name.data());
}
}
@@ -3742,9 +3788,10 @@ recv_init_crash_recovery_spaces(bool rescan, bool& missing_tablespace)
std::move(rs.second.freed_ranges));
}
} else if (rs.second.name == "") {
- ib::error() << "Missing FILE_CREATE, FILE_DELETE"
- " or FILE_MODIFY before FILE_CHECKPOINT"
- " for tablespace " << rs.first;
+ sql_print_error("InnoDB: Missing FILE_CREATE,"
+ " FILE_DELETE or FILE_MODIFY"
+ " before FILE_CHECKPOINT"
+ " for tablespace " UINT32PF, rs.first);
recv_sys.set_corrupt_log();
return(DB_CORRUPTION);
} else {
@@ -3801,18 +3848,19 @@ static dberr_t recv_rename_files()
only be possible if the recovery of both files was deferred
(no valid page 0 is contained in either file). We shall not
rename the file, just rename the metadata. */
- ib::info() << "Renaming tablespace metadata " << id
- << " from '" << old << "' to '" << r.second
- << "' that is also associated with tablespace "
- << other->id;
+ sql_print_information("InnoDB: Renaming tablespace metadata " UINT32PF
+ " from '%s' to '%s' that is also associated"
+ " with tablespace " UINT32PF,
+ id, old, new_name, other->id);
space->chain.start->name= mem_strdup(new_name);
ut_free(old);
}
else if (!os_file_status(new_name, &exists, &ftype) || exists)
{
- ib::error() << "Cannot replay rename of tablespace " << id
- << " from '" << old << "' to '" << r.second <<
- (exists ? "' because the target file exists" : "'");
+ sql_print_error("InnoDB: Cannot replay rename of tablespace " UINT32PF
+ " from '%s' to '%s'%s",
+ id, old, new_name, exists ?
+ " because the target file exists" : "");
err= DB_TABLESPACE_EXISTS;
}
else
@@ -3820,8 +3868,8 @@ static dberr_t recv_rename_files()
mysql_mutex_unlock(&fil_system.mutex);
err= space->rename(new_name, false);
if (err != DB_SUCCESS)
- ib::error() << "Cannot replay rename of tablespace " << id
- << " to '" << r.second << "': " << err;
+ sql_print_error("InnoDB: Cannot replay rename of tablespace "
+ UINT32PF " to '%s: %s", new_name, ut_strerr(err));
goto done;
}
mysql_mutex_unlock(&fil_system.mutex);
@@ -3862,9 +3910,8 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
ut_d(mysql_mutex_unlock(&buf_pool.flush_list_mutex));
if (srv_force_recovery >= SRV_FORCE_NO_LOG_REDO) {
-
- ib::info() << "innodb_force_recovery=6 skips redo log apply";
-
+ sql_print_information("InnoDB: innodb_force_recovery=6"
+ " skips redo log apply");
return(DB_SUCCESS);
}
@@ -3875,7 +3922,6 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
err = recv_find_max_checkpoint(&max_cp_field);
if (err != DB_SUCCESS) {
-
recv_sys.recovered_lsn = log_sys.get_lsn();
mysql_mutex_unlock(&log_sys.mutex);
return(err);
@@ -3936,7 +3982,8 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
if (recv_sys.is_corrupt_log() && !srv_force_recovery) {
mysql_mutex_unlock(&log_sys.mutex);
- ib::warn() << "Log scan aborted at LSN " << contiguous_lsn;
+ sql_print_warning("InnoDB: Log scan aborted at LSN " LSN_PF,
+ contiguous_lsn);
return(DB_ERROR);
}
@@ -3944,13 +3991,11 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
lsn_t scan_lsn = log_sys.log.scanned_lsn;
if (!srv_read_only_mode && scan_lsn != checkpoint_lsn) {
mysql_mutex_unlock(&log_sys.mutex);
- ib::error err;
- err << "Missing FILE_CHECKPOINT";
- if (end_lsn) {
- err << " at " << end_lsn;
- }
- err << " between the checkpoint " << checkpoint_lsn
- << " and the end " << scan_lsn << ".";
+ sql_print_error("InnoDB: Missing FILE_CHECKPOINT"
+ " at " LSN_PF
+ " between the checkpoint " LSN_PF
+ " and the end " LSN_PF ".",
+ end_lsn, checkpoint_lsn, scan_lsn);
return(DB_ERROR);
}
@@ -3980,29 +4025,25 @@ completed:
ut_ad(!srv_log_file_created);
if (checkpoint_lsn + sizeof_checkpoint < flush_lsn) {
- ib::warn()
- << "Are you sure you are using the right "
- << LOG_FILE_NAME
- << " to start up the database? Log sequence "
- "number in the "
- << LOG_FILE_NAME << " is " << checkpoint_lsn
- << ", less than the log sequence number in "
- "the first system tablespace file header, "
- << flush_lsn << ".";
+ sql_print_warning("InnoDB: Are you sure you are using"
+ " the right ib_logfile0"
+ " to start up the database?"
+ " The checkpoint is " LSN_PF
+ ", less than the log sequence number"
+ LSN_PF " in the system tablespace.",
+ checkpoint_lsn, flush_lsn);
}
if (!recv_needed_recovery) {
-
- ib::info()
- << "The log sequence number " << flush_lsn
- << " in the system tablespace does not match"
- " the log sequence number "
- << checkpoint_lsn << " in the "
- << LOG_FILE_NAME << "!";
+ sql_print_information(
+ "InnoDB: The log sequence number " LSN_PF
+ " in the system tablespace does not match"
+ " the log checkpoint " LSN_PF
+ " in ib_logfile0!", flush_lsn, checkpoint_lsn);
if (srv_read_only_mode) {
- ib::error() << "innodb_read_only"
- " prevents crash recovery";
+ sql_print_error("InnoDB: innodb_read_only"
+ " prevents crash recovery");
mysql_mutex_unlock(&log_sys.mutex);
return(DB_READ_ONLY);
}
@@ -4091,21 +4132,20 @@ completed:
&& (log_sys.log.scanned_lsn < checkpoint_lsn
|| log_sys.log.scanned_lsn < recv_max_page_lsn)) {
- ib::error() << "We scanned the log up to "
- << log_sys.log.scanned_lsn
- << ". A checkpoint was at " << checkpoint_lsn << " and"
- " the maximum LSN on a database page was "
- << recv_max_page_lsn << ". It is possible that the"
- " database is now corrupt!";
+ sql_print_error("InnoDB: We scanned the log up to " LSN_PF "."
+ " A checkpoint was at " LSN_PF
+ " and the maximum LSN on a database page was "
+ LSN_PF ". It is possible that the"
+ " database is now corrupt!",
+ log_sys.log.scanned_lsn, checkpoint_lsn,
+ recv_max_page_lsn);
}
if (recv_sys.recovered_lsn < checkpoint_lsn) {
mysql_mutex_unlock(&log_sys.mutex);
-
- ib::error() << "Recovered only to lsn:"
- << recv_sys.recovered_lsn
- << " checkpoint_lsn: " << checkpoint_lsn;
-
+ sql_print_error("InnoDB: Recovered only to lsn: " LSN_PF
+ " checkpoint_lsn: " LSN_PF,
+ recv_sys.recovered_lsn, checkpoint_lsn);
return(DB_ERROR);
}
@@ -4123,7 +4163,9 @@ completed:
log_sys.last_checkpoint_lsn = checkpoint_lsn;
- if (!srv_read_only_mode && srv_operation == SRV_OPERATION_NORMAL) {
+ if (!srv_read_only_mode && srv_operation == SRV_OPERATION_NORMAL
+ && (~log_t::FORMAT_ENCRYPTED & log_sys.log.format)
+ == log_t::FORMAT_10_5) {
/* Write a FILE_CHECKPOINT marker as the first thing,
before generating any other redo log. This ensures
that subsequent crash recovery will be possible even
diff --git a/storage/maria/CMakeLists.txt b/storage/maria/CMakeLists.txt
index 6051b98b0dd..9b2211503ff 100644
--- a/storage/maria/CMakeLists.txt
+++ b/storage/maria/CMakeLists.txt
@@ -128,6 +128,9 @@ IF (CURL_FOUND)
LINK_LIBRARIES curl z STORAGE_ENGINE NOT_EMBEDDED CONFIG s3.cnf)
ENDIF()
+SET(CPACK_RPM_s3-engine_PACKAGE_SUMMARY "Amazon S3 archival storage engine for MariaDB" PARENT_SCOPE)
+SET(CPACK_RPM_s3-engine_PACKAGE_DESCRIPTION "The S3 storage engine allows one to archive MariaDB tables in Amazon S3 (or any third-party public or private cloud that implements S3 API), but still have them accessible in MariaDB in read-only mode." PARENT_SCOPE)
+
IF(TARGET s3)
MYSQL_ADD_EXECUTABLE(aria_s3_copy aria_s3_copy.cc ${S3_SOURCES} COMPONENT s3-engine)
TARGET_LINK_LIBRARIES(aria_s3_copy aria myisam mysys mysys_ssl curl z)
diff --git a/storage/mroonga/vendor/groonga/CMakeLists.txt b/storage/mroonga/vendor/groonga/CMakeLists.txt
index b6ad3a9e50d..27afb935467 100644
--- a/storage/mroonga/vendor/groonga/CMakeLists.txt
+++ b/storage/mroonga/vendor/groonga/CMakeLists.txt
@@ -86,7 +86,9 @@ set(LIB_DIR "lib")
set(INCLUDE_DIR "include")
set(GRN_INCLUDE_DIR "include/groonga")
set(DATA_DIR "share")
-set(GRN_DATA_DIR "${DATA_DIR}/${GRN_PROJECT_NAME}")
+if(NOT DEFINED GRN_DATA_DIR)
+ set(GRN_DATA_DIR "${DATA_DIR}/${GRN_PROJECT_NAME}")
+endif()
set(CONFIG_DIR "etc")
set(GRN_CONFIG_DIR "${CONFIG_DIR}/${GRN_PROJECT_NAME}")
set(GRN_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/${GRN_CONFIG_DIR}/groonga.conf")
diff --git a/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt b/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt
index ae083028038..4c2aa343089 100644
--- a/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt
+++ b/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt
@@ -16,7 +16,9 @@
# MA 02110-1335 USA
cmake_minimum_required(VERSION 2.6)
-set(GROONGA_NORMALIZER_MYSQL_PROJECT_NAME "groonga-normalizer-mysql")
+if(NOT DEFINED GROONGA_NORMALIZER_MYSQL_PROJECT_NAME)
+ set(GROONGA_NORMALIZER_MYSQL_PROJECT_NAME "groonga-normalizer-mysql")
+endif()
project("${GROONGA_NORMALIZER_MYSQL_PROJECT_NAME}")
if(DEFINED GROONGA_NORMALIZER_MYSQL_EMBED)
diff --git a/unittest/mysys/thr_template.c b/unittest/mysys/thr_template.c
index 42e035d911c..1e715484687 100644
--- a/unittest/mysys/thr_template.c
+++ b/unittest/mysys/thr_template.c
@@ -59,7 +59,7 @@ int main(int argc __attribute__((unused)), char **argv)
pthread_mutex_init(&mutex, 0);
-#define CYCLES 3000
+#define CYCLES 30000
#define THREADS 30
diag("N CPUs: %d", my_getncpus());