summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-02-19 11:37:29 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-02-19 11:37:29 +0200
commit2ba487cfe8bd95b90a537a5e9e54b5c1a5a35f37 (patch)
treed807814af6a0e1bb93b9f0060244220a0830dcc8
parentafc56a509cc7d3d651ca68ad826ca183da8dc7cc (diff)
parentef3147b1d64b298486fc6f77f9e84b28a9d1c5b3 (diff)
downloadmariadb-git-2ba487cfe8bd95b90a537a5e9e54b5c1a5a35f37.tar.gz
Merge bb-10.2-ext into 10.3
-rw-r--r--appveyor.yml2
-rw-r--r--cmake/bison.cmake11
-rw-r--r--cmake/os/Windows.cmake11
-rw-r--r--extra/mariabackup/backup_copy.cc4
-rw-r--r--extra/mariabackup/backup_mysql.cc6
-rw-r--r--extra/mariabackup/backup_mysql.h2
-rw-r--r--extra/mariabackup/xtrabackup.cc12
m---------libmariadb0
-rw-r--r--mysql-test/collections/buildbot_suites.bat1
-rwxr-xr-xmysql-test/mysql-test-run.pl17
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_datetime_ranges_mdev15289.result19
-rw-r--r--mysql-test/suite/binlog/t/binlog_stm_datetime_ranges_mdev15289.test7
-rw-r--r--mysql-test/suite/encryption/disabled.def1
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change2.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change4.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb-compressed-blob.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb-encryption-disable.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb-force-corrupt.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb-missing-key.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb-redo-badkey.result1
-rw-r--r--mysql-test/suite/encryption/r/innodb-redo-nokeys.result4
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption-page-compression.result14
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption_filekeys.result23
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change.test1
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change2.test1
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change4.test1
-rw-r--r--mysql-test/suite/encryption/t/innodb-compressed-blob.test1
-rw-r--r--mysql-test/suite/encryption/t/innodb-encryption-disable.test1
-rw-r--r--mysql-test/suite/encryption/t/innodb-force-corrupt.test1
-rw-r--r--mysql-test/suite/encryption/t/innodb-missing-key.test1
-rw-r--r--mysql-test/suite/encryption/t/innodb-redo-badkey.test1
-rw-r--r--mysql-test/suite/encryption/t/innodb-redo-nokeys.test4
-rw-r--r--mysql-test/suite/encryption/t/innodb_encryption-page-compression.test26
-rw-r--r--mysql-test/suite/encryption/t/innodb_encryption_filekeys.test31
-rw-r--r--mysql-test/suite/innodb/r/restart.result29
-rw-r--r--mysql-test/suite/innodb/t/restart.test80
-rw-r--r--mysql-test/suite/mariabackup/extra_lsndir.result2
-rw-r--r--mysql-test/suite/mariabackup/extra_lsndir.test9
-rw-r--r--mysql-test/suite/sql_sequence/grant.test4
-rw-r--r--mysql-test/suite/sql_sequence/mysqldump.result8
-rw-r--r--mysql-test/suite/sql_sequence/mysqldump.test11
-rw-r--r--mysql-test/suite/sql_sequence/rename.result6
-rw-r--r--mysql-test/suite/sql_sequence/rename.test6
-rw-r--r--mysql-test/suite/storage_engine/autoincrement.result20
-rw-r--r--mysql-test/suite/storage_engine/autoincrement.test10
-rw-r--r--mysql-test/suite/storage_engine/show_table_status.result6
-rw-r--r--mysql-test/suite/storage_engine/show_table_status.test2
-rw-r--r--mysql-test/suite/storage_engine/truncate_table.result16
-rw-r--r--mysql-test/suite/storage_engine/truncate_table.test8
-rw-r--r--mysql-test/suite/unit/suite.pm8
-rw-r--r--sql/item.cc2
-rw-r--r--sql/item.h15
-rw-r--r--sql/partition_info.cc5
-rw-r--r--sql/sql_sequence.cc2
-rw-r--r--storage/innobase/fil/fil0fil.cc3
-rw-r--r--storage/innobase/fsp/fsp0file.cc57
-rw-r--r--storage/innobase/handler/ha_innodb.cc4
-rw-r--r--storage/innobase/include/buf0buf.h2
-rw-r--r--storage/innobase/include/sync0types.h29
-rw-r--r--storage/innobase/include/trx0purge.h4
-rw-r--r--storage/innobase/srv/srv0conc.cc16
-rw-r--r--storage/innobase/srv/srv0srv.cc4
-rw-r--r--storage/mroonga/vendor/groonga/lib/CMakeLists.txt5
-rw-r--r--storage/myisammrg/mysql-test/storage_engine/autoincrement.rdiff30
-rw-r--r--storage/myisammrg/mysql-test/storage_engine/truncate_table.rdiff24
-rw-r--r--tests/mysql_client_test.c114
67 files changed, 549 insertions, 203 deletions
diff --git a/appveyor.yml b/appveyor.yml
index c17c0c3bb77..22939d496c9 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -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
diff --git a/cmake/bison.cmake b/cmake/bison.cmake
index 0e4a7b58a13..d825e407b22 100644
--- a/cmake/bison.cmake
+++ b/cmake/bison.cmake
@@ -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")
diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake
index 104c3899507..aa948a7f5b2 100644
--- a/cmake/os/Windows.cmake
+++ b/cmake/os/Windows.cmake
@@ -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
diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc
index 5c18098355f..1542e57c84c 100644
--- a/extra/mariabackup/backup_copy.cc
+++ b/extra/mariabackup/backup_copy.cc
@@ -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);
}
diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc
index 847ba4e60e0..415e95f9353 100644
--- a/extra/mariabackup/backup_mysql.cc
+++ b/extra/mariabackup/backup_mysql.cc
@@ -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;
}
diff --git a/extra/mariabackup/backup_mysql.h b/extra/mariabackup/backup_mysql.h
index 3ccd7bdb613..e2c56f88a8c 100644
--- a/extra/mariabackup/backup_mysql.h
+++ b/extra/mariabackup/backup_mysql.h
@@ -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();
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index c19f7204e20..8d9e48854a8 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -3514,7 +3514,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;
@@ -3570,7 +3576,9 @@ xtrabackup_backup_func()
if(innodb_init_param()) {
fail:
stop_backup_threads();
- innodb_shutdown();
+ if (fil_system) {
+ innodb_shutdown();
+ }
return(false);
}
diff --git a/libmariadb b/libmariadb
-Subproject 058fc080b4ee95bce405c182ae8d542576863f8
+Subproject 67cc3438a84df9fa3cc0cfbf9ed81242502702d
diff --git a/mysql-test/collections/buildbot_suites.bat b/mysql-test/collections/buildbot_suites.bat
index 8e468e297ed..6228199c793 100644
--- a/mysql-test/collections/buildbot_suites.bat
+++ b/mysql-test/collections/buildbot_suites.bat
@@ -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,^
versioning,^
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index dede5319739..a78cfbe4140 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -436,16 +436,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");
}
diff --git a/mysql-test/suite/binlog/r/binlog_stm_datetime_ranges_mdev15289.result b/mysql-test/suite/binlog/r/binlog_stm_datetime_ranges_mdev15289.result
new file mode 100644
index 00000000000..0c3e72133b8
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_stm_datetime_ranges_mdev15289.result
@@ -0,0 +1,19 @@
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # CREATE DATABASE IF NOT EXISTS client_test_db
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `client_test_db`; create or replace table t1 (t time, d date, dt datetime,ts timestamp)
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `client_test_db`; INSERT INTO t1 VALUES (TIMESTAMP'0000-00-00 00:00:00', TIMESTAMP'0000-00-00 00:00:00', TIMESTAMP'0000-00-00 00:00:00', TIMESTAMP'0000-00-00 00:00:00')
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `client_test_db`; INSERT INTO t1 VALUES (DATE'0000-00-00', DATE'0000-00-00', DATE'0000-00-00', DATE'0000-00-00')
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Query # # use `client_test_db`; INSERT INTO t1 VALUES (TIME'00:00:00', TIME'00:00:00', TIME'00:00:00', TIME'00:00:00')
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `client_test_db`; DROP TABLE `t1` /* generated by server */
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # DROP DATABASE IF EXISTS client_test_db
diff --git a/mysql-test/suite/binlog/t/binlog_stm_datetime_ranges_mdev15289.test b/mysql-test/suite/binlog/t/binlog_stm_datetime_ranges_mdev15289.test
new file mode 100644
index 00000000000..ae4cab62fec
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_stm_datetime_ranges_mdev15289.test
@@ -0,0 +1,7 @@
+--source include/not_embedded.inc
+--source include/have_binlog_format_statement.inc
+
+--exec $MYSQL_CLIENT_TEST test_datetime_ranges_mdev15289 > $MYSQLTEST_VARDIR/log/binlog_stm_datetime_ranges_mysql_client_test.out.log 2>&1
+
+--let $binlog_file = LAST
+source include/show_binlog_events.inc;
diff --git a/mysql-test/suite/encryption/disabled.def b/mysql-test/suite/encryption/disabled.def
index 9d9d1cd9df9..08f8bd8542b 100644
--- a/mysql-test/suite/encryption/disabled.def
+++ b/mysql-test/suite/encryption/disabled.def
@@ -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
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change.result b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
index 1c64ac9a6c3..4556ed3e205 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
@@ -2,6 +2,7 @@ call mtr.add_suppression("Plugin 'file_key_management' init function returned er
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` (has an unreadable root page|is corrupted)");
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;
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
index 087f76eda2d..3cc0de66de9 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
@@ -1,5 +1,6 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted|does not exist.*is trying to rename)");
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;
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
index 514a0aec051..b6300a81be7 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
@@ -1,5 +1,6 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted)");
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
diff --git a/mysql-test/suite/encryption/r/innodb-compressed-blob.result b/mysql-test/suite/encryption/r/innodb-compressed-blob.result
index bf43e1b30d6..e156266edc6 100644
--- a/mysql-test/suite/encryption/r/innodb-compressed-blob.result
+++ b/mysql-test/suite/encryption/r/innodb-compressed-blob.result
@@ -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;
diff --git a/mysql-test/suite/encryption/r/innodb-encryption-disable.result b/mysql-test/suite/encryption/r/innodb-encryption-disable.result
index 74570c92ae0..d8d37ba7493 100644
--- a/mysql-test/suite/encryption/r/innodb-encryption-disable.result
+++ b/mysql-test/suite/encryption/r/innodb-encryption-disable.result
@@ -1,5 +1,6 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t[15]` (has an unreadable root page|is corrupted)");
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,
diff --git a/mysql-test/suite/encryption/r/innodb-force-corrupt.result b/mysql-test/suite/encryption/r/innodb-force-corrupt.result
index d27136bf430..4c8ee2ef4de 100644
--- a/mysql-test/suite/encryption/r/innodb-force-corrupt.result
+++ b/mysql-test/suite/encryption/r/innodb-force-corrupt.result
@@ -1,5 +1,6 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)");
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
diff --git a/mysql-test/suite/encryption/r/innodb-missing-key.result b/mysql-test/suite/encryption/r/innodb-missing-key.result
index 2c5401ff681..32ae29ca76b 100644
--- a/mysql-test/suite/encryption/r/innodb-missing-key.result
+++ b/mysql-test/suite/encryption/r/innodb-missing-key.result
@@ -1,5 +1,6 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted)");
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;
diff --git a/mysql-test/suite/encryption/r/innodb-redo-badkey.result b/mysql-test/suite/encryption/r/innodb-redo-badkey.result
index f600b96f987..9104cac18da 100644
--- a/mysql-test/suite/encryption/r/innodb-redo-badkey.result
+++ b/mysql-test/suite/encryption/r/innodb-redo-badkey.result
@@ -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");
diff --git a/mysql-test/suite/encryption/r/innodb-redo-nokeys.result b/mysql-test/suite/encryption/r/innodb-redo-nokeys.result
index 530d228cc85..251ea73cd4c 100644
--- a/mysql-test/suite/encryption/r/innodb-redo-nokeys.result
+++ b/mysql-test/suite/encryption/r/innodb-redo-nokeys.result
@@ -1,10 +1,10 @@
-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=[1-9][0-9]*, page number=[0-9]+\\] in file test/t[1-4] 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_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;
diff --git a/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result b/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result
index fd2f03a5d18..5c646a4010d 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result
@@ -138,15 +138,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;
@@ -158,8 +152,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
@@ -167,8 +161,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;
diff --git a/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result b/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result
index 54cdf842b20..118da0635d9 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result
@@ -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;
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change.test b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
index a32d043dd3b..8c67d4fa44d 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
@@ -12,6 +12,7 @@ call mtr.add_suppression("Plugin 'file_key_management' init function returned er
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` (has an unreadable root page|is corrupted)");
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
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change2.test b/mysql-test/suite/encryption/t/innodb-bad-key-change2.test
index 8c1a8277a30..dd5faee6a98 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change2.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change2.test
@@ -10,6 +10,7 @@
#
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted|does not exist.*is trying to rename)");
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\\.");
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change4.test b/mysql-test/suite/encryption/t/innodb-bad-key-change4.test
index 30d417cfe93..9094ef5ae60 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change4.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change4.test
@@ -9,6 +9,7 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted)");
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");
diff --git a/mysql-test/suite/encryption/t/innodb-compressed-blob.test b/mysql-test/suite/encryption/t/innodb-compressed-blob.test
index 4f28f8e183d..695864db123 100644
--- a/mysql-test/suite/encryption/t/innodb-compressed-blob.test
+++ b/mysql-test/suite/encryption/t/innodb-compressed-blob.test
@@ -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
diff --git a/mysql-test/suite/encryption/t/innodb-encryption-disable.test b/mysql-test/suite/encryption/t/innodb-encryption-disable.test
index 0514ce70fb6..0994078788e 100644
--- a/mysql-test/suite/encryption/t/innodb-encryption-disable.test
+++ b/mysql-test/suite/encryption/t/innodb-encryption-disable.test
@@ -9,6 +9,7 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t[15]` (has an unreadable root page|is corrupted)");
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");
diff --git a/mysql-test/suite/encryption/t/innodb-force-corrupt.test b/mysql-test/suite/encryption/t/innodb-force-corrupt.test
index c23959801ca..2ec4960af4c 100644
--- a/mysql-test/suite/encryption/t/innodb-force-corrupt.test
+++ b/mysql-test/suite/encryption/t/innodb-force-corrupt.test
@@ -9,6 +9,7 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)");
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;
diff --git a/mysql-test/suite/encryption/t/innodb-missing-key.test b/mysql-test/suite/encryption/t/innodb-missing-key.test
index 2a56581601a..17059cc093d 100644
--- a/mysql-test/suite/encryption/t/innodb-missing-key.test
+++ b/mysql-test/suite/encryption/t/innodb-missing-key.test
@@ -9,6 +9,7 @@
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted)");
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
diff --git a/mysql-test/suite/encryption/t/innodb-redo-badkey.test b/mysql-test/suite/encryption/t/innodb-redo-badkey.test
index bc75ca190e7..513e8724586 100644
--- a/mysql-test/suite/encryption/t/innodb-redo-badkey.test
+++ b/mysql-test/suite/encryption/t/innodb-redo-badkey.test
@@ -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");
diff --git a/mysql-test/suite/encryption/t/innodb-redo-nokeys.test b/mysql-test/suite/encryption/t/innodb-redo-nokeys.test
index 5c344f5beb1..37565ab4827 100644
--- a/mysql-test/suite/encryption/t/innodb-redo-nokeys.test
+++ b/mysql-test/suite/encryption/t/innodb-redo-nokeys.test
@@ -3,13 +3,13 @@
# 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=[1-9][0-9]*, page number=[0-9]+\\] in file test/t[1-4] 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
diff --git a/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test b/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test
index 999ff4ff45a..a9e9a79cb06 100644
--- a/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test
+++ b/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test
@@ -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_file_per_table = ON;
SET GLOBAL innodb_encryption_threads = 4;
@@ -79,11 +76,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;
@@ -98,13 +97,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;
@@ -117,10 +118,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
diff --git a/mysql-test/suite/encryption/t/innodb_encryption_filekeys.test b/mysql-test/suite/encryption/t/innodb_encryption_filekeys.test
index 47d546ae698..a087635fc99 100644
--- a/mysql-test/suite/encryption/t/innodb_encryption_filekeys.test
+++ b/mysql-test/suite/encryption/t/innodb_encryption_filekeys.test
@@ -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;
diff --git a/mysql-test/suite/innodb/r/restart.result b/mysql-test/suite/innodb/r/restart.result
new file mode 100644
index 00000000000..c70adac3a55
--- /dev/null
+++ b/mysql-test/suite/innodb/r/restart.result
@@ -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;
diff --git a/mysql-test/suite/innodb/t/restart.test b/mysql-test/suite/innodb/t/restart.test
new file mode 100644
index 00000000000..2fd7ca244e5
--- /dev/null
+++ b/mysql-test/suite/innodb/t/restart.test
@@ -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;
diff --git a/mysql-test/suite/mariabackup/extra_lsndir.result b/mysql-test/suite/mariabackup/extra_lsndir.result
new file mode 100644
index 00000000000..a25c45a13d1
--- /dev/null
+++ b/mysql-test/suite/mariabackup/extra_lsndir.result
@@ -0,0 +1,2 @@
+xtrabackup_checkpoints
+xtrabackup_info
diff --git a/mysql-test/suite/mariabackup/extra_lsndir.test b/mysql-test/suite/mariabackup/extra_lsndir.test
new file mode 100644
index 00000000000..092ee34c6cc
--- /dev/null
+++ b/mysql-test/suite/mariabackup/extra_lsndir.test
@@ -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;
diff --git a/mysql-test/suite/sql_sequence/grant.test b/mysql-test/suite/sql_sequence/grant.test
index 790b876a831..3a911d79671 100644
--- a/mysql-test/suite/sql_sequence/grant.test
+++ b/mysql-test/suite/sql_sequence/grant.test
@@ -3,6 +3,10 @@
# Note that replication.test also does some grant testing
#
+# Grant tests not performed with embedded server
+-- source include/not_embedded.inc
+
+
SET @@SQL_MODE = REPLACE(@@SQL_MODE, 'NO_AUTO_CREATE_USER', '');
create database mysqltest_1;
use mysqltest_1;
diff --git a/mysql-test/suite/sql_sequence/mysqldump.result b/mysql-test/suite/sql_sequence/mysqldump.result
index 0067709db54..5a3711ebda3 100644
--- a/mysql-test/suite/sql_sequence/mysqldump.result
+++ b/mysql-test/suite/sql_sequence/mysqldump.result
@@ -39,3 +39,11 @@ CREATE TABLE `x1` (
/*!40101 SET character_set_client = @saved_cs_client */;
INSERT INTO `x1` VALUES (1,1,9223372036854775806,1,1,1000,0,0);
DROP TABLE a1,t1,x1;
+set default_storage_engine=InnoDB;
+create sequence t1;
+LOCK TABLES t1 READ;
+SELECT * FROM t1;
+next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
+1 1 9223372036854775806 1 1 1000 0 0
+unlock tables;
+drop table t1;
diff --git a/mysql-test/suite/sql_sequence/mysqldump.test b/mysql-test/suite/sql_sequence/mysqldump.test
index 8d5c2d0869d..308f06d5e8d 100644
--- a/mysql-test/suite/sql_sequence/mysqldump.test
+++ b/mysql-test/suite/sql_sequence/mysqldump.test
@@ -13,3 +13,14 @@ insert into t1 values (1),(2);
CREATE SEQUENCE x1 engine=innodb;
--exec $MYSQL_DUMP --compact test
DROP TABLE a1,t1,x1;
+
+#
+# MDEV-12887 UT_LIST_GET_LEN(trx->lock.trx_locks) == 0 when mysqldump sequence
+#
+
+set default_storage_engine=InnoDB;
+create sequence t1;
+LOCK TABLES t1 READ;
+SELECT * FROM t1;
+unlock tables;
+drop table t1;
diff --git a/mysql-test/suite/sql_sequence/rename.result b/mysql-test/suite/sql_sequence/rename.result
new file mode 100644
index 00000000000..26f529b57ef
--- /dev/null
+++ b/mysql-test/suite/sql_sequence/rename.result
@@ -0,0 +1,6 @@
+CREATE SEQUENCE seq1;
+RENAME TABLE seq1 TO seq2, seq3 TO seq4;
+ERROR 42S02: Table 'test.seq3' doesn't exist
+LOCK TABLE seq1 READ;
+UNLOCK TABLES;
+drop table seq1;
diff --git a/mysql-test/suite/sql_sequence/rename.test b/mysql-test/suite/sql_sequence/rename.test
new file mode 100644
index 00000000000..232a1bda5ea
--- /dev/null
+++ b/mysql-test/suite/sql_sequence/rename.test
@@ -0,0 +1,6 @@
+CREATE SEQUENCE seq1;
+--error ER_NO_SUCH_TABLE
+RENAME TABLE seq1 TO seq2, seq3 TO seq4;
+LOCK TABLE seq1 READ;
+UNLOCK TABLES;
+drop table seq1;
diff --git a/mysql-test/suite/storage_engine/autoincrement.result b/mysql-test/suite/storage_engine/autoincrement.result
index 44cb8650441..541486e44de 100644
--- a/mysql-test/suite/storage_engine/autoincrement.result
+++ b/mysql-test/suite/storage_engine/autoincrement.result
@@ -51,15 +51,15 @@ LAST_INSERT_ID()
5
SET sql_mode = '<INITIAL_SQL_MODE>';
SHOW TABLE STATUS FROM test LIKE 't1';
-Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 <STORAGE_ENGINE> # # # # # # # # 6 # # # # # # #
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+t1 <STORAGE_ENGINE> # # # # # # # # 6 # # # # # # # # N
INSERT INTO t1 (a,b) VALUES (6,'g'),(7,'h');
SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
5
SHOW TABLE STATUS FROM test LIKE 't1';
-Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 # # # # # # # # # 8 # # # # # # #
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+t1 # # # # # # # # # 8 # # # # # # # # N
INSERT INTO t1 (a,b) VALUES (NULL,'i'),(9,'j');
SELECT a,b FROM t1 ORDER BY a;
a b
@@ -77,12 +77,12 @@ SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
8
SHOW TABLE STATUS FROM test LIKE 't1';
-Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 # # # # # # # # # 10 # # # # # # #
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+t1 # # # # # # # # # 10 # # # # # # # # N
INSERT INTO t1 (a,b) VALUES (20,'k');
SHOW TABLE STATUS FROM test LIKE 't1';
-Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 # # # # # # # # # 21 # # # # # # #
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+t1 # # # # # # # # # 21 # # # # # # # # N
INSERT INTO t1 (a,b) VALUES (NULL,'l');
SELECT a,b FROM t1 ORDER BY a;
a b
@@ -102,8 +102,8 @@ SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
21
SHOW TABLE STATUS FROM test LIKE 't1';
-Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 # # # # # # # # # 22 # # # # # # #
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+t1 # # # # # # # # # 22 # # # # # # # # N
INSERT INTO t1 (a,b) VALUES (-5,'m');
SELECT a,b FROM t1 ORDER BY a;
a b
diff --git a/mysql-test/suite/storage_engine/autoincrement.test b/mysql-test/suite/storage_engine/autoincrement.test
index ddb0ab1b464..1ca0b650039 100644
--- a/mysql-test/suite/storage_engine/autoincrement.test
+++ b/mysql-test/suite/storage_engine/autoincrement.test
@@ -50,7 +50,7 @@ if (!$mysql_errname)
# SHOW TABLE STATUS shows the auto-increment value in column 11,
# that's all we need here and further
--source mask_engine.inc
- --replace_column 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 #
+ --replace_column 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # 19 #
SHOW TABLE STATUS FROM test LIKE 't1';
# Mix of automatic and explicit values
@@ -58,7 +58,7 @@ if (!$mysql_errname)
INSERT INTO t1 (a,b) VALUES (6,'g'),(7,'h');
SELECT LAST_INSERT_ID();
- --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 #
+ --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # 19 #
SHOW TABLE STATUS FROM test LIKE 't1';
@@ -66,21 +66,21 @@ if (!$mysql_errname)
SELECT a,b FROM t1 ORDER BY a;
SELECT LAST_INSERT_ID();
- --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 #
+ --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # 19 #
SHOW TABLE STATUS FROM test LIKE 't1';
# Creating a gap in the sequence
INSERT INTO t1 (a,b) VALUES (20,'k');
- --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 #
+ --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # 19 #
SHOW TABLE STATUS FROM test LIKE 't1';
INSERT INTO t1 (a,b) VALUES (NULL,'l');
SELECT a,b FROM t1 ORDER BY a;
SELECT LAST_INSERT_ID();
- --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 #
+ --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # 19 #
SHOW TABLE STATUS FROM test LIKE 't1';
# Negative values: we will try to insert one just to check that it does not cause a crash,
diff --git a/mysql-test/suite/storage_engine/show_table_status.result b/mysql-test/suite/storage_engine/show_table_status.result
index 98de48f816b..b020bbe6a00 100644
--- a/mysql-test/suite/storage_engine/show_table_status.result
+++ b/mysql-test/suite/storage_engine/show_table_status.result
@@ -23,6 +23,8 @@ Collation latin1_swedish_ci
Checksum NULL
Create_options
Comment
+Max_index_length ###
+Temporary N
Name t2
Engine <STORAGE_ENGINE>
Version 10
@@ -41,6 +43,8 @@ Collation latin1_swedish_ci
Checksum NULL
Create_options
Comment
+Max_index_length ###
+Temporary N
Name t3
Engine <STORAGE_ENGINE>
Version 10
@@ -59,4 +63,6 @@ Collation utf8_general_ci
Checksum NULL
Create_options
Comment
+Max_index_length ###
+Temporary N
DROP TABLE t1, t2, t3;
diff --git a/mysql-test/suite/storage_engine/show_table_status.test b/mysql-test/suite/storage_engine/show_table_status.test
index 469d7e33a20..2fd5c6a706a 100644
--- a/mysql-test/suite/storage_engine/show_table_status.test
+++ b/mysql-test/suite/storage_engine/show_table_status.test
@@ -22,7 +22,7 @@ INSERT INTO t2 (a,b) VALUES (1,'bar');
--let $table_options = CHARACTER SET utf8
--source create_table.inc
---replace_column 2 <STORAGE_ENGINE> 4 ### 6 ### 7 ### 8 ### 9 ### 10 ### 12 ### 13 ###
+--replace_column 2 <STORAGE_ENGINE> 4 ### 6 ### 7 ### 8 ### 9 ### 10 ### 12 ### 13 ### 19 ###
--query_vertical SHOW TABLE STATUS WHERE name IN ( 't1', 't2', 't3' )
DROP TABLE t1, t2, t3;
diff --git a/mysql-test/suite/storage_engine/truncate_table.result b/mysql-test/suite/storage_engine/truncate_table.result
index d8dc5046442..eac58272e48 100644
--- a/mysql-test/suite/storage_engine/truncate_table.result
+++ b/mysql-test/suite/storage_engine/truncate_table.result
@@ -8,20 +8,20 @@ a b
DROP TABLE t1;
CREATE TABLE t1 (a <INT_COLUMN> KEY AUTO_INCREMENT, c <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
SHOW TABLE STATUS LIKE 't1';
-Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 # # # # # # # # # 1 # # # # # # #
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+t1 # # # # # # # # # 1 # # # # # # # # N
INSERT INTO t1 (c) VALUES ('a'),('b'),('c');
SHOW TABLE STATUS LIKE 't1';
-Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 # # # # # # # # # 4 # # # # # # #
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+t1 # # # # # # # # # 4 # # # # # # # # N
TRUNCATE TABLE t1;
SHOW TABLE STATUS LIKE 't1';
-Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 # # # # # # # # # 1 # # # # # # #
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+t1 # # # # # # # # # 1 # # # # # # # # N
INSERT INTO t1 (c) VALUES ('d');
SHOW TABLE STATUS LIKE 't1';
-Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 # # # # # # # # # 2 # # # # # # #
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+t1 # # # # # # # # # 2 # # # # # # # # N
SELECT a,c FROM t1;
a c
1 d
diff --git a/mysql-test/suite/storage_engine/truncate_table.test b/mysql-test/suite/storage_engine/truncate_table.test
index a9277b39619..6a6301f4be0 100644
--- a/mysql-test/suite/storage_engine/truncate_table.test
+++ b/mysql-test/suite/storage_engine/truncate_table.test
@@ -36,19 +36,19 @@ if ($mysql_errname)
}
if (!$mysql_errname)
{
- --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 #
+ --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # 19 #
SHOW TABLE STATUS LIKE 't1';
INSERT INTO t1 (c) VALUES ('a'),('b'),('c');
- --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 #
+ --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # 19 #
SHOW TABLE STATUS LIKE 't1';
TRUNCATE TABLE t1;
- --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 #
+ --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # 19 #
SHOW TABLE STATUS LIKE 't1';
INSERT INTO t1 (c) VALUES ('d');
- --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 #
+ --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # 19 #
SHOW TABLE STATUS LIKE 't1';
SELECT a,c FROM t1;
diff --git a/mysql-test/suite/unit/suite.pm b/mysql-test/suite/unit/suite.pm
index 4a46272f041..c92363a8601 100644
--- a/mysql-test/suite/unit/suite.pm
+++ b/mysql-test/suite/unit/suite.pm
@@ -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 } };
diff --git a/sql/item.cc b/sql/item.cc
index 85a71f5bb59..34d5d810ff9 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -4217,7 +4217,7 @@ void Item_param::set_time(MYSQL_TIME *tm, timestamp_type time_type,
ErrConvTime str(&value.time);
make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN,
&str, time_type, 0);
- set_zero_time(&value.time, MYSQL_TIMESTAMP_ERROR);
+ set_zero_time(&value.time, time_type);
}
maybe_null= 0;
null_value= 0;
diff --git a/sql/item.h b/sql/item.h
index 648ff39d54a..8f2c11eb578 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -4205,13 +4205,14 @@ public:
Constructor for Item_date_literal.
@param ltime DATE value.
*/
- Item_temporal_literal(THD *thd, MYSQL_TIME *ltime): Item_basic_constant(thd)
+ Item_temporal_literal(THD *thd, const MYSQL_TIME *ltime)
+ :Item_basic_constant(thd)
{
collation.set(&my_charset_numeric, DERIVATION_NUMERIC, MY_REPERTOIRE_ASCII);
decimals= 0;
cached_time= *ltime;
}
- Item_temporal_literal(THD *thd, MYSQL_TIME *ltime, uint dec_arg):
+ Item_temporal_literal(THD *thd, const MYSQL_TIME *ltime, uint dec_arg):
Item_basic_constant(thd)
{
collation.set(&my_charset_numeric, DERIVATION_NUMERIC, MY_REPERTOIRE_ASCII);
@@ -4254,7 +4255,7 @@ public:
class Item_date_literal: public Item_temporal_literal
{
public:
- Item_date_literal(THD *thd, MYSQL_TIME *ltime)
+ Item_date_literal(THD *thd, const MYSQL_TIME *ltime)
:Item_temporal_literal(thd, ltime)
{
max_length= MAX_DATE_WIDTH;
@@ -4283,7 +4284,7 @@ public:
class Item_time_literal: public Item_temporal_literal
{
public:
- Item_time_literal(THD *thd, MYSQL_TIME *ltime, uint dec_arg):
+ Item_time_literal(THD *thd, const MYSQL_TIME *ltime, uint dec_arg):
Item_temporal_literal(thd, ltime, dec_arg)
{
max_length= MIN_TIME_WIDTH + (decimals ? decimals + 1 : 0);
@@ -4304,7 +4305,7 @@ public:
class Item_datetime_literal: public Item_temporal_literal
{
public:
- Item_datetime_literal(THD *thd, MYSQL_TIME *ltime, uint dec_arg= 0):
+ Item_datetime_literal(THD *thd, const MYSQL_TIME *ltime, uint dec_arg):
Item_temporal_literal(thd, ltime, dec_arg)
{
max_length= MAX_DATETIME_WIDTH + (decimals ? decimals + 1 : 0);
@@ -4350,7 +4351,7 @@ class Item_date_literal_for_invalid_dates: public Item_date_literal
in sql_mode=TRADITIONAL.
*/
public:
- Item_date_literal_for_invalid_dates(THD *thd, MYSQL_TIME *ltime)
+ Item_date_literal_for_invalid_dates(THD *thd, const MYSQL_TIME *ltime)
:Item_date_literal(thd, ltime) { }
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
{
@@ -4368,7 +4369,7 @@ class Item_datetime_literal_for_invalid_dates: public Item_datetime_literal
{
public:
Item_datetime_literal_for_invalid_dates(THD *thd,
- MYSQL_TIME *ltime, uint dec_arg)
+ const MYSQL_TIME *ltime, uint dec_arg)
:Item_datetime_literal(thd, ltime, dec_arg) { }
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
{
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index 5939da09eae..a60ca28044f 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2006, 2015, Oracle and/or its affiliates.
- Copyright (c) 2010, 2015, MariaDB
+ Copyright (c) 2010, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -957,7 +957,8 @@ bool partition_info::vers_set_expression(THD *thd, partition_element *el, MYSQL_
col_val->fixed= 1;
continue;
}
- Item *item_expression= new (thd->mem_root) Item_datetime_literal(thd, &t);
+ Item *item_expression= new (thd->mem_root)
+ Item_datetime_literal(thd, &t, 0);
if (!item_expression)
return true;
/* We initialize col_val with bogus max value to make fix_partition_func() and check_range_constants() happy.
diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc
index de7ec26eebb..0f8f7dbefb7 100644
--- a/sql/sql_sequence.cc
+++ b/sql/sql_sequence.cc
@@ -440,7 +440,7 @@ int SEQUENCE::read_initial_values(TABLE *table)
DBUG_ASSERT(table->reginfo.lock_type == TL_READ);
if (!(error= read_stored_values(table)))
initialized= SEQ_READY_TO_USE;
- mysql_unlock_tables(thd, lock, 0);
+ mysql_unlock_tables(thd, lock);
if (mdl_lock_used)
thd->mdl_context.release_lock(mdl_request.ticket);
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc
index ac0ea7358f6..b66ad9a86cf 100644
--- a/storage/innobase/fil/fil0fil.cc
+++ b/storage/innobase/fil/fil0fil.cc
@@ -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();
diff --git a/storage/innobase/fsp/fsp0file.cc b/storage/innobase/fsp/fsp0file.cc
index eaadaad851d..6e9f307ebc8 100644
--- a/storage/innobase/fsp/fsp0file.cc
+++ b/storage/innobase/fsp/fsp0file.cc
@@ -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;
}
}
- const page_size_t page_size(m_flags);
-
- if (error_txt != NULL) {
+ if (!fsp_flags_is_valid(m_flags, m_space_id)) {
+ /* Tablespace flags must be valid. */
+ error_txt = "Tablespace flags are invalid";
+ goto err_exit;
+ }
- /* skip the next few tests */
- } else if (univ_page_size.logical() != page_size.logical()) {
+ const page_size_t page_size(m_flags);
+ 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) {
+ }
+ 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;
+ }
- } else if (m_space_id == ULINT_UNDEFINED) {
-
+ 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;
+ }
- } else if (buf_page_is_corrupted(false, m_first_page, page_size)) {
-
+ 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;
-
- free_first_page();
-
- return(DB_CORRUPTION);
-
+ goto err_exit;
}
if (fil_space_read_name_and_filepath(
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index f7fde2794e8..9ab36a97fba 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -14830,7 +14830,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);
@@ -14839,7 +14839,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);
diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
index 4a54c30629b..063eb6b6fab 100644
--- a/storage/innobase/include/buf0buf.h
+++ b/storage/innobase/include/buf0buf.h
@@ -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 */
diff --git a/storage/innobase/include/sync0types.h b/storage/innobase/include/sync0types.h
index 695f17b6d1c..e4fc24a7ede 100644
--- a/storage/innobase/include/sync0types.h
+++ b/storage/innobase/include/sync0types.h
@@ -1154,9 +1154,30 @@ 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_storelint(A,B) my_atomic_store64((int64*) (A), (B))
+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);
+}
#else
#define my_atomic_addlint my_atomic_addlong
#define my_atomic_loadlint my_atomic_loadlong
@@ -1186,7 +1207,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)
diff --git a/storage/innobase/include/trx0purge.h b/storage/innobase/include/trx0purge.h
index 33f46b32a7d..b78507c96c1 100644
--- a/storage/innobase/include/trx0purge.h
+++ b/storage/innobase/include/trx0purge.h
@@ -511,9 +511,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
diff --git a/storage/innobase/srv/srv0conc.cc b/storage/innobase/srv/srv0conc.cc
index 9f589b57d9c..a1ffa8986a8 100644
--- a/storage/innobase/srv/srv0conc.cc
+++ b/storage/innobase/srv/srv0conc.cc
@@ -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;
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index fe449dd00df..0e7590d3539 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -2539,8 +2539,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
diff --git a/storage/mroonga/vendor/groonga/lib/CMakeLists.txt b/storage/mroonga/vendor/groonga/lib/CMakeLists.txt
index 6765261feb7..2274e95aa24 100644
--- a/storage/mroonga/vendor/groonga/lib/CMakeLists.txt
+++ b/storage/mroonga/vendor/groonga/lib/CMakeLists.txt
@@ -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()
diff --git a/storage/myisammrg/mysql-test/storage_engine/autoincrement.rdiff b/storage/myisammrg/mysql-test/storage_engine/autoincrement.rdiff
index 68264bdeb8d..cc04b800793 100644
--- a/storage/myisammrg/mysql-test/storage_engine/autoincrement.rdiff
+++ b/storage/myisammrg/mysql-test/storage_engine/autoincrement.rdiff
@@ -12,40 +12,40 @@
@@ -52,14 +52,14 @@
SET sql_mode = '<INITIAL_SQL_MODE>';
SHOW TABLE STATUS FROM test LIKE 't1';
- Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
--t1 <STORAGE_ENGINE> # # # # # # # # 6 # # # # # # #
-+t1 <STORAGE_ENGINE> # # # # # # # # 0 # # # # # # #
+ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+-t1 <STORAGE_ENGINE> # # # # # # # # 6 # # # # # # # # N
++t1 <STORAGE_ENGINE> # # # # # # # # 0 # # # # # # # # N
INSERT INTO t1 (a,b) VALUES (6,'g'),(7,'h');
SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
5
SHOW TABLE STATUS FROM test LIKE 't1';
- Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
--t1 # # # # # # # # # 8 # # # # # # #
-+t1 # # # # # # # # # 0 # # # # # # #
+ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+-t1 # # # # # # # # # 8 # # # # # # # # N
++t1 # # # # # # # # # 0 # # # # # # # # N
INSERT INTO t1 (a,b) VALUES (NULL,'i'),(9,'j');
SELECT a,b FROM t1 ORDER BY a;
a b
@@ -78,11 +78,11 @@
8
SHOW TABLE STATUS FROM test LIKE 't1';
- Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
--t1 # # # # # # # # # 10 # # # # # # #
-+t1 # # # # # # # # # 0 # # # # # # #
+ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+-t1 # # # # # # # # # 10 # # # # # # # # N
++t1 # # # # # # # # # 0 # # # # # # # # N
INSERT INTO t1 (a,b) VALUES (20,'k');
SHOW TABLE STATUS FROM test LIKE 't1';
- Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
--t1 # # # # # # # # # 21 # # # # # # #
-+t1 # # # # # # # # # 0 # # # # # # #
+ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+-t1 # # # # # # # # # 21 # # # # # # # # N
++t1 # # # # # # # # # 0 # # # # # # # # N
INSERT INTO t1 (a,b) VALUES (NULL,'l');
SELECT a,b FROM t1 ORDER BY a;
a b
@@ -103,7 +103,7 @@
21
SHOW TABLE STATUS FROM test LIKE 't1';
- Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
--t1 # # # # # # # # # 22 # # # # # # #
-+t1 # # # # # # # # # 0 # # # # # # #
+ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+-t1 # # # # # # # # # 22 # # # # # # # # N
++t1 # # # # # # # # # 0 # # # # # # # # N
INSERT INTO t1 (a,b) VALUES (-5,'m');
SELECT a,b FROM t1 ORDER BY a;
a b
diff --git a/storage/myisammrg/mysql-test/storage_engine/truncate_table.rdiff b/storage/myisammrg/mysql-test/storage_engine/truncate_table.rdiff
index bb2e5585910..e429bbdb177 100644
--- a/storage/myisammrg/mysql-test/storage_engine/truncate_table.rdiff
+++ b/storage/myisammrg/mysql-test/storage_engine/truncate_table.rdiff
@@ -3,24 +3,24 @@
@@ -9,19 +9,19 @@
CREATE TABLE t1 (a <INT_COLUMN> KEY AUTO_INCREMENT, c <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
SHOW TABLE STATUS LIKE 't1';
- Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
--t1 # # # # # # # # # 1 # # # # # # #
-+t1 # # # # # # # # # 0 # # # # # # #
+ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+-t1 # # # # # # # # # 1 # # # # # # # # N
++t1 # # # # # # # # # 0 # # # # # # # # N
INSERT INTO t1 (c) VALUES ('a'),('b'),('c');
SHOW TABLE STATUS LIKE 't1';
- Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
--t1 # # # # # # # # # 4 # # # # # # #
-+t1 # # # # # # # # # 0 # # # # # # #
+ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+-t1 # # # # # # # # # 4 # # # # # # # # N
++t1 # # # # # # # # # 0 # # # # # # # # N
TRUNCATE TABLE t1;
SHOW TABLE STATUS LIKE 't1';
- Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
--t1 # # # # # # # # # 1 # # # # # # #
-+t1 # # # # # # # # # 0 # # # # # # #
+ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+-t1 # # # # # # # # # 1 # # # # # # # # N
++t1 # # # # # # # # # 0 # # # # # # # # N
INSERT INTO t1 (c) VALUES ('d');
SHOW TABLE STATUS LIKE 't1';
- Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
--t1 # # # # # # # # # 2 # # # # # # #
-+t1 # # # # # # # # # 0 # # # # # # #
+ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
+-t1 # # # # # # # # # 2 # # # # # # # # N
++t1 # # # # # # # # # 0 # # # # # # # # N
SELECT a,c FROM t1;
a c
1 d
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 46b0d86bf30..23dc458f97a 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -12409,6 +12409,119 @@ static void test_datetime_ranges()
}
+/*
+ This test is used in:
+ mysql-test/suite/binlog/binlog_stm_datetime_ranges_mdev15289.test
+*/
+static void test_datetime_ranges_mdev15289()
+{
+ const char *stmt_text;
+ int rc, i;
+ MYSQL_STMT *stmt;
+ MYSQL_BIND my_bind[4];
+ MYSQL_TIME tm[4];
+
+ myheader("test_datetime_ranges_mdev15289");
+
+ stmt_text= "SET sql_mode=''";
+ rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
+ myquery(rc);
+
+ stmt_text= "create or replace table t1 "
+ "(t time, d date, dt datetime,ts timestamp)";
+ rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
+ myquery(rc);
+
+ stmt= mysql_simple_prepare(mysql, "INSERT INTO t1 VALUES (?, ?, ?, ?)");
+ check_stmt(stmt);
+ verify_param_count(stmt, 4);
+
+ /*** Testing DATETIME ***/
+ bzero((char*) my_bind, sizeof(my_bind));
+ for (i= 0; i < 4; i++)
+ {
+ my_bind[i].buffer_type= MYSQL_TYPE_DATETIME;
+ my_bind[i].buffer= &tm[i];
+ }
+ rc= mysql_stmt_bind_param(stmt, my_bind);
+ check_execute(stmt, rc);
+
+ /* Notice bad year */
+ tm[0].year= 20010; tm[0].month= 1; tm[0].day= 2;
+ tm[0].hour= 03; tm[0].minute= 04; tm[0].second= 05;
+ tm[0].second_part= 0; tm[0].neg= 0;
+ tm[0].time_type= MYSQL_TIMESTAMP_DATETIME;
+ tm[3]= tm[2]= tm[1]= tm[0];
+
+ rc= mysql_stmt_execute(stmt);
+ check_execute(stmt, rc);
+ my_process_warnings(mysql, 4);
+
+ verify_col_data("t1", "t", "00:00:00");
+ verify_col_data("t1", "d", "0000-00-00");
+ verify_col_data("t1", "dt", "0000-00-00 00:00:00");
+ verify_col_data("t1", "ts", "0000-00-00 00:00:00");
+
+ /*** Testing DATE ***/
+ bzero((char*) my_bind, sizeof(my_bind));
+ for (i= 0; i < 4; i++)
+ {
+ my_bind[i].buffer_type= MYSQL_TYPE_DATE;
+ my_bind[i].buffer= &tm[i];
+ }
+ rc= mysql_stmt_bind_param(stmt, my_bind);
+ check_execute(stmt, rc);
+
+ /* Notice bad year */
+ tm[0].year= 20010; tm[0].month= 1; tm[0].day= 2;
+ tm[0].hour= 00; tm[0].minute= 00; tm[0].second= 00;
+ tm[0].second_part= 0; tm[0].neg= 0;
+ tm[0].time_type= MYSQL_TIMESTAMP_DATE;
+ tm[3]= tm[2]= tm[1]= tm[0];
+
+ rc= mysql_stmt_execute(stmt);
+ check_execute(stmt, rc);
+ my_process_warnings(mysql, 4);
+
+ verify_col_data("t1", "t", "00:00:00");
+ verify_col_data("t1", "d", "0000-00-00");
+ verify_col_data("t1", "dt", "0000-00-00 00:00:00");
+ verify_col_data("t1", "ts", "0000-00-00 00:00:00");
+
+ /*** Testing TIME ***/
+ bzero((char*) my_bind, sizeof(my_bind));
+ for (i= 0; i < 4; i++)
+ {
+ my_bind[i].buffer_type= MYSQL_TYPE_TIME;
+ my_bind[i].buffer= &tm[i];
+ }
+ rc= mysql_stmt_bind_param(stmt, my_bind);
+ check_execute(stmt, rc);
+
+ /* Notice bad hour */
+ tm[0].year= 0; tm[0].month= 0; tm[0].day= 0;
+ tm[0].hour= 100; tm[0].minute= 64; tm[0].second= 05;
+ tm[0].second_part= 0; tm[0].neg= 0;
+ tm[0].time_type= MYSQL_TIMESTAMP_TIME;
+ tm[3]= tm[2]= tm[1]= tm[0];
+
+ rc= mysql_stmt_execute(stmt);
+ check_execute(stmt, rc);
+ my_process_warnings(mysql, 4);
+
+ verify_col_data("t1", "t", "00:00:00");
+ verify_col_data("t1", "d", "0000-00-00");
+ verify_col_data("t1", "dt", "0000-00-00 00:00:00");
+ verify_col_data("t1", "ts", "0000-00-00 00:00:00");
+
+ mysql_stmt_close(stmt);
+
+ stmt_text= "drop table t1";
+ rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
+ myquery(rc);
+}
+
+
static void test_bug4172()
{
MYSQL_STMT *stmt;
@@ -20269,6 +20382,7 @@ static struct my_tests_st my_tests[]= {
{ "test_bug6081", test_bug6081 },
{ "test_bug6096", test_bug6096 },
{ "test_datetime_ranges", test_datetime_ranges },
+ { "test_datetime_ranges_mdev15289", test_datetime_ranges_mdev15289 },
{ "test_bug4172", test_bug4172 },
{ "test_conversion", test_conversion },
{ "test_rewind", test_rewind },