mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.2 into bb-10.2-ext
This commit is contained in:
@@ -3,7 +3,7 @@ version: build-{build}~branch-{branch}
|
||||
before_build:
|
||||
- md %APPVEYOR_BUILD_FOLDER%\win_build
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\win_build
|
||||
- cmake .. -G "Visual Studio 15 2017 Win64" -DWITH_UNIT_TESTS=0 -DBISON_EXECUTABLE=C:\cygwin\bin\bison
|
||||
- cmake .. -G "Visual Studio 15 2017 Win64" -DWITH_UNIT_TESTS=0
|
||||
|
||||
build:
|
||||
project: win_build\MySQL.sln
|
||||
|
@@ -20,7 +20,16 @@ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
|
||||
SET(BISON_EXECUTABLE /opt/csw/bin/bison)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
FIND_PROGRAM(BISON_EXECUTABLE bison DOC "path to the bison executable")
|
||||
IF(WIN32)
|
||||
SET(BISON_PATH_HINTS
|
||||
HINTS
|
||||
C:/gnuwin32/bin
|
||||
C:/cygwin64/bin
|
||||
C:/cygwin/bin)
|
||||
ENDIF()
|
||||
FIND_PROGRAM(BISON_EXECUTABLE bison
|
||||
${BISON_PATH_HINTS}
|
||||
DOC "path to the bison executable")
|
||||
MARK_AS_ADVANCED(BISON_EXECUTABLE "")
|
||||
IF(NOT BISON_EXECUTABLE)
|
||||
MESSAGE("Warning: Bison executable not found in PATH")
|
||||
|
@@ -24,9 +24,6 @@ INCLUDE (CheckCSourceRuns)
|
||||
INCLUDE (CheckSymbolExists)
|
||||
INCLUDE (CheckTypeSize)
|
||||
|
||||
# Optionally read user configuration, generated by configure.js.
|
||||
# This is left for backward compatibility reasons only.
|
||||
INCLUDE(${CMAKE_BINARY_DIR}/win/configure.data OPTIONAL)
|
||||
|
||||
# avoid running system checks by using pre-cached check results
|
||||
# system checks are expensive on VS since every tiny program is to be compiled in
|
||||
@@ -63,6 +60,8 @@ IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
ENDIF()
|
||||
|
||||
IF(MSVC)
|
||||
# Disable mingw based pkg-config found in Strawberry perl
|
||||
SET(PKG_CONFIG_EXECUTABLE 0 CACHE INTERNAL "")
|
||||
SET(MSVC_CRT_TYPE /MT CACHE STRING
|
||||
"Runtime library - specify runtime library for linking (/MT,/MTd,/MD,/MDd)"
|
||||
)
|
||||
@@ -156,7 +155,11 @@ IF(MSVC)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
|
||||
ENDIF()
|
||||
|
||||
IF(MSVC_VERSION LESS 1910)
|
||||
# Noisy warning C4800: 'type': forcing value to bool 'true' or 'false' (performance warning),
|
||||
# removed in VS2017
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# Always link with socket library
|
||||
|
@@ -1464,12 +1464,10 @@ bool backup_finish()
|
||||
return(false);
|
||||
}
|
||||
|
||||
if (!write_xtrabackup_info(mysql_connection)) {
|
||||
if (!write_xtrabackup_info(mysql_connection, XTRABACKUP_INFO, opt_history != 0)) {
|
||||
return(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
@@ -1398,7 +1398,7 @@ PERCONA_SCHEMA.xtrabackup_history and writes a new history record to the
|
||||
table containing all the history info particular to the just completed
|
||||
backup. */
|
||||
bool
|
||||
write_xtrabackup_info(MYSQL *connection)
|
||||
write_xtrabackup_info(MYSQL *connection, const char * filename, bool history)
|
||||
{
|
||||
|
||||
char *uuid = NULL;
|
||||
@@ -1426,7 +1426,7 @@ write_xtrabackup_info(MYSQL *connection)
|
||||
|| xtrabackup_databases_exclude
|
||||
);
|
||||
|
||||
backup_file_printf(XTRABACKUP_INFO,
|
||||
backup_file_printf(filename,
|
||||
"uuid = %s\n"
|
||||
"name = %s\n"
|
||||
"tool_name = %s\n"
|
||||
@@ -1463,7 +1463,7 @@ write_xtrabackup_info(MYSQL *connection)
|
||||
xb_stream_name[xtrabackup_stream_fmt], /* format */
|
||||
xtrabackup_compress ? "compressed" : "N"); /* compressed */
|
||||
|
||||
if (!opt_history) {
|
||||
if (!history) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
@@ -68,7 +68,7 @@ bool
|
||||
write_binlog_info(MYSQL *connection);
|
||||
|
||||
bool
|
||||
write_xtrabackup_info(MYSQL *connection);
|
||||
write_xtrabackup_info(MYSQL *connection, const char * filename, bool history);
|
||||
|
||||
bool
|
||||
write_backup_config_file();
|
||||
|
@@ -3513,7 +3513,13 @@ xtrabackup_backup_low()
|
||||
"to '%s'.\n", filename);
|
||||
return false;
|
||||
}
|
||||
|
||||
sprintf(filename, "%s/%s", xtrabackup_extra_lsndir,
|
||||
XTRABACKUP_INFO);
|
||||
if (!write_xtrabackup_info(mysql_connection, filename, false)) {
|
||||
msg("mariabackup: Error: failed to write info "
|
||||
"to '%s'.\n", filename);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -3569,7 +3575,9 @@ xtrabackup_backup_func()
|
||||
if(innodb_init_param()) {
|
||||
fail:
|
||||
stop_backup_threads();
|
||||
innodb_shutdown();
|
||||
if (fil_system) {
|
||||
innodb_shutdown();
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
|
||||
|
Submodule libmariadb updated: 058fc080b4...67cc3438a8
@@ -1,4 +1,5 @@
|
||||
perl mysql-test-run.pl --verbose-restart --force --suite-timeout=120 --max-test-fail=10 --retry=3 --parallel=4 --suite=^
|
||||
vcol,gcol,perfschema,^
|
||||
main,^
|
||||
innodb,^
|
||||
plugins,^
|
||||
|
@@ -433,16 +433,21 @@ sub main {
|
||||
my $num_tests= @$tests;
|
||||
if ( $opt_parallel eq "auto" ) {
|
||||
# Try to find a suitable value for number of workers
|
||||
my $sys_info= My::SysInfo->new();
|
||||
|
||||
$opt_parallel= $sys_info->num_cpus();
|
||||
for my $limit (2000, 1500, 1000, 500){
|
||||
$opt_parallel-- if ($sys_info->min_bogomips() < $limit);
|
||||
if (IS_WINDOWS)
|
||||
{
|
||||
$opt_parallel= $ENV{NUMBER_OF_PROCESSORS} || 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
my $sys_info= My::SysInfo->new();
|
||||
$opt_parallel= $sys_info->num_cpus();
|
||||
for my $limit (2000, 1500, 1000, 500){
|
||||
$opt_parallel-- if ($sys_info->min_bogomips() < $limit);
|
||||
}
|
||||
}
|
||||
my $max_par= $ENV{MTR_MAX_PARALLEL} || 8;
|
||||
$opt_parallel= $max_par if ($opt_parallel > $max_par);
|
||||
$opt_parallel= $num_tests if ($opt_parallel > $num_tests);
|
||||
$opt_parallel= 1 if (IS_WINDOWS and $sys_info->isvm());
|
||||
$opt_parallel= 1 if ($opt_parallel < 1);
|
||||
mtr_report("Using parallel: $opt_parallel");
|
||||
}
|
||||
|
@@ -13,3 +13,4 @@
|
||||
innodb_scrub : MDEV-8139 scrubbing does not work reliably
|
||||
innodb_scrub_background : MDEV-8139 scrubbing does not work reliably
|
||||
innodb-redo-badkey : MDEV-13893 / MDEV-12699 Improve crash recovery of corrupted data pages
|
||||
innodb_encryption-page-compression : MDEV-14814 wait condition timeout
|
||||
|
@@ -1,6 +1,7 @@
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
|
||||
# Start server with keys2.txt
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
|
@@ -1,4 +1,5 @@
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as discarded\\.");
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
|
@@ -1,4 +1,5 @@
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
|
||||
|
@@ -1,4 +1,5 @@
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[1-3]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
||||
# Restart mysqld --file-key-management-filename=keys2.txt
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
|
@@ -1,4 +1,5 @@
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[15]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
create table t5 (
|
||||
`intcol1` int(32) DEFAULT NULL,
|
||||
|
@@ -1,4 +1,5 @@
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
set global innodb_compression_algorithm = 1;
|
||||
# Create and populate tables to be corrupted
|
||||
|
@@ -1,4 +1,5 @@
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
# Start server with keys2.txt
|
||||
CREATE TABLE t1(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=19;
|
||||
CREATE TABLE t2(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
|
||||
|
@@ -1,6 +1,7 @@
|
||||
call mtr.add_suppression("Plugin 'file_key_management'");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file .*test/t[1-4]\\.ibd cannot be decrypted");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t1\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
||||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
||||
|
@@ -1,15 +1,11 @@
|
||||
call mtr.add_suppression("InnoDB: Block in space_id .*");
|
||||
call mtr.add_suppression("mysqld: File .*");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' .*");
|
||||
call mtr.add_suppression("InnoDB: cannot enable encryption, encryption plugin is not available");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
|
||||
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t2 cannot be decrypted.");
|
||||
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t3 cannot be decrypted.");
|
||||
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t4 cannot be decrypted.");
|
||||
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted.");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[0-9]+, page number=[0-9]+\\] in file '.*test.t[1-4]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
# Restart mysqld --file-key-management-filename=keys2.txt
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
create table t1(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=20;
|
||||
create table t2(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed;
|
||||
|
@@ -137,15 +137,9 @@ count(*)
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
||||
variable_value > 0
|
||||
1
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
variable_value >= 0
|
||||
1
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
|
||||
variable_value > 0
|
||||
1
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
|
||||
variable_value >= 0
|
||||
1
|
||||
SET GLOBAL innodb_encryption_threads = 4;
|
||||
SET GLOBAL innodb_encrypt_tables = off;
|
||||
update innodb_page_compressed1 set c1 = c1 + 1;
|
||||
@@ -157,8 +151,8 @@ update innodb_page_compressed6 set c1 = c1 + 1;
|
||||
update innodb_page_compressed7 set c1 = c1 + 1;
|
||||
update innodb_page_compressed8 set c1 = c1 + 1;
|
||||
update innodb_page_compressed9 set c1 = c1 + 1;
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
||||
variable_value >= 0
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
||||
variable_value > 0
|
||||
1
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
variable_value > 0
|
||||
@@ -166,8 +160,8 @@ variable_value > 0
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
|
||||
variable_value > 0
|
||||
1
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
|
||||
variable_value >= 0
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
|
||||
variable_value > 0
|
||||
1
|
||||
drop procedure innodb_insert_proc;
|
||||
drop table innodb_normal;
|
||||
|
@@ -1,4 +1,3 @@
|
||||
call mtr.add_suppression("trying to do an operation on a dropped tablespace .*");
|
||||
SET GLOBAL innodb_encrypt_tables = OFF;
|
||||
SET GLOBAL innodb_encryption_threads = 4;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB;
|
||||
@@ -12,24 +11,21 @@ t1 CREATE TABLE `t1` (
|
||||
CREATE TABLE t2 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=YES;
|
||||
CREATE TABLE t3 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=NO;
|
||||
CREATE TABLE t4 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
|
||||
INSERT INTO t2 select * from t1;
|
||||
INSERT INTO t3 select * from t1;
|
||||
INSERT INTO t4 select * from t1;
|
||||
SET GLOBAL innodb_encrypt_tables = on;
|
||||
# Wait max 10 min for key encryption threads to encrypt required all spaces
|
||||
# Success!
|
||||
SELECT COUNT(1) FROM t1;
|
||||
COUNT(1)
|
||||
400
|
||||
10
|
||||
SELECT COUNT(1) FROM t2;
|
||||
COUNT(1)
|
||||
400
|
||||
10
|
||||
SELECT COUNT(1) FROM t3;
|
||||
COUNT(1)
|
||||
400
|
||||
10
|
||||
SELECT COUNT(1) FROM t4;
|
||||
COUNT(1)
|
||||
400
|
||||
10
|
||||
SET GLOBAL innodb_encrypt_tables = off;
|
||||
# Wait max 10 min for key encryption threads to decrypt all required spaces
|
||||
# Success!
|
||||
@@ -48,18 +44,17 @@ INSERT INTO t5 select * from t1;
|
||||
# Success!
|
||||
SELECT COUNT(1) FROM t1;
|
||||
COUNT(1)
|
||||
400
|
||||
10
|
||||
SELECT COUNT(1) FROM t2;
|
||||
COUNT(1)
|
||||
400
|
||||
10
|
||||
SELECT COUNT(1) FROM t3;
|
||||
COUNT(1)
|
||||
400
|
||||
10
|
||||
SELECT COUNT(1) FROM t4;
|
||||
COUNT(1)
|
||||
400
|
||||
10
|
||||
SELECT COUNT(1) FROM t5;
|
||||
COUNT(1)
|
||||
400
|
||||
10
|
||||
drop table t1,t2,t3,t4, t5;
|
||||
set GLOBAL innodb_default_encryption_key_id=1;
|
||||
|
@@ -11,6 +11,7 @@
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
|
||||
|
||||
--echo # Start server with keys2.txt
|
||||
|
@@ -9,6 +9,7 @@
|
||||
# MDEV-8727: Server/InnoDB hangs on shutdown after trying to read an encrypted table with a wrong key
|
||||
#
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
# Suppression for builds where file_key_management plugin is linked statically
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as discarded\\.");
|
||||
|
@@ -8,6 +8,7 @@
|
||||
#
|
||||
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
# Suppression for builds where file_key_management plugin is linked statically
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
|
||||
|
@@ -5,6 +5,7 @@
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[1-3]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
||||
|
||||
--echo # Restart mysqld --file-key-management-filename=keys2.txt
|
||||
|
@@ -8,6 +8,7 @@
|
||||
#
|
||||
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[15]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
|
||||
# Suppression for builds where file_key_management plugin is linked statically
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
|
@@ -8,6 +8,7 @@
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
set global innodb_compression_algorithm = 1;
|
||||
|
@@ -8,6 +8,7 @@
|
||||
#
|
||||
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
|
||||
--echo # Start server with keys2.txt
|
||||
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
|
@@ -6,6 +6,7 @@
|
||||
call mtr.add_suppression("Plugin 'file_key_management'");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file .*test/t[1-4]\\.ibd cannot be decrypted");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t1\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
||||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
||||
|
@@ -3,25 +3,19 @@
|
||||
# embedded does not support restart
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: Block in space_id .*");
|
||||
call mtr.add_suppression("mysqld: File .*");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' .*");
|
||||
call mtr.add_suppression("InnoDB: cannot enable encryption, encryption plugin is not available");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
|
||||
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t2 cannot be decrypted.");
|
||||
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t3 cannot be decrypted.");
|
||||
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t4 cannot be decrypted.");
|
||||
call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted.");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[0-9]+, page number=[0-9]+\\] in file '.*test.t[1-4]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
|
||||
--echo # Restart mysqld --file-key-management-filename=keys2.txt
|
||||
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
--disable_warnings
|
||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
--enable_warnings
|
||||
|
||||
create table t1(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=20;
|
||||
create table t2(a int not null primary key auto_increment, c char(200), b blob, index(b(10))) engine=innodb row_format=compressed;
|
||||
|
@@ -1,9 +1,6 @@
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/have_example_key_management_plugin.inc
|
||||
|
||||
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
|
||||
let $innodb_encrypt_tables_orig = `SELECT @@innodb_encrypt_tables`;
|
||||
let $innodb_encryption_threads_orig = `SELECT @@innodb_encryption_threads`;
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
SET GLOBAL innodb_encryption_threads = 4;
|
||||
SET GLOBAL innodb_encrypt_tables = on;
|
||||
@@ -78,11 +75,13 @@ select count(*) from innodb_page_compressed9 where c1 < 500000;
|
||||
|
||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
|
||||
--source include/wait_condition.inc
|
||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
|
||||
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
SET GLOBAL innodb_encryption_threads = 4;
|
||||
SET GLOBAL innodb_encrypt_tables = off;
|
||||
@@ -97,13 +96,15 @@ update innodb_page_compressed7 set c1 = c1 + 1;
|
||||
update innodb_page_compressed8 set c1 = c1 + 1;
|
||||
update innodb_page_compressed9 set c1 = c1 + 1;
|
||||
|
||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_DECRYPTED';
|
||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED';
|
||||
--source include/wait_condition.inc
|
||||
let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed';
|
||||
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
|
||||
SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
|
||||
|
||||
drop procedure innodb_insert_proc;
|
||||
drop table innodb_normal;
|
||||
@@ -116,10 +117,3 @@ drop table innodb_page_compressed6;
|
||||
drop table innodb_page_compressed7;
|
||||
drop table innodb_page_compressed8;
|
||||
drop table innodb_page_compressed9;
|
||||
|
||||
# reset system
|
||||
--disable_query_log
|
||||
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
|
||||
EVAL SET GLOBAL innodb_encrypt_tables = $innodb_encrypt_tables_orig;
|
||||
EVAL SET GLOBAL innodb_encryption_threads = $innodb_encryption_threads_orig;
|
||||
--enable_query_log
|
||||
|
@@ -1,12 +1,11 @@
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/have_file_key_management_plugin.inc
|
||||
# embedded does not support restart
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
call mtr.add_suppression("trying to do an operation on a dropped tablespace .*");
|
||||
|
||||
--disable_query_log
|
||||
let $encrypt_tables = `SELECT @@innodb_encrypt_tables`;
|
||||
let $threads = `SELECT @@innodb_encryption_threads`;
|
||||
let $key_id = `SELECT @@innodb_default_encryption_key_id`;
|
||||
--enable_query_log
|
||||
|
||||
SET GLOBAL innodb_encrypt_tables = OFF;
|
||||
SET GLOBAL innodb_encryption_threads = 4;
|
||||
@@ -19,21 +18,20 @@ CREATE TABLE t4 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNOD
|
||||
|
||||
--disable_warnings
|
||||
--disable_query_log
|
||||
set autocommit=0;
|
||||
let $i = 400;
|
||||
begin;
|
||||
let $i = 10;
|
||||
while ($i)
|
||||
{
|
||||
INSERT INTO t1 values(NULL, substring(MD5(RAND()), -128));
|
||||
dec $i;
|
||||
}
|
||||
commit;
|
||||
set autocommit=1;
|
||||
--enable_warnings
|
||||
--enable_query_log
|
||||
|
||||
INSERT INTO t2 select * from t1;
|
||||
INSERT INTO t3 select * from t1;
|
||||
INSERT INTO t4 select * from t1;
|
||||
commit;
|
||||
--enable_warnings
|
||||
--enable_query_log
|
||||
|
||||
SET GLOBAL innodb_encrypt_tables = on;
|
||||
|
||||
@@ -54,7 +52,7 @@ while ($cnt)
|
||||
}
|
||||
if (!$success)
|
||||
{
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
|
||||
SELECT NAME,ENCRYPTION_SHCEME,MIN_KEY_VERSION, ROTATING_OR_FLUSHING FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
|
||||
SHOW STATUS LIKE 'innodb_encryption%';
|
||||
-- die Timeout waiting for encryption threads
|
||||
}
|
||||
@@ -84,7 +82,7 @@ while ($cnt)
|
||||
}
|
||||
if (!$success)
|
||||
{
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
|
||||
SELECT NAME,ENCRYPTION_SHCEME,MIN_KEY_VERSION, ROTATING_OR_FLUSHING FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
|
||||
SHOW STATUS LIKE 'innodb_encryption%';
|
||||
-- die Timeout waiting for encryption threads
|
||||
}
|
||||
@@ -113,7 +111,7 @@ while ($cnt)
|
||||
}
|
||||
if (!$success)
|
||||
{
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
|
||||
SELECT NAME,ENCRYPTION_SHCEME,MIN_KEY_VERSION, ROTATING_OR_FLUSHING FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
|
||||
SHOW STATUS LIKE 'innodb_encryption%';
|
||||
-- die Timeout waiting for encryption threads
|
||||
}
|
||||
@@ -125,12 +123,11 @@ SELECT COUNT(1) FROM t3;
|
||||
SELECT COUNT(1) FROM t4;
|
||||
SELECT COUNT(1) FROM t5;
|
||||
|
||||
drop table t1,t2,t3,t4, t5;
|
||||
|
||||
# reset system
|
||||
--disable_query_log
|
||||
EVAL SET GLOBAL innodb_encrypt_tables = $encrypt_tables;
|
||||
EVAL SET GLOBAL innodb_encryption_threads = $threads;
|
||||
EVAL set GLOBAL innodb_default_encryption_key_id = $key_id;
|
||||
--enable_query_log
|
||||
|
||||
drop table t1,t2,t3,t4, t5;
|
||||
|
||||
set GLOBAL innodb_default_encryption_key_id=1;
|
||||
|
29
mysql-test/suite/innodb/r/restart.result
Normal file
29
mysql-test/suite/innodb/r/restart.result
Normal file
@@ -0,0 +1,29 @@
|
||||
#
|
||||
# MDEV-15333 MariaDB (still) slow start
|
||||
#
|
||||
# FIXME: Unlike MySQL, maybe MariaDB should not read the .ibd files
|
||||
# of tables with .isl file or DATA DIRECTORY attribute.
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: Invalid flags 0x7a207879 in .*td\\.ibd");
|
||||
# FIXME: This is much more noisy than MariaDB 10.1!
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot read first page in datafile: .*td\\.ibd, Space ID:2048948345, Flags: 2048948345");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number .* in a file operation\\.");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: The error means the system cannot find the path specified\\.");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them\\.");
|
||||
call mtr.add_suppression("\\[Warning\\] InnoDB: Ignoring tablespace for `test`\\.`td` because it could not be opened\\.");
|
||||
CREATE TABLE tr(a INT)ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
|
||||
CREATE TABLE tc(a INT)ENGINE=InnoDB ROW_FORMAT=COMPACT
|
||||
PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9;
|
||||
CREATE TABLE td(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC
|
||||
STATS_PERSISTENT=0 DATA DIRECTORY='MYSQL_TMP_DIR';
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
COUNT(*)
|
||||
1
|
||||
SELECT * FROM tr;
|
||||
a
|
||||
SELECT * FROM tc;
|
||||
a
|
||||
SELECT * FROM td;
|
||||
a
|
||||
DROP TABLE tr,tc,td;
|
80
mysql-test/suite/innodb/t/restart.test
Normal file
80
mysql-test/suite/innodb/t/restart.test
Normal file
@@ -0,0 +1,80 @@
|
||||
--source include/innodb_page_size.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
let datadir= `select @@datadir`;
|
||||
let page_size= `select @@innodb_page_size`;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-15333 MariaDB (still) slow start
|
||||
--echo #
|
||||
|
||||
# Ensure that on normal startup, no data files are read.
|
||||
# Note: just like in MySQL, all .ibd files will still be
|
||||
# opened at least once.
|
||||
|
||||
--echo # FIXME: Unlike MySQL, maybe MariaDB should not read the .ibd files
|
||||
--echo # of tables with .isl file or DATA DIRECTORY attribute.
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: Invalid flags 0x7a207879 in .*td\\.ibd");
|
||||
--echo # FIXME: This is much more noisy than MariaDB 10.1!
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot read first page in datafile: .*td\\.ibd, Space ID:2048948345, Flags: 2048948345");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number .* in a file operation\\.");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: The error means the system cannot find the path specified\\.");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them\\.");
|
||||
call mtr.add_suppression("\\[Warning\\] InnoDB: Ignoring tablespace for `test`\\.`td` because it could not be opened\\.");
|
||||
|
||||
CREATE TABLE tr(a INT)ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
|
||||
CREATE TABLE tc(a INT)ENGINE=InnoDB ROW_FORMAT=COMPACT
|
||||
PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9;
|
||||
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
||||
eval CREATE TABLE td(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC
|
||||
STATS_PERSISTENT=0 DATA DIRECTORY='$MYSQL_TMP_DIR';
|
||||
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
--move_file $datadir/test/tr.ibd $datadir/test/tr0.ibd
|
||||
--move_file $datadir/test/tc.ibd $datadir/test/tc0.ibd
|
||||
--move_file $MYSQL_TMP_DIR/test/td.ibd $datadir/test/td0.ibd
|
||||
# TODO: test that MariaDB does not even attempt to open the files
|
||||
#--mkdir $datadir/test/tr.ibd
|
||||
#--mkdir $datadir/test/tc.ibd
|
||||
#--mkdir $MYSQL_TMP_DIR/test/td.ibd
|
||||
|
||||
perl;
|
||||
die unless open OUT, ">", "$ENV{datadir}/test/tr.ibd";
|
||||
print OUT "foo " x $ENV{page_size};
|
||||
close OUT or die;
|
||||
die unless open OUT, ">", "$ENV{datadir}/test/tc.ibd";
|
||||
print OUT "bar " x $ENV{page_size};
|
||||
close OUT or die;
|
||||
die unless open OUT, ">", "$ENV{MYSQL_TMP_DIR}/test/td.ibd";
|
||||
print OUT "xyz " x $ENV{page_size};
|
||||
close OUT or die;
|
||||
EOF
|
||||
|
||||
--let $restart_parameters= --skip-innodb-buffer-pool-load-at-startup
|
||||
--source include/start_mysqld.inc
|
||||
--let $restart_parameters=
|
||||
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
|
||||
WHERE engine = 'innodb'
|
||||
AND support IN ('YES', 'DEFAULT', 'ENABLED');
|
||||
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
# TODO: test that MariaDB does not even attempt to open the files
|
||||
#--rmdir $datadir/test/tr.ibd
|
||||
#--rmdir $datadir/test/tc.ibd
|
||||
#--rmdir $MYSQL_TMP_DIR/test/td.ibd
|
||||
--remove_file $datadir/test/tr.ibd
|
||||
--remove_file $datadir/test/tc.ibd
|
||||
--remove_file $MYSQL_TMP_DIR/test/td.ibd
|
||||
|
||||
--move_file $datadir/test/tr0.ibd $datadir/test/tr.ibd
|
||||
--move_file $datadir/test/tc0.ibd $datadir/test/tc.ibd
|
||||
--move_file $datadir/test/td0.ibd $MYSQL_TMP_DIR/test/td.ibd
|
||||
|
||||
--source include/start_mysqld.inc
|
||||
SELECT * FROM tr;
|
||||
SELECT * FROM tc;
|
||||
SELECT * FROM td;
|
||||
DROP TABLE tr,tc,td;
|
2
mysql-test/suite/mariabackup/extra_lsndir.result
Normal file
2
mysql-test/suite/mariabackup/extra_lsndir.result
Normal file
@@ -0,0 +1,2 @@
|
||||
xtrabackup_checkpoints
|
||||
xtrabackup_info
|
9
mysql-test/suite/mariabackup/extra_lsndir.test
Normal file
9
mysql-test/suite/mariabackup/extra_lsndir.test
Normal file
@@ -0,0 +1,9 @@
|
||||
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
|
||||
let $extra_lsndir=$MYSQLTEST_VARDIR/tmp/extra_lsndir;
|
||||
mkdir $extra_lsndir;
|
||||
--disable_result_log
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --extra-lsndir=$extra_lsndir;
|
||||
--enable_result_log
|
||||
list_files $extra_lsndir;
|
||||
rmdir $extra_lsndir;
|
||||
rmdir $targetdir;
|
@@ -40,8 +40,8 @@ sub start_test {
|
||||
my $bin=$ENV{MTR_BINDIR} || '..';
|
||||
return "Not run for embedded server" if $::opt_embedded_server;
|
||||
return "Not configured to run ctest" unless -f "$bin/CTestTestfile.cmake";
|
||||
my ($ctest_vs)= $opt_vs_config ? "--build-config $opt_vs_config" : "";
|
||||
my (@ctest_list)= `cd "$bin" && ctest $opt_vs_config --show-only --verbose`;
|
||||
my ($ctest_vs)= $opt_vs_config ? "-C $opt_vs_config" : "";
|
||||
my (@ctest_list)= `cd "$bin" && ctest $ctest_vs --show-only --verbose`;
|
||||
return "No ctest" if $?;
|
||||
|
||||
my ($command, %tests, $prefix);
|
||||
@@ -51,7 +51,9 @@ sub start_test {
|
||||
$command= $';
|
||||
$prefix= /libmariadb/ ? 'conc_' : '';
|
||||
} elsif (/^ +Test +#\d+: +/) {
|
||||
$tests{$prefix.$'}=$command;
|
||||
if ($command ne "NOT_AVAILABLE") {
|
||||
$tests{$prefix.$'}=$command;
|
||||
}
|
||||
}
|
||||
}
|
||||
bless { ctests => { %tests } };
|
||||
|
@@ -4227,7 +4227,8 @@ skip_validate:
|
||||
err = DB_ERROR;
|
||||
}
|
||||
|
||||
if (purpose != FIL_TYPE_IMPORT && !srv_read_only_mode) {
|
||||
if (err == DB_SUCCESS && validate
|
||||
&& purpose != FIL_TYPE_IMPORT && !srv_read_only_mode) {
|
||||
df_remote.close();
|
||||
df_dict.close();
|
||||
df_default.close();
|
||||
|
@@ -516,8 +516,18 @@ Datafile::validate_first_page(lsn_t* flush_lsn)
|
||||
}
|
||||
}
|
||||
|
||||
if (error_txt != NULL) {
|
||||
err_exit:
|
||||
ib::error() << error_txt << " in datafile: " << m_filepath
|
||||
<< ", Space ID:" << m_space_id << ", Flags: "
|
||||
<< m_flags << ". " << TROUBLESHOOT_DATADICT_MSG;
|
||||
m_is_valid = false;
|
||||
free_first_page();
|
||||
return(DB_CORRUPTION);
|
||||
}
|
||||
|
||||
/* Check if the whole page is blank. */
|
||||
if (error_txt == NULL && !m_space_id && !m_flags) {
|
||||
if (!m_space_id && !m_flags) {
|
||||
const byte* b = m_first_page;
|
||||
ulint nonzero_bytes = UNIV_PAGE_SIZE;
|
||||
|
||||
@@ -528,56 +538,45 @@ Datafile::validate_first_page(lsn_t* flush_lsn)
|
||||
|
||||
if (nonzero_bytes == 0) {
|
||||
error_txt = "Header page consists of zero bytes";
|
||||
goto err_exit;
|
||||
}
|
||||
}
|
||||
|
||||
if (!fsp_flags_is_valid(m_flags, m_space_id)) {
|
||||
/* Tablespace flags must be valid. */
|
||||
error_txt = "Tablespace flags are invalid";
|
||||
goto err_exit;
|
||||
}
|
||||
|
||||
const page_size_t page_size(m_flags);
|
||||
|
||||
if (error_txt != NULL) {
|
||||
|
||||
/* skip the next few tests */
|
||||
} else if (univ_page_size.logical() != page_size.logical()) {
|
||||
|
||||
if (univ_page_size.logical() != page_size.logical()) {
|
||||
/* Page size must be univ_page_size. */
|
||||
|
||||
ib::error()
|
||||
<< "Data file '" << m_filepath << "' uses page size "
|
||||
<< page_size.logical() << ", but the innodb_page_size"
|
||||
" start-up parameter is "
|
||||
<< univ_page_size.logical();
|
||||
|
||||
free_first_page();
|
||||
|
||||
return(DB_ERROR);
|
||||
} else if (!fsp_flags_is_valid(m_flags, m_space_id)) {
|
||||
/* Tablespace flags must be valid. */
|
||||
error_txt = "Tablespace flags are invalid";
|
||||
} else if (page_get_page_no(m_first_page) != 0) {
|
||||
|
||||
/* First page must be number 0 */
|
||||
error_txt = "Header page contains inconsistent data";
|
||||
|
||||
} else if (m_space_id == ULINT_UNDEFINED) {
|
||||
|
||||
/* The space_id can be most anything, except -1. */
|
||||
error_txt = "A bad Space ID was found";
|
||||
|
||||
} else if (buf_page_is_corrupted(false, m_first_page, page_size)) {
|
||||
|
||||
/* Look for checksum and other corruptions. */
|
||||
error_txt = "Checksum mismatch";
|
||||
}
|
||||
|
||||
if (error_txt != NULL) {
|
||||
ib::error() << error_txt << " in datafile: " << m_filepath
|
||||
<< ", Space ID:" << m_space_id << ", Flags: "
|
||||
<< m_flags << ". " << TROUBLESHOOT_DATADICT_MSG;
|
||||
m_is_valid = false;
|
||||
if (page_get_page_no(m_first_page) != 0) {
|
||||
/* First page must be number 0 */
|
||||
error_txt = "Header page contains inconsistent data";
|
||||
goto err_exit;
|
||||
}
|
||||
|
||||
free_first_page();
|
||||
|
||||
return(DB_CORRUPTION);
|
||||
if (m_space_id == ULINT_UNDEFINED) {
|
||||
/* The space_id can be most anything, except -1. */
|
||||
error_txt = "A bad Space ID was found";
|
||||
goto err_exit;
|
||||
}
|
||||
|
||||
if (buf_page_is_corrupted(false, m_first_page, page_size)) {
|
||||
/* Look for checksum and other corruptions. */
|
||||
error_txt = "Checksum mismatch";
|
||||
goto err_exit;
|
||||
}
|
||||
|
||||
if (fil_space_read_name_and_filepath(
|
||||
|
@@ -15049,7 +15049,7 @@ ha_innobase::check(
|
||||
&& !dict_index_is_corrupted(index)) {
|
||||
/* Enlarge the fatal lock wait timeout during
|
||||
CHECK TABLE. */
|
||||
my_atomic_addlint(
|
||||
my_atomic_addlong(
|
||||
&srv_fatal_semaphore_wait_threshold,
|
||||
SRV_SEMAPHORE_WAIT_EXTENSION);
|
||||
|
||||
@@ -15058,7 +15058,7 @@ ha_innobase::check(
|
||||
|
||||
/* Restore the fatal lock wait timeout after
|
||||
CHECK TABLE. */
|
||||
my_atomic_addlint(
|
||||
my_atomic_addlong(
|
||||
&srv_fatal_semaphore_wait_threshold,
|
||||
-SRV_SEMAPHORE_WAIT_EXTENSION);
|
||||
|
||||
|
@@ -1827,7 +1827,7 @@ struct buf_block_t{
|
||||
} while (0)
|
||||
# define assert_block_ahi_valid(block) \
|
||||
ut_a((block)->index \
|
||||
|| my_atomic_addlint(&(block)->n_pointers, 0) == 0)
|
||||
|| my_atomic_loadlint(&(block)->n_pointers) == 0)
|
||||
# else /* UNIV_AHI_DEBUG || UNIV_DEBUG */
|
||||
# define assert_block_ahi_empty(block) /* nothing */
|
||||
# define assert_block_ahi_empty_on_init(block) /* nothing */
|
||||
|
@@ -1156,9 +1156,41 @@ enum rw_lock_flag_t {
|
||||
#endif /* UNIV_INNOCHECKSUM */
|
||||
|
||||
#ifdef _WIN64
|
||||
#define my_atomic_addlint(A,B) my_atomic_add64((int64*) (A), (B))
|
||||
#define my_atomic_loadlint(A) my_atomic_load64((int64*) (A))
|
||||
#define my_atomic_caslint(A,B,C) my_atomic_cas64((int64*) (A), (int64*) (B), (C))
|
||||
static inline ulint my_atomic_addlint(ulint *A, ulint B)
|
||||
{
|
||||
return ulint(my_atomic_add64((volatile int64*)A, B));
|
||||
}
|
||||
|
||||
static inline ulint my_atomic_loadlint(const ulint *A)
|
||||
{
|
||||
return ulint(my_atomic_load64((volatile int64*)A));
|
||||
}
|
||||
|
||||
static inline lint my_atomic_addlint(volatile lint *A, lint B)
|
||||
{
|
||||
return my_atomic_add64((volatile int64*)A, B);
|
||||
}
|
||||
|
||||
static inline lint my_atomic_loadlint(const lint *A)
|
||||
{
|
||||
return lint(my_atomic_load64((volatile int64*)A));
|
||||
}
|
||||
|
||||
static inline void my_atomic_storelint(ulint *A, ulint B)
|
||||
{
|
||||
my_atomic_store64((volatile int64*)A, B);
|
||||
}
|
||||
|
||||
static inline lint my_atomic_caslint(volatile lint *A, lint *B, lint C)
|
||||
{
|
||||
return my_atomic_cas64((volatile int64*)A, (int64 *)B, C);
|
||||
}
|
||||
|
||||
static inline ulint my_atomic_caslint(ulint *A, ulint *B, ulint C)
|
||||
{
|
||||
return my_atomic_cas64((volatile int64*)A, (int64 *)B, (int64)C);
|
||||
}
|
||||
|
||||
#else
|
||||
#define my_atomic_addlint my_atomic_addlong
|
||||
#define my_atomic_loadlint my_atomic_loadlong
|
||||
@@ -1188,7 +1220,7 @@ struct MY_ALIGNED(CPU_LEVEL1_DCACHE_LINESIZE) simple_counter
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 4244)
|
||||
#endif
|
||||
return Type(my_atomic_addlint(reinterpret_cast<lint*>
|
||||
return Type(my_atomic_addlint(reinterpret_cast<ulint*>
|
||||
(&m_counter), i));
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (pop)
|
||||
|
@@ -514,9 +514,9 @@ public:
|
||||
parallelized purge operation */
|
||||
ReadView view; /*!< The purge will not remove undo logs
|
||||
which are >= this view (purge view) */
|
||||
volatile ulint n_submitted; /*!< Count of total tasks submitted
|
||||
ulint n_submitted; /*!< Count of total tasks submitted
|
||||
to the task queue */
|
||||
volatile ulint n_completed; /*!< Count of total tasks completed */
|
||||
ulint n_completed; /*!< Count of total tasks completed */
|
||||
|
||||
/*------------------------------*/
|
||||
/* The following two fields form the 'purge pointer' which advances
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2015, 2016, MariaDB Corporation.
|
||||
Copyright (c) 2015, 2018, MariaDB Corporation.
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
Google, Inc. Those modifications are gratefully acknowledged and are described
|
||||
@@ -73,16 +73,12 @@ ulong srv_thread_concurrency = 0;
|
||||
struct srv_conc_t {
|
||||
char pad[CACHE_LINE_SIZE - (sizeof(ulint) + sizeof(lint))];
|
||||
|
||||
/** Number of transactions that have declared_to_be_inside_innodb set.
|
||||
It used to be a non-error for this value to drop below zero temporarily.
|
||||
This is no longer true. We'll, however, keep the lint datatype to add
|
||||
assertions to catch any corner cases that we may have missed. */
|
||||
|
||||
volatile lint n_active;
|
||||
/** Number of transactions that have declared_to_be_inside_innodb */
|
||||
ulint n_active;
|
||||
|
||||
/** Number of OS threads waiting in the FIFO for permission to
|
||||
enter InnoDB */
|
||||
volatile lint n_waiting;
|
||||
ulint n_waiting;
|
||||
};
|
||||
|
||||
/* Control variables for tracking concurrency. */
|
||||
@@ -152,7 +148,7 @@ srv_conc_enter_innodb_with_atomics(
|
||||
return;
|
||||
}
|
||||
|
||||
if (srv_conc.n_active < (lint) srv_thread_concurrency) {
|
||||
if (srv_conc.n_active < srv_thread_concurrency) {
|
||||
ulint n_active;
|
||||
|
||||
/* Check if there are any free tickets. */
|
||||
@@ -273,8 +269,6 @@ srv_conc_force_enter_innodb(
|
||||
return;
|
||||
}
|
||||
|
||||
ut_ad(srv_conc.n_active >= 0);
|
||||
|
||||
(void) my_atomic_addlint(&srv_conc.n_active, 1);
|
||||
|
||||
trx->n_tickets_to_enter_innodb = 1;
|
||||
|
@@ -2588,8 +2588,8 @@ DECLARE_THREAD(srv_worker_thread)(
|
||||
slot = srv_reserve_slot(SRV_WORKER);
|
||||
|
||||
ut_a(srv_n_purge_threads > 1);
|
||||
ut_a(my_atomic_loadlint(&srv_sys.n_threads_active[SRV_WORKER])
|
||||
< static_cast<lint>(srv_n_purge_threads));
|
||||
ut_a(ulong(my_atomic_loadlint(&srv_sys.n_threads_active[SRV_WORKER]))
|
||||
< srv_n_purge_threads);
|
||||
|
||||
/* We need to ensure that the worker threads exit after the
|
||||
purge coordinator thread. Otherwise the purge coordinator can
|
||||
|
@@ -177,3 +177,8 @@ if(GRN_WITH_MRUBY)
|
||||
FILES ${EXPRESSION_TREE_RUBY_SCRIPTS}
|
||||
DESTINATION "${GRN_RELATIVE_RUBY_SCRIPTS_DIR}/expression_tree")
|
||||
endif()
|
||||
|
||||
# Workaround GCC ICE on ARM64
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
|
||||
ADD_COMPILE_FLAGS(ts/ts_expr_node.c COMPILE_FLAGS "-fno-tree-loop-vectorize")
|
||||
ENDIF()
|
||||
|
@@ -4468,17 +4468,7 @@ cleanup_and_exit:
|
||||
|
||||
mem_free(def.filepath);
|
||||
|
||||
/* We need to check fsp flags when no errors has happened and
|
||||
server was not started on read only mode and tablespace validation
|
||||
was requested or flags contain other table options except
|
||||
low order bits to FSP_FLAGS_POS_PAGE_SSIZE position.
|
||||
Note that flag comparison is pessimistic. Adjust is required
|
||||
only when flags contain buggy MariaDB 10.1.0 -
|
||||
MariaDB 10.1.20 flags. */
|
||||
if (err == DB_SUCCESS
|
||||
&& !srv_read_only_mode
|
||||
&& (validate
|
||||
|| flags >= (1U << FSP_FLAGS_POS_PAGE_SSIZE))) {
|
||||
if (err == DB_SUCCESS && validate && !srv_read_only_mode) {
|
||||
fsp_flags_try_adjust(id, flags & ~FSP_FLAGS_MEM_MASK);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user