Merge InnoDB 5.7 from mysql-5.7.9.

Contains also

MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7

	The failure happened because 5.7 has changed the signature of
	the bool handler::primary_key_is_clustered() const
	virtual function ("const" was added). InnoDB was using the old
	signature which caused the function not to be used.

MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7

	Fixed mutexing problem on lock_trx_handle_wait. Note that
	rpl_parallel and rpl_optimistic_parallel tests still
	fail.

MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan)
  Reason: incorrect merge

MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan)
  Reason: incorrect merge
This commit is contained in:
Jan Lindström 2016-08-12 11:17:45 +03:00
parent 848d211c5c
commit 2e814d4702
835 changed files with 174739 additions and 84445 deletions

View file

@ -170,7 +170,7 @@ debug_cflags="-DEXTRA_DEBUG -DSAFE_MUTEX -DSAFEMALLOC"
error_inject="--with-error-inject "
#
# Base C++ flags for all builds
base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti"
base_cxxflags="-felide-constructors -fexceptions -fno-rtti"
#
# Flags for optimizing builds.
# Be as fast as we can be without losing our ability to backtrace.

View file

@ -56,7 +56,7 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
# MySQL "canonical" GCC flags. At least -fno-rtti flag affects
# ABI and cannot be simply removed.
SET(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti")
"${CMAKE_CXX_FLAGS} -fno-rtti")
IF (CMAKE_EXE_LINKER_FLAGS MATCHES " -static "
OR CMAKE_EXE_LINKER_FLAGS MATCHES " -static$")

View file

@ -77,7 +77,9 @@ IF(WITH_INNOBASE_STORAGE_ENGINE OR WITH_XTRADB_STORAGE_ENGINE)
../storage/innobase/buf/buf0checksum.cc
../storage/innobase/ut/ut0crc32.cc
../storage/innobase/ut/ut0ut.cc
../storage/innobase/buf/buf0buf.cc
../storage/innobase/page/page0zip.cc
../storage/innobase/os/os0file.cc
)
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")

File diff suppressed because it is too large Load diff

32
include/dur_prop.h Normal file
View file

@ -0,0 +1,32 @@
/* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
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
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef _my_dur_prop_h
#define _my_dur_prop_h
enum durability_properties
{
/*
Preserves the durability properties defined by the engine
*/
HA_REGULAR_DURABILITY= 0,
/*
Ignore the durability properties defined by the engine and
write only in-memory entries.
*/
HA_IGNORE_DURABILITY= 1
};
#endif /* _my_dur_prop_h */

48
include/my_icp.h Normal file
View file

@ -0,0 +1,48 @@
/* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
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
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
#ifndef _my_icp_h
#define _my_icp_h
#ifdef __cplusplus
extern "C" {
#endif
/**
Values returned by index_cond_func_xxx functions.
*/
typedef enum icp_result {
/** Index tuple doesn't satisfy the pushed index condition (the engine
should discard the tuple and go to the next one) */
ICP_NO_MATCH,
/** Index tuple satisfies the pushed index condition (the engine should
fetch and return the record) */
ICP_MATCH,
/** Index tuple is out of the range that we're scanning, e.g. if we're
scanning "t.key BETWEEN 10 AND 20" and got a "t.key=21" tuple (the engine
should stop scanning and return HA_ERR_END_OF_FILE right away). */
ICP_OUT_OF_RANGE
} ICP_RESULT;
#ifdef __cplusplus
}
#endif
#endif /* _my_icp_h */

View file

@ -0,0 +1,147 @@
/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
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
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
#ifndef MYSQL_PSI_BASE_H
#define MYSQL_PSI_BASE_H
#ifdef __cplusplus
extern "C" {
#endif
/**
@file mysql/psi/psi_base.h
Performance schema instrumentation interface.
@defgroup Instrumentation_interface Instrumentation Interface
@ingroup Performance_schema
@{
*/
#define PSI_INSTRUMENT_ME 0
#define PSI_NOT_INSTRUMENTED 0
/**
Global flag.
This flag indicate that an instrumentation point is a global variable,
or a singleton.
*/
#define PSI_FLAG_GLOBAL (1 << 0)
/**
Mutable flag.
This flag indicate that an instrumentation point is a general placeholder,
that can mutate into a more specific instrumentation point.
*/
#define PSI_FLAG_MUTABLE (1 << 1)
#define PSI_FLAG_THREAD (1 << 2)
/**
Stage progress flag.
This flag apply to the stage instruments only.
It indicates the instrumentation provides progress data.
*/
#define PSI_FLAG_STAGE_PROGRESS (1 << 3)
/**
Shared Exclusive flag.
Indicates that rwlock support the shared exclusive state.
*/
#define PSI_RWLOCK_FLAG_SX (1 << 4)
/**
Transferable flag.
This flag indicate that an instrumented object can
be created by a thread and destroyed by another thread.
*/
#define PSI_FLAG_TRANSFER (1 << 5)
#ifdef HAVE_PSI_INTERFACE
/**
@def PSI_VERSION_1
Performance Schema Interface number for version 1.
This version is supported.
*/
#define PSI_VERSION_1 1
/**
@def PSI_VERSION_2
Performance Schema Interface number for version 2.
This version is not implemented, it's a placeholder.
*/
#define PSI_VERSION_2 2
/**
@def PSI_CURRENT_VERSION
Performance Schema Interface number for the most recent version.
The most current version is @c PSI_VERSION_1
*/
#define PSI_CURRENT_VERSION 1
/**
@def USE_PSI_1
Define USE_PSI_1 to use the interface version 1.
*/
/**
@def USE_PSI_2
Define USE_PSI_2 to use the interface version 2.
*/
/**
@def HAVE_PSI_1
Define HAVE_PSI_1 if the interface version 1 needs to be compiled in.
*/
/**
@def HAVE_PSI_2
Define HAVE_PSI_2 if the interface version 2 needs to be compiled in.
*/
#ifndef USE_PSI_2
#ifndef USE_PSI_1
#define USE_PSI_1
#endif
#endif
#ifdef USE_PSI_1
#define HAVE_PSI_1
#endif
#ifdef USE_PSI_2
#define HAVE_PSI_2
#endif
/*
Allow to override PSI_XXX_CALL at compile time
with more efficient implementations, if available.
If nothing better is available,
make a dynamic call using the PSI_server function pointer.
*/
#define PSI_DYNAMIC_CALL(M) PSI_server->M
#endif /* HAVE_PSI_INTERFACE */
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* MYSQL_PSI_BASE_H */

View file

@ -0,0 +1,155 @@
/* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
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
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
#ifndef MYSQL_PSI_MEMORY_H
#define MYSQL_PSI_MEMORY_H
#include "psi_base.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
@file mysql/psi/psi_memory.h
Performance schema instrumentation interface.
@defgroup Instrumentation_interface Instrumentation Interface
@ingroup Performance_schema
@{
*/
#ifdef HAVE_PSI_INTERFACE
#ifndef DISABLE_ALL_PSI
#ifndef DISABLE_PSI_MEMORY
#define HAVE_PSI_MEMORY_INTERFACE
#endif /* DISABLE_PSI_MEMORY */
#endif /* DISABLE_ALL_PSI */
#endif /* HAVE_PSI_INTERFACE */
struct PSI_thread;
/**
Instrumented memory key.
To instrument memory, a memory key must be obtained using @c register_memory.
Using a zero key always disable the instrumentation.
*/
typedef unsigned int PSI_memory_key;
#ifdef HAVE_PSI_1
/**
@defgroup Group_PSI_v1 Application Binary Interface, version 1
@ingroup Instrumentation_interface
@{
*/
/**
Memory instrument information.
@since PSI_VERSION_1
This structure is used to register instrumented memory.
*/
struct PSI_memory_info_v1
{
/** Pointer to the key assigned to the registered memory. */
PSI_memory_key *m_key;
/** The name of the memory instrument to register. */
const char *m_name;
/**
The flags of the socket instrument to register.
@sa PSI_FLAG_GLOBAL
*/
int m_flags;
};
typedef struct PSI_memory_info_v1 PSI_memory_info_v1;
/**
Memory registration API.
@param category a category name (typically a plugin name)
@param info an array of memory info to register
@param count the size of the info array
*/
typedef void (*register_memory_v1_t)
(const char *category, struct PSI_memory_info_v1 *info, int count);
/**
Instrument memory allocation.
@param key the memory instrument key
@param size the size of memory allocated
@param[out] owner the memory owner
@return the effective memory instrument key
*/
typedef PSI_memory_key (*memory_alloc_v1_t)
(PSI_memory_key key, size_t size, struct PSI_thread ** owner);
/**
Instrument memory re allocation.
@param key the memory instrument key
@param old_size the size of memory previously allocated
@param new_size the size of memory re allocated
@param[in, out] owner the memory owner
@return the effective memory instrument key
*/
typedef PSI_memory_key (*memory_realloc_v1_t)
(PSI_memory_key key, size_t old_size, size_t new_size, struct PSI_thread ** owner);
/**
Instrument memory claim.
@param key the memory instrument key
@param size the size of memory allocated
@param[in, out] owner the memory owner
@return the effective memory instrument key
*/
typedef PSI_memory_key (*memory_claim_v1_t)
(PSI_memory_key key, size_t size, struct PSI_thread ** owner);
/**
Instrument memory free.
@param key the memory instrument key
@param size the size of memory allocated
@param owner the memory owner
*/
typedef void (*memory_free_v1_t)
(PSI_memory_key key, size_t size, struct PSI_thread * owner);
/** @} (end of group Group_PSI_v1) */
#endif /* HAVE_PSI_1 */
#ifdef HAVE_PSI_2
struct PSI_memory_info_v2
{
int placeholder;
};
#endif /* HAVE_PSI_2 */
#ifdef USE_PSI_1
typedef struct PSI_memory_info_v1 PSI_memory_info;
#endif
#ifdef USE_PSI_2
typedef struct PSI_memory_info_v2 PSI_memory_info;
#endif
/** @} (end of group Instrumentation_interface) */
#ifdef __cplusplus
}
#endif
#endif /* MYSQL_PSI_MEMORY_H */

View file

@ -22,3 +22,7 @@ innodb-wl5522-debug-zip : broken upstream
innodb_bug12902967 : broken upstream
file_contents : MDEV-6526 these files are not installed anymore
max_statement_time : cannot possibly work, depends on timing
implicit_commit : MDEV-10549
lock_sync : MDEV-10548
innodb_mysql_sync : MDEV-10548
partition_debug_sync : MDEV-10548

View file

@ -0,0 +1,5 @@
--let $_server_id= `SELECT @@server_id`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
# There should be a debug crash after using this .inc file
--exec echo "wait" > $_expect_file_name

View file

@ -1,4 +1,6 @@
--disable_warnings
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value = 16384`)
{
--skip Test requires InnoDB with 16k Page size.
}
--enable_warnings

View file

@ -1,6 +1,4 @@
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value = 32768`)
{
--skip Test requires InnoDB with 32k Page size.
}
--skip Test requires InnoDB with 32k page size.
}

View file

@ -0,0 +1,6 @@
--disable_warnings
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value = 4096`)
{
--skip Test requires InnoDB with 4k Page size.
}
--enable_warnings

View file

@ -1,4 +1,4 @@
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value = 65536`)
{
--skip Test requires InnoDB with 64k Page size.
--skip Test requires InnoDB with 64k page size.
}

View file

@ -0,0 +1,6 @@
--disable_warnings
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value = 8192`)
{
--skip Test requires InnoDB with 8k Page size.
}
--enable_warnings

View file

@ -0,0 +1,4 @@
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value <= 16384`)
{
--skip Test requires InnoDB with page size not greater than 16k.
}

View file

@ -0,0 +1,4 @@
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value <= 16384`)
{
--skip Test with InnoDB zip requires page size not greater than 16k.
}

View file

@ -0,0 +1,18 @@
let $numa_support = `SELECT COUNT(VARIABLE_VALUE) = 1 FROM
INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_numa_interleave'`;
if ( $numa_support == 0 )
{
--skip Test requires: NUMA must be enabled
}
if ( $numa_support == 1 )
{
let $numa = `SELECT @@GLOBAL.innodb_numa_interleave = 'OFF'`;
if ( $numa == 1 )
{
--skip Test requires: NUMA must be enabled
}
}

View file

@ -6,8 +6,8 @@ innodb-cmpmem
innodb-trx
innodb-sys-indexes
[xtradb]
innodb
innodb-cmpmem
innodb-trx
innodb-sys-indexes
#[xtradb]
#innodb
#innodb-cmpmem
#innodb-trx
#innodb-sys-indexes

View file

@ -32,6 +32,7 @@ BEGIN
AND variable_name not like "Last_IO_Err*"
AND variable_name != 'INNODB_IBUF_MAX_SIZE'
AND variable_name != 'INNODB_USE_NATIVE_AIO'
AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP'
AND variable_name not like 'GTID%POS'
AND variable_name != 'GTID_BINLOG_STATE'
ORDER BY variable_name;

View file

@ -4456,7 +4456,14 @@ sub extract_warning_lines ($$) {
qr|nnoDB: fix the corruption by dumping, dropping, and reimporting|,
qr|InnoDB: the corrupt table. You can use CHECK|,
qr|InnoDB: TABLE to scan your table for corruption|,
qr/InnoDB: See also */
qr/InnoDB: See also */,
qr/InnoDB: Cannot open .*ib_buffer_pool.* for reading: No such file or directory*/,
qr/InnoDB: Upgrading redo log:*/,
qr|InnoDB: Starting to delete and rewrite log files.|,
qr/InnoDB: New log files created, LSN=*/,
qr|InnoDB: Creating foreign key constraint system tables.|,
qr/InnoDB: Table .*mysql.*innodb_table_stats.* not found./,
qr/InnoDB: User stopword table .* does not exist./
);

View file

@ -1860,8 +1860,8 @@ ALTER TABLE tm1 MODIFY COLUMN c INT NULL;
affected rows: 2
info: Records: 2 Duplicates: 0 Warnings: 0
ALTER TABLE ti1 MODIFY COLUMN h VARCHAR(30);
affected rows: 2
info: Records: 2 Duplicates: 0 Warnings: 0
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE tm1 MODIFY COLUMN h VARCHAR(30);
affected rows: 2
info: Records: 2 Duplicates: 0 Warnings: 0

View file

@ -194,7 +194,7 @@ EXPLAIN SELECT c1, i1, max(i2) FROM t2
WHERE (c1 = 'C' OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 )
GROUP BY c1,i1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range k2 k2 5 NULL 59 Using where; Using index
1 SIMPLE t2 range k2 k2 5 NULL 60 Using where; Using index
SELECT c1, i1, max(i2) FROM t2
WHERE (c1 = 'C' OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 )
GROUP BY c1,i1;
@ -205,7 +205,7 @@ EXPLAIN SELECT c1, i1, max(i2) FROM t2
WHERE (((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 ))
GROUP BY c1,i1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range k2 k2 5 NULL 58 Using where; Using index
1 SIMPLE t2 range k2 k2 5 NULL 60 Using where; Using index
SELECT c1, i1, max(i2) FROM t2
WHERE (((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 ))
GROUP BY c1,i1;

View file

@ -409,7 +409,7 @@ WHERE (pk BETWEEN 4 AND 5 OR pk < 2) AND c1 < 240
ORDER BY c1
LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY,k1 k1 5 NULL 3 Using where; Using index
1 SIMPLE t1 range PRIMARY,k1 k1 5 NULL 4 Using where; Using index
DROP TABLE t1;
#
#

View file

@ -54,7 +54,7 @@ CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMIN
BEGIN
/*!*/;
# at 809
#<date> server id 1 end_log_pos 865 CRC32 XXX Table_map: `test`.`t1` mapped to number 30
#<date> server id 1 end_log_pos 865 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 865
#<date> server id 1 end_log_pos 934 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1`
@ -79,7 +79,7 @@ COMMIT
BEGIN
/*!*/;
# at 1049
#<date> server id 1 end_log_pos 1105 CRC32 XXX Table_map: `test`.`t1` mapped to number 30
#<date> server id 1 end_log_pos 1105 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1105
#<date> server id 1 end_log_pos 1173 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1`
@ -104,7 +104,7 @@ COMMIT
BEGIN
/*!*/;
# at 1288
#<date> server id 1 end_log_pos 1344 CRC32 XXX Table_map: `test`.`t1` mapped to number 30
#<date> server id 1 end_log_pos 1344 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1344
#<date> server id 1 end_log_pos 1411 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1`
@ -129,7 +129,7 @@ COMMIT
BEGIN
/*!*/;
# at 1526
#<date> server id 1 end_log_pos 1582 CRC32 XXX Table_map: `test`.`t1` mapped to number 30
#<date> server id 1 end_log_pos 1582 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1582
#<date> server id 1 end_log_pos 1652 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1`
@ -154,7 +154,7 @@ COMMIT
BEGIN
/*!*/;
# at 1767
#<date> server id 1 end_log_pos 1823 CRC32 XXX Table_map: `test`.`t2` mapped to number 31
#<date> server id 1 end_log_pos 1823 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 1823
#<date> server id 1 end_log_pos 1990 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t2`
@ -212,7 +212,7 @@ COMMIT
BEGIN
/*!*/;
# at 2105
#<date> server id 1 end_log_pos 2161 CRC32 XXX Table_map: `test`.`t2` mapped to number 31
#<date> server id 1 end_log_pos 2161 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2161
#<date> server id 1 end_log_pos 2235 CRC32 XXX Update_rows: table id 31 flags: STMT_END_F
### UPDATE `test`.`t2`
@ -244,7 +244,7 @@ COMMIT
BEGIN
/*!*/;
# at 2350
#<date> server id 1 end_log_pos 2406 CRC32 XXX Table_map: `test`.`t1` mapped to number 30
#<date> server id 1 end_log_pos 2406 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 2406
#<date> server id 1 end_log_pos 2460 CRC32 XXX Delete_rows: table id 30 flags: STMT_END_F
### DELETE FROM `test`.`t1`
@ -270,7 +270,7 @@ COMMIT
BEGIN
/*!*/;
# at 2575
#<date> server id 1 end_log_pos 2631 CRC32 XXX Table_map: `test`.`t2` mapped to number 31
#<date> server id 1 end_log_pos 2631 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2631
#<date> server id 1 end_log_pos 2685 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F
### DELETE FROM `test`.`t2`

View file

@ -108,9 +108,6 @@ The following options may be given as the first argument:
--bulk-insert-buffer-size=#
Size of tree cache used in bulk insert optimisation. Note
that this is a limit per thread!
--changed-page-bitmaps[=name]
Enable or disable CHANGED_PAGE_BITMAPS plugin. One of:
ON, OFF, FORCE (don't start if the plugin fails to load).
--character-set-client-handshake
Don't ignore client side character set value sent during
handshake.
@ -1153,7 +1150,6 @@ binlog-row-event-max-size 1024
binlog-row-image FULL
binlog-stmt-cache-size 32768
bulk-insert-buffer-size 8388608
changed-page-bitmaps ON
character-set-client-handshake TRUE
character-set-filesystem binary
character-sets-dir MYSQL_CHARSETSDIR/

View file

@ -40,11 +40,11 @@ pk1 count(*)
# The following should use range(ux_pk1_fd5), two key parts (key_len=5+8=13)
EXPLAIN SELECT * FROM t2 USE INDEX(ux_pk1_fd5) WHERE pk1=9 AND fd5 < 500 ORDER BY fd5 DESC LIMIT 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range ux_pk1_fd5 ux_pk1_fd5 13 NULL 137 Using where
1 SIMPLE t2 range ux_pk1_fd5 ux_pk1_fd5 13 NULL 138 Using where
# This also must use range, not ref. key_len must be 13
EXPLAIN SELECT * FROM t2 WHERE pk1=9 AND fd5 < 500 ORDER BY fd5 DESC LIMIT 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range PRIMARY,ux_pk1_fd5 ux_pk1_fd5 13 NULL 137 Using where
1 SIMPLE t2 range PRIMARY,ux_pk1_fd5 ux_pk1_fd5 13 NULL 138 Using where
drop table t0,t1, t2;
#
# MDEV-6814: Server crashes in calculate_key_len on query with ORDER BY

View file

@ -385,33 +385,33 @@ DROP TABLE t1;
create table t1 (a int) engine=innodb partition by hash(a) ;
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 InnoDB 10 Compact 2 8192 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
t1 InnoDB 10 Dynamic 2 8192 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
create table t1 (a int)
engine = innodb
partition by key (a);
show table status;
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 InnoDB 10 Compact 2 8192 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
t1 InnoDB 10 Dynamic 2 8192 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
insert into t1 values (0), (1), (2), (3);
show table status;
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 InnoDB 10 Compact 4 4096 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
t1 InnoDB 10 Dynamic 4 4096 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
create table t1 (a int auto_increment primary key)
engine = innodb
partition by key (a);
show table status;
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 InnoDB 10 Compact 2 8192 16384 0 0 # 1 # NULL NULL latin1_swedish_ci NULL partitioned
t1 InnoDB 10 Dynamic 2 8192 16384 0 0 # 1 # NULL NULL latin1_swedish_ci NULL partitioned
insert into t1 values (NULL), (NULL), (NULL), (NULL);
show table status;
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 InnoDB 10 Compact 4 4096 16384 0 0 # 5 # NULL NULL latin1_swedish_ci NULL partitioned
t1 InnoDB 10 Dynamic 4 4096 16384 0 0 # 5 # NULL NULL latin1_swedish_ci NULL partitioned
insert into t1 values (NULL), (NULL), (NULL), (NULL);
show table status;
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 InnoDB 10 Compact 8 2048 16384 0 0 # 9 # NULL NULL latin1_swedish_ci NULL partitioned
t1 InnoDB 10 Dynamic 8 2048 16384 0 0 # 9 # NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
create table t1 (a int)
partition by key (a)

View file

@ -42,6 +42,8 @@ SET @old_innodb_strict_mode = @@global.innodb_strict_mode;
SET @@global.innodb_file_format = Barracuda,
@@global.innodb_file_per_table = ON,
@@global.innodb_strict_mode = ON;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
connect con1,localhost,root,,;
CREATE TABLE t1 (id INT NOT NULL
PRIMARY KEY,
@ -104,6 +106,8 @@ disconnect con2;
connection default;
SET @@global.innodb_strict_mode = @old_innodb_strict_mode;
SET @@global.innodb_file_format = @old_innodb_file_format;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET @@global.innodb_file_per_table = @old_innodb_file_per_table;
SET NAMES utf8;
CREATE TABLE `t``\""e` (a INT, PRIMARY KEY (a))
@ -143,12 +147,12 @@ ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
# First table reported in 'SHOW ENGINE InnoDB STATUS'
SHOW ENGINE InnoDB STATUS;
Type Name Status
InnoDB index `PRIMARY` of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */
InnoDB index PRIMARY of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */
set @old_sql_mode = @@sql_mode;
set sql_mode = 'ANSI_QUOTES';
SHOW ENGINE InnoDB STATUS;
Type Name Status
InnoDB index `PRIMARY` of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */
InnoDB index PRIMARY of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */
set @@sql_mode = @old_sql_mode;
connection con1;
ROLLBACK;

View file

@ -57,7 +57,7 @@ WHERE Population < 200000 AND Name LIKE 'P%' AND
(Population > 300000 OR Name LIKE 'T%') AND
(Population < 100000 OR Name LIKE 'Pa%');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Population,Name Name 35 NULL 235 Using index condition; Using where
1 SIMPLE City range Population,Name Name 35 NULL 236 Using index condition; Using where
EXPLAIN
SELECT * FROM City
WHERE Population > 100000 AND Name LIKE 'Aba%' OR
@ -65,34 +65,34 @@ Country IN ('CAN', 'ARG') AND ID < 3800 OR
Country < 'U' AND Name LIKE 'Zhu%' OR
ID BETWEEN 3800 AND 3810;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 35,7,4 NULL 123 Using sort_union(Name,Country,PRIMARY); Using where
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 35,7,4 NULL 125 Using sort_union(Name,Country,PRIMARY); Using where
EXPLAIN
SELECT * FROM City
WHERE (Population > 101000 AND Population < 115000);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Population Population 4 NULL 458 Using index condition
1 SIMPLE City range Population Population 4 NULL 459 Using index condition
EXPLAIN
SELECT * FROM City
WHERE (Population > 101000 AND Population < 102000);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Population Population 4 NULL 38 Using index condition
1 SIMPLE City range Population Population 4 NULL 39 Using index condition
EXPLAIN
SELECT * FROM City
WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'F'));
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Country,Name Name,Country 35,3 NULL 213 Using sort_union(Name,Country); Using where
1 SIMPLE City index_merge Country,Name Name,Country 35,3 NULL 215 Using sort_union(Name,Country); Using where
EXPLAIN
SELECT * FROM City
WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'F'))
AND (Population > 101000 AND Population < 115000);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Country,Name Name,Country 35,3 NULL 213 Using sort_union(Name,Country); Using where
1 SIMPLE City index_merge Population,Country,Name Name,Country 35,3 NULL 215 Using sort_union(Name,Country); Using where
EXPLAIN
SELECT * FROM City
WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'F'))
AND (Population > 101000 AND Population < 102000);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Population,Country,Name Population 4 NULL 38 Using index condition; Using where
1 SIMPLE City range Population,Country,Name Population 4 NULL 39 Using index condition; Using where
SELECT * FROM City USE INDEX ()
WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'F'))
AND (Population > 101000 AND Population < 115000);
@ -176,11 +176,11 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE (Name < 'Bb');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Name Name 35 NULL 373 Using index condition
1 SIMPLE City range Name Name 35 NULL 374 Using index condition
EXPLAIN
SELECT * FROM City WHERE (Country > 'A' AND Country < 'B');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Country Country 3 NULL 106 Using index condition
1 SIMPLE City range Country Country 3 NULL 107 Using index condition
EXPLAIN
SELECT * FROM City WHERE (Name BETWEEN 'P' AND 'Pb');
id select_type table type possible_keys key key_len ref rows Extra
@ -188,15 +188,15 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE (Name BETWEEN 'P' AND 'S');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Name Name 35 NULL 384 Using index condition
1 SIMPLE City range Name Name 35 NULL 385 Using index condition
EXPLAIN
SELECT * FROM City WHERE (Population > 101000 AND Population < 110000);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Population Population 4 NULL 327 Using index condition
1 SIMPLE City range Population Population 4 NULL 328 Using index condition
EXPLAIN
SELECT * FROM City WHERE (Population > 103000 AND Population < 104000);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Population Population 4 NULL 36 Using index condition
1 SIMPLE City range Population Population 4 NULL 37 Using index condition
EXPLAIN
SELECT * FROM City
WHERE (Name < 'Ac' AND (Country > 'A' AND Country < 'B')) OR
@ -208,19 +208,19 @@ SELECT * FROM City
WHERE (Name < 'Ac' AND (Country > 'A' AND Country < 'B')) OR
(Name BETWEEN 'P' AND 'S' AND (Population > 103000 AND Population < 104000));
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Country,Name Name,Population 35,4 NULL 59 Using sort_union(Name,Population); Using where
1 SIMPLE City index_merge Population,Country,Name Name,Population 35,4 NULL 60 Using sort_union(Name,Population); Using where
EXPLAIN
SELECT * FROM City
WHERE (Name < 'Bb' AND (Country > 'A' AND Country < 'B')) OR
(Name BETWEEN 'P' AND 'Pb' AND (Population > 101000 AND Population < 110000));
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Country,Name Country,Name 3,35 NULL 177 Using sort_union(Country,Name); Using where
1 SIMPLE City index_merge Population,Country,Name Country,Name 3,35 NULL 178 Using sort_union(Country,Name); Using where
EXPLAIN
SELECT * FROM City
WHERE (Name < 'Bb' AND (Country > 'A' AND Country < 'B')) OR
(Name BETWEEN 'P' AND 'S' AND (Population > 103000 AND Population < 104000));
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Country,Name Country,Population 3,4 NULL 142 Using sort_union(Country,Population); Using where
1 SIMPLE City index_merge Population,Country,Name Country,Population 3,4 NULL 144 Using sort_union(Country,Population); Using where
SELECT * FROM City USE INDEX ()
WHERE (Name < 'Ac' AND (Country > 'A' AND Country < 'B')) OR
(Name BETWEEN 'P' AND 'Pb' AND (Population > 101000 AND Population < 110000));
@ -336,15 +336,15 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE (ID < 600) OR (ID BETWEEN 900 AND 1500);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range PRIMARY PRIMARY 4 NULL 1198 Using where
1 SIMPLE City range PRIMARY PRIMARY 4 NULL 1200 Using where
EXPLAIN
SELECT * FROM City WHERE Country > 'A' AND Country < 'ARG';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Country Country 3 NULL 19 Using index condition
1 SIMPLE City range Country Country 3 NULL 20 Using index condition
EXPLAIN
SELECT * FROM City WHERE Name LIKE 'H%' OR Name LIKE 'P%' ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Name Name 35 NULL 394 Using index condition; Using where
1 SIMPLE City range Name Name 35 NULL 395 Using index condition; Using where
EXPLAIN
SELECT * FROM City WHERE Name LIKE 'Ha%' OR Name LIKE 'Pa%' ;
id select_type table type possible_keys key key_len ref rows Extra
@ -362,7 +362,7 @@ WHERE ((ID < 800) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
OR ((ID BETWEEN 900 AND 1500) AND
(Name LIKE 'Pa%' OR (Population > 103000 AND Population < 104000)));
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 39,3,4 NULL 680 Using sort_union(Name,Country,PRIMARY); Using where
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 39,3,4 NULL 683 Using sort_union(Name,Country,PRIMARY); Using where
EXPLAIN
SELECT * FROM City
WHERE ((ID < 200) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
@ -577,11 +577,11 @@ ID Name Country Population
EXPLAIN
SELECT * FROM City WHERE Population > 101000 AND Population < 102000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Population Population 4 NULL 38 Using index condition
1 SIMPLE City range Population Population 4 NULL 39 Using index condition
EXPLAIN
SELECT * FROM City WHERE Population > 101000 AND Population < 110000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Population Population 4 NULL 327 Using index condition
1 SIMPLE City range Population Population 4 NULL 328 Using index condition
EXPLAIN
SELECT * FROM City WHERE Country < 'C';
id select_type table type possible_keys key key_len ref rows Extra
@ -593,7 +593,7 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE Name BETWEEN 'P' AND 'S';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Name Name 35 NULL 384 Using index condition
1 SIMPLE City range Name Name 35 NULL 385 Using index condition
EXPLAIN
SELECT * FROM City WHERE Name BETWEEN 'P' AND 'Pb';
id select_type table type possible_keys key key_len ref rows Extra
@ -601,7 +601,7 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE ID BETWEEN 3400 AND 3800;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range PRIMARY PRIMARY 4 NULL 400 Using where
1 SIMPLE City range PRIMARY PRIMARY 4 NULL 401 Using where
EXPLAIN
SELECT * FROM City WHERE ID BETWEEN 3790 AND 3800;
id select_type table type possible_keys key key_len ref rows Extra
@ -609,7 +609,7 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE Name LIKE 'P%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Name Name 35 NULL 235 Using index condition
1 SIMPLE City range Name Name 35 NULL 236 Using index condition
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 102000) AND
@ -617,7 +617,7 @@ WHERE ((Population > 101000 AND Population < 102000) AND
((ID BETWEEN 3400 AND 3800) AND
(Country < 'AGO' OR Name LIKE 'Pa%'));
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Population,PRIMARY 4,4 NULL 438 Using sort_union(Population,PRIMARY); Using where
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Population,PRIMARY 4,4 NULL 440 Using sort_union(Population,PRIMARY); Using where
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 110000) AND
@ -684,11 +684,11 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE Name LIKE 'P%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Name Name 35 NULL 235 Using index condition
1 SIMPLE City range Name Name 35 NULL 236 Using index condition
EXPLAIN
SELECT * FROM City WHERE (Population > 101000 AND Population < 103000);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Population Population 4 NULL 80 Using index condition
1 SIMPLE City range Population Population 4 NULL 81 Using index condition
EXPLAIN
SELECT * FROM City WHERE Country='USA';
id select_type table type possible_keys key key_len ref rows Extra
@ -702,7 +702,7 @@ SELECT * FROM City
WHERE ((Population > 101000 AND Population < 103000) OR Name LIKE 'Pas%')
AND Country='USA';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Population,Country,Name,CountryPopulation CountryPopulation,Name 7,35 NULL 17 Using sort_union(CountryPopulation,Name); Using where
1 SIMPLE City index_merge Population,Country,Name,CountryPopulation CountryPopulation,Name 7,35 NULL 18 Using sort_union(CountryPopulation,Name); Using where
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 103000) OR Name LIKE 'P%')
@ -777,7 +777,7 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE ID BETWEEN 3500 AND 3800;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range PRIMARY PRIMARY 4 NULL 300 Using where
1 SIMPLE City range PRIMARY PRIMARY 4 NULL 301 Using where
EXPLAIN
SELECT * FROM City WHERE ID BETWEEN 4000 AND 4300;
id select_type table type possible_keys key key_len ref rows Extra
@ -789,11 +789,11 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE (Population > 101000 AND Population < 102000);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Population Population 4 NULL 38 Using index condition
1 SIMPLE City range Population Population 4 NULL 39 Using index condition
EXPLAIN
SELECT * FROM City WHERE (Population > 101000 AND Population < 103000);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Population Population 4 NULL 80 Using index condition
1 SIMPLE City range Population Population 4 NULL 81 Using index condition
EXPLAIN
SELECT * FROM City WHERE Name LIKE 'Pa%';
id select_type table type possible_keys key key_len ref rows Extra
@ -806,7 +806,7 @@ WHERE ((Population > 101000 AND Population < 102000) OR
ID BETWEEN 3790 AND 3800) AND Country='USA'
AND (Name LIKE 'Pa%' OR ID BETWEEN 4025 AND 4035);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge PRIMARY,Population,Country,Name,CountryPopulation,CountryName CountryPopulation,PRIMARY 7,4 NULL 13 Using sort_union(CountryPopulation,PRIMARY); Using where
1 SIMPLE City index_merge PRIMARY,Population,Country,Name,CountryPopulation,CountryName CountryPopulation,PRIMARY 7,4 NULL 14 Using sort_union(CountryPopulation,PRIMARY); Using where
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 103000) OR
@ -869,7 +869,7 @@ WHERE ((Population > 101000 and Population < 102000) OR
ID BETWEEN 3790 AND 3800) AND Country='USA'
OR (Name LIKE 'Pa%' OR ID BETWEEN 250 AND 260) AND Country='BRA';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge PRIMARY,Population,Country,Name,CountryPopulation,CountryName CountryPopulation,CountryName,PRIMARY 7,38,4 NULL 35 Using sort_union(CountryPopulation,CountryName,PRIMARY); Using where
1 SIMPLE City index_merge PRIMARY,Population,Country,Name,CountryPopulation,CountryName CountryPopulation,CountryName,PRIMARY 7,38,4 NULL 36 Using sort_union(CountryPopulation,CountryName,PRIMARY); Using where
SELECT * FROM City USE INDEX ()
WHERE ((Population > 101000 and Population < 102000) OR
ID BETWEEN 3790 AND 3800) AND Country='USA'
@ -1445,7 +1445,7 @@ explain
select * from t1
where (home_state = 'ia' or work_state='ia') and account_id = 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge account_id,user_home_state_indx,user_work_state_indx user_home_state_indx,user_work_state_indx 3,3 NULL 10 Using union(user_home_state_indx,user_work_state_indx); Using where
1 SIMPLE t1 index_merge account_id,user_home_state_indx,user_work_state_indx user_home_state_indx,user_work_state_indx 3,3 NULL 12 Using union(user_home_state_indx,user_work_state_indx); Using where
drop table t1;
CREATE TABLE t1 (
c1 int(11) NOT NULL auto_increment,

View file

@ -73,7 +73,7 @@ test.t1 4108368782
drop table if exists t1;
create table t1 (a int null, v varchar(100)) engine=innodb checksum=0 row_format=fixed;
Warnings:
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum

View file

@ -73,7 +73,7 @@ test.t1 3885665021
drop table if exists t1;
create table t1 (a int null, v varchar(100)) engine=innodb checksum=0 row_format=fixed;
Warnings:
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum

View file

@ -144,9 +144,9 @@ order by s_suppkey;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY supplier index PRIMARY PRIMARY 4 NULL 10 100.00
1 PRIMARY <derived3> ref key0 key0 5 dbt3_s001.supplier.s_suppkey 10 100.00 Using where
3 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 228 100.00 Using where; Using temporary; Using filesort
2 SUBQUERY <derived4> ALL NULL NULL NULL NULL 228 100.00
4 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 228 100.00 Using where; Using temporary; Using filesort
3 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 229 100.00 Using where; Using temporary; Using filesort
2 SUBQUERY <derived4> ALL NULL NULL NULL NULL 229 100.00
4 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 229 100.00 Using where; Using temporary; Using filesort
Warnings:
Note 1003 select `dbt3_s001`.`supplier`.`s_suppkey` AS `s_suppkey`,`dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address`,`dbt3_s001`.`supplier`.`s_phone` AS `s_phone`,`revenue0`.`total_revenue` AS `total_revenue` from `dbt3_s001`.`supplier` join `dbt3_s001`.`revenue0` where ((`revenue0`.`supplier_no` = `dbt3_s001`.`supplier`.`s_suppkey`) and (`revenue0`.`total_revenue` = (select max(`revenue0`.`total_revenue`) from `dbt3_s001`.`revenue0`))) order by `dbt3_s001`.`supplier`.`s_suppkey`
select s_suppkey, s_name, s_address, s_phone, total_revenue
@ -165,9 +165,9 @@ order by s_suppkey;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY supplier index PRIMARY PRIMARY 4 NULL 10 100.00
1 PRIMARY <derived3> ref key0 key0 5 dbt3_s001.supplier.s_suppkey 10 100.00 Using where
3 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 228 100.00 Using where; Using temporary; Using filesort
2 SUBQUERY <derived4> ALL NULL NULL NULL NULL 227 100.00
4 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 228 100.00 Using where; Using temporary; Using filesort
3 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 229 100.00 Using where; Using temporary; Using filesort
2 SUBQUERY <derived4> ALL NULL NULL NULL NULL 228 100.00
4 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 229 100.00 Using where; Using temporary; Using filesort
Warnings:
Note 1003 select `dbt3_s001`.`supplier`.`s_suppkey` AS `s_suppkey`,`dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address`,`dbt3_s001`.`supplier`.`s_phone` AS `s_phone`,`revenue0`.`total_revenue` AS `total_revenue` from `dbt3_s001`.`supplier` join `dbt3_s001`.`revenue0` where ((`revenue0`.`supplier_no` = `dbt3_s001`.`supplier`.`s_suppkey`) and (`revenue0`.`total_revenue` = (select max(`revenue0`.`total_revenue`) from `dbt3_s001`.`revenue0`))) order by `dbt3_s001`.`supplier`.`s_suppkey`
select s_suppkey, s_name, s_address, s_phone, total_revenue
@ -544,7 +544,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
2 MATERIALIZED part ALL PRIMARY NULL NULL NULL 200 4.17 Using where
2 MATERIALIZED partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where
4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.37 Using where
4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.40 Using where
Warnings:
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2
@ -600,7 +600,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
2 MATERIALIZED part ALL PRIMARY NULL NULL NULL 200 7.03 Using where
2 MATERIALIZED partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where
4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.37 Using where
4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.40 Using where
Warnings:
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2
@ -656,7 +656,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
2 MATERIALIZED part ALL PRIMARY NULL NULL NULL 200 7.81 Using where
2 MATERIALIZED partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where
4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.37 Using where
4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.40 Using where
Warnings:
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2
@ -712,7 +712,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
2 MATERIALIZED part ALL PRIMARY NULL NULL NULL 200 7.81 Using where
2 MATERIALIZED partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where
4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.37 Using where
4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.40 Using where
Warnings:
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2

View file

@ -67,7 +67,7 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 211 Using where; Using temporary; Using filesort
1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 213 Using where; Using temporary; Using filesort
1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
1 SIMPLE nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1
1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.customer.c_nationkey 1 Using index
@ -198,7 +198,7 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 211 Using where; Using temporary; Using filesort
1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 213 Using where; Using temporary; Using filesort
1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
1 SIMPLE nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1
1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.customer.c_nationkey 1 Using index

View file

@ -256,7 +256,7 @@ a+0 b+0
127 403
explain select a+0, b+0 from t1 where a > 40 and a < 70 order by 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 2 NULL 8 Using where; Using index; Using filesort
1 SIMPLE t1 range a a 2 NULL 9 Using where; Using index; Using filesort
select a+0, b+0 from t1 where a > 40 and a < 70 order by 2;
a+0 b+0
57 135

View file

@ -14,4 +14,5 @@ innodb_scrub : MDEV-8139
innodb_scrub_compressed : MDEV-8139
innodb_scrub_background : MDEV-8139
innodb_encryption-page-compression : Fails with lost connection at line 156
innochecksum : Waiting for merge

View file

@ -9,13 +9,13 @@ innodb_encryption_threads 4
select space,name,current_key_version from information_schema.innodb_tablespaces_encryption order by space;
space name current_key_version
0 NULL 1
1 mysql/innodb_table_stats 1
2 mysql/innodb_index_stats 1
2 mysql/innodb_table_stats 1
3 mysql/innodb_index_stats 1
set global debug_key_management_version=10;
select space,name,current_key_version from information_schema.innodb_tablespaces_encryption order by space;
space name current_key_version
0 NULL 10
1 mysql/innodb_table_stats 10
2 mysql/innodb_index_stats 10
2 mysql/innodb_table_stats 10
3 mysql/innodb_index_stats 10
set global innodb_encrypt_tables=OFF;
set global debug_key_management_version=1;

View file

@ -8,9 +8,12 @@ call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal
call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*");
call mtr.add_suppression("mysqld: File .*");
call mtr.add_suppression("InnoDB: Tablespace id .* is encrypted but encryption service or used key_id .* is not available. Can't continue opening tablespace.");
call mtr.add_suppression("InnoDB: InnoDB: Page may be an index page where index id is .*");
# Start server with keys2.txt
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
INSERT INTO t1 VALUES ('foobar');
@ -36,10 +39,12 @@ SELECT * FROM t1;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
SHOW WARNINGS;
Level Code Message
Warning 1812 Tablespace is missing for table 'test/t1'
Warning 192 Table test/t1 in tablespace 8 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Warning 192 Table test/t1 is encrypted but encryption service or used key_id 2 is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
DROP TABLE t1;
Warnings:
Warning 192 Table in tablespace 8 encrypted.However key management plugin or used key_id 1 is not found or used encryption algorithm or method does not match. Can't continue opening the table.
# Start server with keys.txt
CREATE TABLE t2 (c VARCHAR(8), id int not null primary key, b int, key(b)) ENGINE=InnoDB ENCRYPTED=YES;
INSERT INTO t2 VALUES ('foobar',1,2);

View file

@ -1,5 +1,8 @@
call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded");
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
@ -24,6 +27,8 @@ UNLOCK TABLES;
NOT FOUND /foobar/ in t1.ibd
ALTER TABLE t1 DISCARD TABLESPACE;
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
# List after t1 DISCARD
t1.frm
@ -42,3 +47,5 @@ ERROR HY000: Tablespace has been discarded for table 't1'
# t1 yes on expecting NOT FOUND
NOT FOUND /foobar/ in t1.ibd
DROP TABLE t1;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -5,16 +5,22 @@ call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal
call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*");
call mtr.add_suppression("Couldn't load plugins from 'file_key_management*");
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check Warning Table test/t1 in tablespace 4 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
test.t1 check Warning Table test/t1 in tablespace 7 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
test.t1 check Warning Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue checking table.
test.t1 check error Corrupt
SHOW WARNINGS;
Level Code Message
DROP TABLE t1;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -5,10 +5,14 @@ call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal
call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*");
call mtr.add_suppression("Couldn't load plugins from 'file_key_management*");
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
@ -26,3 +30,5 @@ Level Code Message
Warning 192 Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
DROP TABLE t1;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,5 +1,8 @@
call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded");
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_compression_algorithm = 1;
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=4;
@ -72,6 +75,8 @@ ALTER TABLE t2 DISCARD TABLESPACE;
ALTER TABLE t3 DISCARD TABLESPACE;
ALTER TABLE t4 DISCARD TABLESPACE;
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_compression_algorithm = 1;
# List after t1 DISCARD
@ -129,6 +134,8 @@ COUNT(*)
2000
flush data to disk
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_compression_algorithm = 1;
# tables should be still either encrypted and/or compressed
@ -142,3 +149,5 @@ NOT FOUND /tmpres/ in t3.ibd
NOT FOUND /mysql/ in t4.ibd
DROP PROCEDURE innodb_insert_proc;
DROP TABLE t1,t2,t3,t4;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_encrypt_tables = ON;
SET GLOBAL innodb_encryption_threads = 4;
@ -51,3 +53,5 @@ Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
set innodb_default_encryption_key_id = 1;
drop table t1,t2;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
call mtr.add_suppression("InnoDB: Block in space_id .* in file test/.* encrypted");
call mtr.add_suppression("InnoDB: However key management plugin or used key_id 1 is not found or used encryption algorithm or method does not match.");
@ -23,10 +25,24 @@ CREATE TABLE `t1` (
`charcol3` varchar(128) DEFAULT NULL
) ENGINE=InnoDB;
insert into t1 values (1,2,'maria','db','encryption');
select * from t1;
intcol1 intcol2 charcol1 charcol2 charcol3
1 2 maria db encryption
select * from t5;
intcol1 intcol2 charcol1 charcol2 charcol3
1 2 maria db encryption
alter table t1 encrypted='yes' `encryption_key_id`=1;
select * from t1;
intcol1 intcol2 charcol1 charcol2 charcol3
1 2 maria db encryption
select * from t5;
intcol1 intcol2 charcol1 charcol2 charcol3
1 2 maria db encryption
select * from t1;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
select * from t5;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
drop table t1;
drop table t5;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
create table t1(c1 bigint not null, b char(200), c varchar(200)) engine=innodb encrypted=yes encryption_key_id=1;
show warnings;
@ -53,3 +55,5 @@ FOUND /publicmessage/ in ib_logfile0
NOT FOUND /publicmessage/ in ib_logfile1
drop procedure innodb_insert_proc;
drop table t1;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
show warnings;
@ -121,6 +123,8 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_
variable_value >= 0
1
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
update innodb_normal set c1 = c1 +1;
update innodb_compact set c1 = c1 + 1;
@ -198,6 +202,8 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
show create table innodb_compact;
Table Create Table
@ -275,3 +281,5 @@ drop table innodb_compressed;
drop table innodb_dynamic;
drop table innodb_redundant;
drop table innodb_defkey;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb page_compressed=1;
@ -75,6 +77,8 @@ variable_value >= 0
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decompressed';
variable_value >= 0
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
update innodb_normal set c1 = c1 + 1;
@ -129,6 +133,8 @@ innodb_dynamic CREATE TABLE `innodb_dynamic` (
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
show create table innodb_normal;
Table Create Table
@ -182,3 +188,5 @@ drop procedure innodb_insert_proc;
drop table innodb_normal;
drop table innodb_compact;
drop table innodb_dynamic;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -2,6 +2,8 @@ call mtr.add_suppression("KeyID 0 not found or with error. Check the key and the
call mtr.add_suppression("Disabling redo log encryp*");
call mtr.add_suppression("InnoDB: Redo log crypto: Can't initialize to key version*");
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
show warnings;
@ -100,6 +102,8 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_
variable_value >= 0
1
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
update innodb_normal set c1 = c1 +1;
update innodb_compact set c1 = c1 + 1;
@ -169,6 +173,8 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
show create table innodb_compact;
Table Create Table
@ -247,3 +253,5 @@ pk
1
2
DROP TABLE t1;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,5 +1,8 @@
call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded.");
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes;
CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB;
@ -50,6 +53,8 @@ t2.ibd
t3.frm
t3.ibd
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
ALTER TABLE t1 DISCARD TABLESPACE;
ALTER TABLE t2 DISCARD TABLESPACE;
@ -61,6 +66,8 @@ t3.frm
# Restarting server
# Done restarting server
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
# Tablespaces should be still encrypted
# t1 yes on expecting NOT FOUND
@ -147,3 +154,5 @@ NOT FOUND /temp/ in t2.ibd
NOT FOUND /barfoo/ in t3.ibd
DROP PROCEDURE innodb_insert_proc;
DROP TABLE t1, t2, t3;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,5 +1,7 @@
call mtr.add_suppression("trying to do an operation on a dropped tablespace .*");
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_encrypt_tables = OFF;
SET GLOBAL innodb_encryption_threads = 4;
@ -63,5 +65,7 @@ COUNT(1)
SELECT COUNT(1) FROM t5;
COUNT(1)
400
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
drop table t1,t2,t3,t4, t5;
set GLOBAL innodb_default_encryption_key_id=1;

View file

@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
CREATE TABLE t2 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
@ -12,3 +14,5 @@ NAME ENCRYPTION_SCHEME MIN_KEY_VERSION CURRENT_KEY_VERSION CURRENT_KEY_ID
test/t1 1 1 1 1
test/t2 1 1 1 2
DROP TABLE t1, t2;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -0,0 +1,159 @@
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
create table innodb_compressed1(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed encrypted=yes;
create table innodb_compressed2(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=1 encrypted=yes;
create table innodb_compressed3(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=2 encrypted=yes;
create table innodb_compressed4(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=4 encrypted=yes;
insert into innodb_compressed1 values (1, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (2, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (3, 30, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (4, 30, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (5, 30, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (6, 30, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (7, 30, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (8, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (9, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (10, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed2 select * from innodb_compressed1;
insert into innodb_compressed3 select * from innodb_compressed1;
insert into innodb_compressed4 select * from innodb_compressed1;
# t1 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed1.ibd
# t2 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed2.ibd
# t3 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed3.ibd
# t4 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed4.ibd
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
select * from innodb_compressed1 where d = 20;
c1 d a b
1 20 private evenmoreprivate
2 20 private evenmoreprivate
8 20 private evenmoreprivate
9 20 private evenmoreprivate
10 20 private evenmoreprivate
select * from innodb_compressed1 where d = 30;
c1 d a b
3 30 private evenmoreprivate
4 30 private evenmoreprivate
5 30 private evenmoreprivate
6 30 private evenmoreprivate
7 30 private evenmoreprivate
select * from innodb_compressed2 where d = 20;
c1 d a b
1 20 private evenmoreprivate
2 20 private evenmoreprivate
8 20 private evenmoreprivate
9 20 private evenmoreprivate
10 20 private evenmoreprivate
select * from innodb_compressed2 where d = 30;
c1 d a b
3 30 private evenmoreprivate
4 30 private evenmoreprivate
5 30 private evenmoreprivate
6 30 private evenmoreprivate
7 30 private evenmoreprivate
select * from innodb_compressed3 where d = 20;
c1 d a b
1 20 private evenmoreprivate
2 20 private evenmoreprivate
8 20 private evenmoreprivate
9 20 private evenmoreprivate
10 20 private evenmoreprivate
select * from innodb_compressed3 where d = 30;
c1 d a b
3 30 private evenmoreprivate
4 30 private evenmoreprivate
5 30 private evenmoreprivate
6 30 private evenmoreprivate
7 30 private evenmoreprivate
select * from innodb_compressed4 where d = 20;
c1 d a b
1 20 private evenmoreprivate
2 20 private evenmoreprivate
8 20 private evenmoreprivate
9 20 private evenmoreprivate
10 20 private evenmoreprivate
select * from innodb_compressed4 where d = 30;
c1 d a b
3 30 private evenmoreprivate
4 30 private evenmoreprivate
5 30 private evenmoreprivate
6 30 private evenmoreprivate
7 30 private evenmoreprivate
update innodb_compressed1 set d = d + 10 where d = 30;
update innodb_compressed2 set d = d + 10 where d = 30;
update innodb_compressed3 set d = d + 10 where d = 30;
update innodb_compressed4 set d = d + 10 where d = 30;
insert into innodb_compressed1 values (20, 60, 'newprivate', 'newevenmoreprivate');
insert into innodb_compressed2 values (20, 60, 'newprivate', 'newevenmoreprivate');
insert into innodb_compressed3 values (20, 60, 'newprivate', 'newevenmoreprivate');
insert into innodb_compressed4 values (20, 60, 'newprivate', 'newevenmoreprivate');
# t1 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed1.ibd
# t2 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed2.ibd
# t3 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed3.ibd
# t4 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed4.ibd
select * from innodb_compressed1 where d = 40;
c1 d a b
3 40 private evenmoreprivate
4 40 private evenmoreprivate
5 40 private evenmoreprivate
6 40 private evenmoreprivate
7 40 private evenmoreprivate
select * from innodb_compressed1 where d = 60;
c1 d a b
20 60 newprivate newevenmoreprivate
select * from innodb_compressed2 where d = 40;
c1 d a b
3 40 private evenmoreprivate
4 40 private evenmoreprivate
5 40 private evenmoreprivate
6 40 private evenmoreprivate
7 40 private evenmoreprivate
select * from innodb_compressed2 where d = 60;
c1 d a b
20 60 newprivate newevenmoreprivate
select * from innodb_compressed3 where d = 40;
c1 d a b
3 40 private evenmoreprivate
4 40 private evenmoreprivate
5 40 private evenmoreprivate
6 40 private evenmoreprivate
7 40 private evenmoreprivate
select * from innodb_compressed3 where d = 60;
c1 d a b
20 60 newprivate newevenmoreprivate
select * from innodb_compressed4 where d = 40;
c1 d a b
3 40 private evenmoreprivate
4 40 private evenmoreprivate
5 40 private evenmoreprivate
6 40 private evenmoreprivate
7 40 private evenmoreprivate
select * from innodb_compressed4 where d = 60;
c1 d a b
20 60 newprivate newevenmoreprivate
# t1 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed1.ibd
# t2 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed2.ibd
# t3 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed3.ibd
# t4 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed4.ibd
drop table innodb_compressed1;
drop table innodb_compressed2;
drop table innodb_compressed3;
drop table innodb_compressed4;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact;
@ -104,6 +106,8 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_
variable_value >= 0
1
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
update innodb_normal set c1 = c1 + 1;
update innodb_compact set c1 = c1 + 1;
@ -159,3 +163,5 @@ drop table innodb_compact;
drop table innodb_dynamic;
drop table innodb_compressed;
drop table innodb_redundant;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes;
CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB;
@ -174,3 +176,5 @@ NOT FOUND /mangled/ in t6.ibd
NOT FOUND /mysql/ in t7.ibd
DROP PROCEDURE innodb_insert_proc;
DROP TABLE t1, t2, t3, t4, t5, t6, t7;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,5 +1,7 @@
# Restart mysqld --loose-file-key-management-filename=keys2.txt
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
show warnings;
@ -105,6 +107,8 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_
variable_value >= 0
1
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
alter table innodb_compact engine=innodb encryption_key_id = 2;
alter table innodb_compressed engine=innodb encryption_key_id = 3;
@ -151,3 +155,5 @@ drop table innodb_compact;
drop table innodb_compressed;
drop table innodb_dynamic;
drop table innodb_redundant;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -22,6 +22,8 @@ call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal
call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*");
call mtr.add_suppression("mysqld: File .*");
call mtr.add_suppression("InnoDB: Tablespace id .* is encrypted but encryption service or used key_id .* is not available. Can't continue opening tablespace.");
call mtr.add_suppression("InnoDB: InnoDB: Page may be an index page where index id is .*");
--echo
--echo # Start server with keys2.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt

View file

@ -8,7 +8,9 @@
#
# MDEV-8772: Assertion failure in file ha_innodb.cc line 20027 when importing page compressed and encrypted tablespace using incorrect keys
#
call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded");
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
--disable_query_log
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;

View file

@ -10,7 +10,8 @@
# MDEV-8770: Incorrect error message when importing page compressed tablespace
#
call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded");
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
--disable_query_log
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;

View file

@ -30,12 +30,14 @@ call mtr.add_suppression("InnoDB: Tablespace id.* is encrypted but encryption se
--shutdown_server
--source include/wait_until_disconnected.inc
--write_file $MYSQLTEST_VARDIR/keys1.txt
--error 0,1,2
--remove_file $MYSQLTEST_VARDIR/encryption-disable-keys1.txt
--write_file $MYSQLTEST_VARDIR/encryption-disable-keys1.txt
1;770A8A65DA156D24EE2A093277530142
4;770A8A65DA156D24EE2A093277530143
EOF
--exec echo "restart:--innodb-encrypt-tables --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--exec echo "restart:--innodb-encrypt-tables --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/encryption-disable-keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
@ -58,8 +60,15 @@ CREATE TABLE `t1` (
) ENGINE=InnoDB;
insert into t1 values (1,2,'maria','db','encryption');
select * from t1;
select * from t5;
alter table t1 encrypted='yes' `encryption_key_id`=1;
select * from t1;
select * from t5;
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
@ -77,7 +86,7 @@ select * from t5;
--shutdown_server
--source include/wait_until_disconnected.inc
--exec echo "restart:--innodb-encrypt-tables --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--exec echo "restart:--innodb-encrypt-tables --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/encryption-disable-keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
@ -89,4 +98,4 @@ EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
--enable_query_log
--remove_file $MYSQLTEST_VARDIR/keys1.txt
--remove_file $MYSQLTEST_VARDIR/encryption-disable-keys1.txt

View file

@ -4,7 +4,8 @@
-- source include/not_embedded.inc
-- source include/not_windows.inc
call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded.");
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
--let $MYSQLD_TMPDIR = `SELECT @@tmpdir`
--let $MYSQLD_DATADIR = `SELECT @@datadir`
@ -107,6 +108,7 @@ ALTER TABLE t3 DISCARD TABLESPACE;
--echo # List after t1 DISCARD
--list_files $MYSQLD_DATADIR/test
--disable_result_log
--error 0,1,2
--remove_file $MYSQLD_DATADIR/test/t1.cfg
--error 0,1,2

View file

@ -0,0 +1,4 @@
--innodb-encrypt-tables=ON
--innodb-encryption-rotate-key-age=15
--innodb-encryption-threads=4
--innodb-tablespaces-encryption

View file

@ -0,0 +1,125 @@
-- source include/have_innodb.inc
-- source include/have_file_key_management_plugin.inc
-- source include/not_embedded.inc
--disable_query_log
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
--enable_query_log
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
create table innodb_compressed1(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed encrypted=yes;
create table innodb_compressed2(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=1 encrypted=yes;
create table innodb_compressed3(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=2 encrypted=yes;
create table innodb_compressed4(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=4 encrypted=yes;
insert into innodb_compressed1 values (1, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (2, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (3, 30, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (4, 30, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (5, 30, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (6, 30, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (7, 30, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (8, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (9, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed1 values (10, 20, 'private', 'evenmoreprivate');
insert into innodb_compressed2 select * from innodb_compressed1;
insert into innodb_compressed3 select * from innodb_compressed1;
insert into innodb_compressed4 select * from innodb_compressed1;
--source include/restart_mysqld.inc
--let $MYSQLD_DATADIR=`select @@datadir`
--let t1_IBD = $MYSQLD_DATADIR/test/innodb_compressed1.ibd
--let t2_IBD = $MYSQLD_DATADIR/test/innodb_compressed2.ibd
--let t3_IBD = $MYSQLD_DATADIR/test/innodb_compressed3.ibd
--let t4_IBD = $MYSQLD_DATADIR/test/innodb_compressed4.ibd
--let SEARCH_RANGE = 10000000
--let SEARCH_PATTERN=private
--echo # t1 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
--echo # t2 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t2_IBD
-- source include/search_pattern_in_file.inc
--echo # t3 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t3_IBD
-- source include/search_pattern_in_file.inc
--echo # t4 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t4_IBD
-- source include/search_pattern_in_file.inc
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
select * from innodb_compressed1 where d = 20;
select * from innodb_compressed1 where d = 30;
select * from innodb_compressed2 where d = 20;
select * from innodb_compressed2 where d = 30;
select * from innodb_compressed3 where d = 20;
select * from innodb_compressed3 where d = 30;
select * from innodb_compressed4 where d = 20;
select * from innodb_compressed4 where d = 30;
update innodb_compressed1 set d = d + 10 where d = 30;
update innodb_compressed2 set d = d + 10 where d = 30;
update innodb_compressed3 set d = d + 10 where d = 30;
update innodb_compressed4 set d = d + 10 where d = 30;
insert into innodb_compressed1 values (20, 60, 'newprivate', 'newevenmoreprivate');
insert into innodb_compressed2 values (20, 60, 'newprivate', 'newevenmoreprivate');
insert into innodb_compressed3 values (20, 60, 'newprivate', 'newevenmoreprivate');
insert into innodb_compressed4 values (20, 60, 'newprivate', 'newevenmoreprivate');
--let SEARCH_PATTERN=private
--echo # t1 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
--echo # t2 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t2_IBD
-- source include/search_pattern_in_file.inc
--echo # t3 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t3_IBD
-- source include/search_pattern_in_file.inc
--echo # t4 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t4_IBD
-- source include/search_pattern_in_file.inc
--source include/restart_mysqld.inc
select * from innodb_compressed1 where d = 40;
select * from innodb_compressed1 where d = 60;
select * from innodb_compressed2 where d = 40;
select * from innodb_compressed2 where d = 60;
select * from innodb_compressed3 where d = 40;
select * from innodb_compressed3 where d = 60;
select * from innodb_compressed4 where d = 40;
select * from innodb_compressed4 where d = 60;
--let SEARCH_PATTERN=private
--echo # t1 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
--echo # t2 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t2_IBD
-- source include/search_pattern_in_file.inc
--echo # t3 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t3_IBD
-- source include/search_pattern_in_file.inc
--echo # t4 yes on expecting NOT FOUND
-- let SEARCH_FILE=$t4_IBD
-- source include/search_pattern_in_file.inc
drop table innodb_compressed1;
drop table innodb_compressed2;
drop table innodb_compressed3;
drop table innodb_compressed4;
# reset system
--disable_query_log
EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
--enable_query_log

View file

@ -21,7 +21,7 @@ TABLE_NAME t1
TABLE_TYPE BASE TABLE
ENGINE InnoDB
VERSION 10
ROW_FORMAT Compact
ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@ -44,7 +44,7 @@ TABLE_NAME t2
TABLE_TYPE BASE TABLE
ENGINE InnoDB
VERSION 10
ROW_FORMAT Compact
ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@ -67,7 +67,7 @@ TABLE_NAME t1
TABLE_TYPE BASE TABLE
ENGINE InnoDB
VERSION 10
ROW_FORMAT Compact
ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@ -111,7 +111,7 @@ TABLE_NAME t1
TABLE_TYPE BASE TABLE
ENGINE InnoDB
VERSION 10
ROW_FORMAT Compact
ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@ -134,7 +134,7 @@ TABLE_NAME t2
TABLE_TYPE BASE TABLE
ENGINE InnoDB
VERSION 10
ROW_FORMAT Compact
ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#

View file

@ -315,7 +315,7 @@ TABLE_NAME innodb_index_stats
TABLE_TYPE BASE TABLE
ENGINE InnoDB
VERSION 10
ROW_FORMAT Compact
ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@ -338,7 +338,7 @@ TABLE_NAME innodb_table_stats
TABLE_TYPE BASE TABLE
ENGINE InnoDB
VERSION 10
ROW_FORMAT Compact
ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#

View file

@ -0,0 +1,13 @@
##############################################################################
#
# List the test cases that are to be disabled temporarily.
#
# Separate the test case name and the comment with ':'.
#
# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
#
# Do not use any TAB characters for whitespace.
#
##############################################################################
innodb : MDEV-10549

View file

@ -10,3 +10,7 @@
#
##############################################################################
innodb.auto_increment_dup : MDEV-10548
innodb_skip_innodb_is_tables : MDEV-10200
innodb.innodb_bug13510739: MDEV-10549
innodb.defrag_mdl-9155 : MDEV-10551

View file

@ -23,6 +23,8 @@ call mtr.add_suppression(".*");
# create the table with compressed pages of size 8K.
CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255), KEY msg_i(msg)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
SHOW CREATE TABLE t1;
# percentage of compressions that will be forced to fail
SET GLOBAL innodb_simulate_comp_failures = 25;
@ -35,16 +37,16 @@ let $commit_iterations=50;
while ($num_inserts_ind)
{
let $repeat = `select floor(rand() * 10)`;
eval
INSERT INTO t1(id, msg)
VALUES ($num_inserts_ind, REPEAT('abcdefghijklmnopqrstuvwxyz', $repeat));
eval INSERT INTO t1(id, msg)
VALUES ($num_inserts_ind, REPEAT('abcdefghijklmnopqrstuvwxyz', $repeat));
dec $num_inserts_ind;
}
--enable_query_log
--enable_result_log
SELECT COUNT(*) FROM t1;
COMMIT;
SELECT COUNT(id) FROM t1;
--disable_query_log
--disable_result_log

View file

@ -124,3 +124,5 @@ delete from t1;
DROP TABLE t1;
DROP TABLE t2;
DROP PROCEDURE setcrash;
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -124,3 +124,5 @@ delete from t1;
DROP TABLE t1;
DROP TABLE t2;
DROP PROCEDURE setcrash;
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,4 +1,2 @@
create table innodb_table_monitor (a int) engine=InnoDB;
Warnings:
Warning 131 Using the table name innodb_table_monitor to enable diagnostic output is deprecated and may be removed in future releases. Use INFORMATION_SCHEMA or PERFORMANCE_SCHEMA tables or SET GLOBAL innodb_status_output=ON.
drop table innodb_table_monitor;

View file

@ -1,5 +1,11 @@
call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_large_prefix = OFF;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
# Test 1) Show the page size from Information Schema
SELECT variable_value FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_page_size';
@ -224,6 +230,8 @@ table_name row_format create_options
t1 Compressed row_format=COMPRESSED
DROP TABLE t1;
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
CREATE TABLE t2(d varchar(17) PRIMARY KEY) ENGINE=innodb DEFAULT CHARSET=utf8;
CREATE TABLE t3(a int PRIMARY KEY) ENGINE=innodb;
INSERT INTO t3 VALUES (22),(44),(33),(55),(66);
@ -368,11 +376,6 @@ UPDATE t1 SET s=@e;
CREATE INDEX t1t ON t1 (t(767));
UPDATE t1 SET t=@e;
ERROR HY000: Undo log record is too big.
CREATE INDEX t1u ON t1 (u(767));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
CREATE INDEX t1ut ON t1 (u(767), t(767));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
CREATE INDEX t1st ON t1 (s(767), t(767));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@ -416,11 +419,12 @@ t1 CREATE TABLE `t1` (
KEY `t1q` (`q`(767)),
KEY `t1r` (`r`(767)),
KEY `t1s` (`s`(767)),
KEY `t1t` (`t`(767)),
KEY `t1st` (`s`(767),`t`(767))
KEY `t1t` (`t`(767))
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
DROP TABLE t1;
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
Test an assertion failure on purge.
CREATE TABLE t1_purge (
@ -464,6 +468,8 @@ DELETE FROM t3_purge;
DELETE FROM t4_purge;
SET GLOBAL innodb_file_per_table=on;
SET GLOBAL innodb_file_format='Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET @r=REPEAT('a',500);
CREATE TABLE tlong(a int,
v1 varchar(500), v2 varchar(500), v3 varchar(500),
@ -552,7 +558,7 @@ SHOW WARNINGS;
Level Code Message
Error 1713 Undo log record is too big.
DROP TABLE bug12547647;
SET SESSION innodb_strict_mode = off;
SET SESSION innodb_strict_mode = on;
CREATE TABLE t1(
c text NOT NULL, d text NOT NULL,
PRIMARY KEY (c(767),d(767)))
@ -977,3 +983,7 @@ COL196 TEXT,
COL197 TEXT)
row_format=compact,ENGINE=INNODB;
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,5 +1,11 @@
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE t(a INT)ENGINE=InnoDB;
call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation.");
call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified.");
call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.");
call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: './test/t.ibd' OS error: .*");
call mtr.add_suppression("InnoDB: Ignoring tablespace `test/t` because it could not be opened.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .*");
call mtr.add_suppression("InnoDB: Error: trying to open a table, but could not$");
call mtr.add_suppression("MySQL is trying to open a table handle but the \.ibd file for$");
call mtr.add_suppression("InnoDB: Table 'test/t'$");
@ -17,5 +23,5 @@ ERROR 42S02: Table 'test.t1' doesn't exist
ALTER TABLE t DISCARD TABLESPACE;
Warnings:
Warning 1812 Tablespace is missing for table 'test/t'
Warning 1812 Tablespace is missing for table 't'
Warning 1812 Tablespace is missing for table 'test/t'
DROP TABLE t;

View file

@ -1,3 +1,4 @@
call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles!");
CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t3 (a INT PRIMARY KEY, b TEXT, c TEXT) ENGINE=InnoDB;
@ -18,7 +19,9 @@ a RIGHT(b,20)
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
connection default;
SET DEBUG_DBUG='+d,row_ins_extern_checkpoint';
SET DEBUG='+d,row_ins_extern_checkpoint';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET DEBUG_SYNC='before_row_ins_extern_latch SIGNAL rec_not_blob WAIT_FOR crash';
ROLLBACK;
BEGIN;
@ -38,7 +41,9 @@ a
1
2
3
SET DEBUG_DBUG='+d,crash_commit_before';
SET DEBUG='+d,crash_commit_before';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
INSERT INTO t2 VALUES (42);
ERROR HY000: Lost connection to MySQL server during query
disconnect con1;
@ -51,18 +56,25 @@ test.t1 check status OK
INSERT INTO t3 VALUES
(1,REPEAT('d',7000),REPEAT('e',100)),
(2,REPEAT('g',7000),REPEAT('h',100));
SET DEBUG_SYNC='before_row_upd_extern SIGNAL have_latch WAIT_FOR go';
SET DEBUG_SYNC='blob_write_middle SIGNAL go_sel WAIT_FOR go_upd';
UPDATE t3 SET c=REPEAT('f',3000) WHERE a=1;
# Connection con1:
connect con1,localhost,root,,;
SET DEBUG_SYNC='now WAIT_FOR have_latch';
SET DEBUG_SYNC='now WAIT_FOR go_sel';
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT @@tx_isolation;
@@tx_isolation
READ-UNCOMMITTED
SELECT a, RIGHT(b,20), RIGHT(c,20) FROM t3;
connect con2,localhost,root,,;
SET DEBUG_SYNC='now SIGNAL go';
a RIGHT(b,20) RIGHT(c,20)
2 gggggggggggggggggggg hhhhhhhhhhhhhhhhhhhh
set debug_sync='now SIGNAL go_upd';
# Connection default:
connection default;
# reap UPDATE t3 SET c=REPEAT('f',3000) WHERE a=1;
# Connection con1:
connection con1;
SELECT a, RIGHT(b,20), RIGHT(c,20) FROM t3;
a RIGHT(b,20) RIGHT(c,20)
1 dddddddddddddddddddd ffffffffffffffffffff
2 gggggggggggggggggggg hhhhhhhhhhhhhhhhhhhh
@ -73,11 +85,13 @@ Table Op Msg_type Msg_text
test.t1 check status OK
test.t2 check status OK
test.t3 check status OK
connection con2;
connect con2,localhost,root,,;
BEGIN;
INSERT INTO t2 VALUES (347);
connection default;
SET DEBUG_DBUG='+d,row_upd_extern_checkpoint';
SET DEBUG='+d,row_upd_extern_checkpoint';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET DEBUG_SYNC='before_row_upd_extern SIGNAL have_latch WAIT_FOR crash';
UPDATE t3 SET c=REPEAT('i',3000) WHERE a=2;
connection con2;
@ -86,7 +100,9 @@ SELECT info FROM information_schema.processlist
WHERE state = 'debug sync point: before_row_upd_extern';
info
UPDATE t3 SET c=REPEAT('i',3000) WHERE a=2
SET DEBUG_DBUG='+d,crash_commit_before';
SET DEBUG='+d,crash_commit_before';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
COMMIT;
ERROR HY000: Lost connection to MySQL server during query
disconnect con2;
@ -109,7 +125,9 @@ connect con2,localhost,root,,;
BEGIN;
INSERT INTO t2 VALUES (33101);
connection default;
SET DEBUG_DBUG='+d,row_upd_extern_checkpoint';
SET DEBUG='+d,row_upd_extern_checkpoint';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET DEBUG_SYNC='after_row_upd_extern SIGNAL have_latch WAIT_FOR crash';
UPDATE t3 SET c=REPEAT('j',3000) WHERE a=2;
connection con2;
@ -118,7 +136,9 @@ SELECT info FROM information_schema.processlist
WHERE state = 'debug sync point: after_row_upd_extern';
info
UPDATE t3 SET c=REPEAT('j',3000) WHERE a=2
SET DEBUG_DBUG='+d,crash_commit_before';
SET DEBUG='+d,crash_commit_before';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
COMMIT;
ERROR HY000: Lost connection to MySQL server during query
disconnect con2;

View file

@ -38,5 +38,7 @@ COUNT(*)
2
DROP TABLE testdb_wl5522.t1;
DROP DATABASE testdb_wl5522;
SET GLOBAL INNODB_FILE_FORMAT=Antelope;
SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL INNODB_FILE_PER_TABLE=1;

View file

@ -27,5 +27,7 @@ c1
SET AUTOCOMMIT = 1;
DROP TABLE testdb_wl5522.t1;
DROP DATABASE testdb_wl5522;
SET GLOBAL INNODB_FILE_FORMAT=Antelope;
SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL INNODB_FILE_PER_TABLE=1;

View file

@ -2,13 +2,13 @@
# Bug#69122 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE
# OPERATION IF IT IS DONE IN-PLACE
#
SET GLOBAL innodb_change_buffering_debug = 1;
CREATE TABLE t1(
a INT AUTO_INCREMENT PRIMARY KEY,
b CHAR(1),
c INT,
INDEX(b))
ENGINE=InnoDB;
ENGINE=InnoDB STATS_PERSISTENT=0;
SET GLOBAL innodb_change_buffering_debug = 1;
INSERT INTO t1 VALUES(0,'x',1);
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
@ -23,7 +23,6 @@ INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
BEGIN;
SELECT b FROM t1 LIMIT 3;
b
@ -35,7 +34,9 @@ connection con1;
BEGIN;
DELETE FROM t1 WHERE a=1;
INSERT INTO t1 VALUES(1,'X',1);
SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace';
SET DEBUG='+d,crash_after_log_ibuf_upd_inplace';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SELECT b FROM t1 LIMIT 3;
ERROR HY000: Lost connection to MySQL server during query
FOUND /Wrote log record for ibuf update in place operation/ in my_restart.err

View file

@ -16,7 +16,7 @@ CONSTRAINT test FOREIGN KEY (b) REFERENCES t2 (id)
ERROR HY000: Can't create table `test`.`t2` (errno: 121 "Duplicate key on write or update")
show warnings;
Level Code Message
Warning 121 Create or Alter table `test`.`t2` with foreign key constraint failed. Foreign key constraint `test/test` already exists on data dictionary. Foreign key constraint names need to be unique in database. Error in foreign key definition: CONSTRAINT `test` FOREIGN KEY (`b`) REFERENCES `test`.`t2` (`id`).
Warning 121 Create or Alter table `test`.`t2` with foreign key constraint failed. Foreign key constraint `test`.`test` already exists on data dictionary. Foreign key constraint names need to be unique in database. Error in foreign key definition: CONSTRAINT `test` FOREIGN KEY (`b`) REFERENCES `test`.`t2` (`id`).
Error 1005 Can't create table `test`.`t2` (errno: 121 "Duplicate key on write or update")
Warning 1022 Can't write; duplicate key in table 't2'
drop table t1;

View file

@ -1,5 +1,7 @@
set global innodb_file_per_table=on;
set global innodb_file_format='Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS;
create table t1(a varchar(2) primary key) engine=innodb;
insert into t1 values('');
@ -857,8 +859,12 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL PRIMARY 4 NULL 2 Using index
drop table t1;
set global innodb_file_per_table=1;
set global innodb_file_format=Antelope;
set global innodb_file_format_max=Antelope;
set global innodb_file_format=Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format_max=Barracuda;
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET FOREIGN_KEY_CHECKS=0;
CREATE TABLE t1(
@ -1189,3 +1195,7 @@ t2c CREATE TABLE `t2c` (
KEY `t2a` (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1,t2,t2c,t2i;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
Warnings:
Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,3 +1,4 @@
call mtr.add_suppression("InnoDB: User stopword table .* does not exist.");
select @@global.innodb_ft_server_stopword_table;
@@global.innodb_ft_server_stopword_table
NULL

View file

@ -1,3 +1,4 @@
call mtr.add_suppression("InnoDB: Cannot add field `.* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
call mtr.add_suppression("Row size too large (> 8126)*");
CREATE TABLE t1 ( text1 TEXT,
text2 TEXT,

View file

@ -1,4 +1,6 @@
set global innodb_file_format = `barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = on;
set global innodb_compression_algorithm = 5;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
@ -435,3 +437,5 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,4 +1,6 @@
set global innodb_file_format = `barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = on;
set global innodb_compression_algorithm = 2;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
@ -436,3 +438,5 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,4 +1,6 @@
set global innodb_file_format = `barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = on;
set global innodb_compression_algorithm = 4;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
@ -435,3 +437,5 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,4 +1,6 @@
set global innodb_file_format = `barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = on;
set global innodb_compression_algorithm = 3;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
@ -349,3 +351,5 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,5 +1,7 @@
call mtr.add_suppression("Compression failed for space*");
set global innodb_file_format = `barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = on;
set global innodb_compression_algorithm = 6;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
@ -436,3 +438,5 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
@ -91,6 +93,8 @@ select count(*) from innodb_dynamic where c1 < 1500000;
count(*)
5000
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 0;
alter table innodb_compact engine=innodb page_compressed=DEFAULT;
@ -119,3 +123,5 @@ drop procedure innodb_insert_proc;
drop table innodb_normal;
drop table innodb_compact;
drop table innodb_dynamic;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
@ -349,3 +351,5 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -23,6 +23,22 @@ deg_start_term char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginn
deg_as_of_term char(4) NOT NULL COMMENT 'In most cases also end term',
CONSTRAINT grad_degree_stu_plan_admit_pky PRIMARY KEY (student_id, plan, admit_term)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SHOW CREATE TABLE grad_degree;
Table Create Table
grad_degree CREATE TABLE `grad_degree` (
`student_id` int(8) unsigned NOT NULL,
`plan` varchar(10) NOT NULL,
`admit_term` char(4) NOT NULL,
`wdraw_rsn` varchar(4) NOT NULL DEFAULT '',
`ofis_deg_status` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed'
ELSE 'Not Completed'
END) VIRTUAL,
`deg_start_term` char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginning of the data',
`deg_as_of_term` char(4) NOT NULL COMMENT 'In most cases also end term',
PRIMARY KEY (`student_id`,`plan`,`admit_term`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
CREATE INDEX grad_degree_wdraw_rsn_ndx ON grad_degree (wdraw_rsn);
CREATE INDEX grad_degree_as_of_term_ndx ON grad_degree (deg_as_of_term);
INSERT IGNORE grad_degree (
@ -117,6 +133,57 @@ deg_start_term char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginn
deg_as_of_term char(4) NOT NULL COMMENT 'In most cases also end term',
CONSTRAINT grad_degree_stu_plan_admit_pky PRIMARY KEY (student_id, plan, admit_term)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SHOW CREATE TABLE grad_degree;
Table Create Table
grad_degree CREATE TABLE `grad_degree` (
`student_id` int(8) unsigned NOT NULL,
`plan` varchar(10) NOT NULL,
`admit_term` char(4) NOT NULL,
`wdraw_rsn` varchar(4) NOT NULL DEFAULT '',
`ofis_deg_status` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed'
ELSE 'Not Completed'
END) VIRTUAL,
`ofis_deg_status2` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress2'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed2'
ELSE 'Not Completed2'
END) VIRTUAL,
`ofis_deg_status3` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress3'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed3'
ELSE 'Not Completed3'
END) VIRTUAL,
`ofis_deg_status4` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress4'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed4'
ELSE 'Not Completed4'
END) VIRTUAL,
`ofis_deg_status5` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress5'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed5'
ELSE 'Not Completed5'
END) VIRTUAL,
`ofis_deg_status6` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress6'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed6'
ELSE 'Not Completed6'
END) VIRTUAL,
`ofis_deg_status7` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress7'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed7'
ELSE 'Not Completed7'
END) VIRTUAL,
`ofis_deg_status8` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress8'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed8'
ELSE 'Not Completed8'
END) VIRTUAL,
`deg_start_term` char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginning of the data',
`deg_as_of_term` char(4) NOT NULL COMMENT 'In most cases also end term',
PRIMARY KEY (`student_id`,`plan`,`admit_term`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
CREATE INDEX grad_degree_wdraw_rsn_ndx ON grad_degree (wdraw_rsn);
CREATE INDEX grad_degree_as_of_term_ndx ON grad_degree (deg_as_of_term);
INSERT IGNORE grad_degree (
@ -264,6 +331,57 @@ deg_start_term char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginn
deg_as_of_term char(4) NOT NULL COMMENT 'In most cases also end term',
CONSTRAINT grad_degree_stu_plan_admit_pky PRIMARY KEY (student_id, plan, admit_term)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SHOW CREATE TABLE grad_degree;
Table Create Table
grad_degree CREATE TABLE `grad_degree` (
`student_id` int(8) unsigned NOT NULL,
`plan` varchar(10) NOT NULL,
`admit_term` char(4) NOT NULL,
`wdraw_rsn` varchar(4) NOT NULL DEFAULT '',
`ofis_deg_status` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed'
ELSE 'Not Completed'
END) VIRTUAL,
`ofis_deg_status2` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress2'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed2'
ELSE 'Not Completed2'
END) VIRTUAL,
`ofis_deg_status3` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress3'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed3'
ELSE 'Not Completed3'
END) VIRTUAL,
`ofis_deg_status4` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress4'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed4'
ELSE 'Not Completed4'
END) VIRTUAL,
`ofis_deg_status5` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress5'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed5'
ELSE 'Not Completed5'
END) VIRTUAL,
`ofis_deg_status6` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress6'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed6'
ELSE 'Not Completed6'
END) VIRTUAL,
`ofis_deg_status7` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress7'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed7'
ELSE 'Not Completed7'
END) VIRTUAL,
`ofis_deg_status8` varchar(15) AS (CASE
WHEN wdraw_rsn = '' THEN 'In progress8'
WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed8'
ELSE 'Not Completed8'
END) VIRTUAL,
`deg_start_term` char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginning of the data',
`deg_as_of_term` char(4) NOT NULL COMMENT 'In most cases also end term',
PRIMARY KEY (`student_id`,`plan`,`admit_term`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
CREATE INDEX grad_degree_wdraw_rsn_ndx ON grad_degree (wdraw_rsn);
ALTER TABLE grad_degree DROP COLUMN ofis_deg_status2, DROP COLUMN ofis_deg_status3,
DROP COLUMN ofis_deg_status4, DROP COLUMN ofis_deg_status5, DROP COLUMN ofis_deg_status6,

View file

@ -1,9 +1,12 @@
call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
DROP TABLE IF EXISTS t1;
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
@ -126,6 +129,8 @@ COUNT(*)
2
DROP TABLE testdb_wl5522.t1;
SET GLOBAL innodb_file_format='Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
CREATE TABLE testdb_wl5522.t1 (
col_1_varbinary VARBINARY (4000) ,
col_2_varchar VARCHAR (4000),
@ -410,7 +415,7 @@ ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE;
restore: t1 .ibd and .cfg files
ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE;
ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Tablespace for table 't1' exists. Please DISCARD the tablespace before IMPORT.
ERROR HY000: Tablespace for table 'testdb_wl5522/t1' exists. Please DISCARD the tablespace before IMPORT.
SELECT * FROM testdb_wl5522.t1 ORDER BY i;
i
100
@ -807,5 +812,7 @@ DROP DATABASE testdb_wl5522;
call mtr.add_suppression("Got error -1 when reading table '.*'");
call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*");
call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");
SET GLOBAL INNODB_FILE_FORMAT=Antelope;
SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL INNODB_FILE_PER_TABLE=1;

View file

@ -1,8 +1,13 @@
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
call mtr.add_suppression("InnoDB: Error: Tablespace flags .* corrupted unused .*");
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
@ -49,6 +54,8 @@ SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
@ -86,7 +93,7 @@ ERROR HY000: Tablespace has been discarded for table 't1'
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_internal_error";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: While updating the <space, root page number> of index "GEN_CLUST_INDEX" - Generic error
ERROR HY000: Internal error: While updating the <space, root page number> of index GEN_CLUST_INDEX - Generic error
SET SESSION debug_dbug="-d,ib_import_internal_error";
restore: t1 .ibd and .cfg files
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
@ -99,7 +106,7 @@ ERROR HY000: Tablespace has been discarded for table 't1'
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_reset_space_and_lsn_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Too many concurrent transactions
ERROR HY000: Internal error: Cannot reset LSNs in table "test_wl5522"."t1" : Too many concurrent transactions
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="-d,ib_import_reset_space_and_lsn_failure";
SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
@ -442,7 +449,7 @@ t1 CREATE TABLE `t1` (
KEY `idx1` (`c2`),
KEY `idx2` (`c3`(512)),
KEY `idx3` (`c4`(512))
) ENGINE=InnoDB AUTO_INCREMENT=185 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
@ -473,7 +480,7 @@ ERROR HY000: Tablespace has been discarded for table 't1'
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Data structure corruption
ERROR HY000: Internal error: Cannot reset LSNs in table "test_wl5522"."t1" : Data structure corruption
SET SESSION debug_dbug="-d,ib_import_trigger_corruption_1";
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
@ -498,7 +505,7 @@ ERROR HY000: Tablespace has been discarded for table 't1'
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_trigger_corruption_2";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Index corrupt: Externally stored column(5) has a reference length of 19 in the cluster index "GEN_CLUST_INDEX"
ERROR HY000: Index corrupt: Externally stored column(5) has a reference length of 19 in the cluster index GEN_CLUST_INDEX
SET SESSION debug_dbug="-d,ib_import_trigger_corruption_2";
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
@ -563,7 +570,7 @@ ERROR HY000: Tablespace has been discarded for table 't1'
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Unsupported
ERROR HY000: Internal error: Cannot reset LSNs in table "test_wl5522"."t1" : Unsupported
SET SESSION debug_dbug="-d,fsp_flags_is_valid_failure";
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
@ -575,6 +582,12 @@ set global innodb_monitor_enable = default;
set global innodb_monitor_disable = default;
set global innodb_monitor_reset = default;
set global innodb_monitor_reset_all = default;
Warnings:
Error 145 Table './mtr/test_suppressions' is marked as crashed and should be repaired
Error 1194 Table 'test_suppressions' is marked as crashed and should be repaired
Error 1034 1 client is using or hasn't closed the table properly
SET GLOBAL INNODB_FILE_PER_TABLE=1;
SET GLOBAL INNODB_FILE_FORMAT=Antelope;
SET SESSION innodb_strict_mode=0;
SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET SESSION innodb_strict_mode=1;

View file

@ -1,9 +1,12 @@
call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
DROP TABLE IF EXISTS t1;
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
@ -74,9 +77,6 @@ ALTER TABLE t1 DISCARD TABLESPACE;
t1.frm
ALTER TABLE t1 IMPORT TABLESPACE;
ALTER TABLE t1 ENGINE InnoDB;
Warnings:
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
SELECT COUNT(*) FROM t1;
COUNT(*)
640
@ -112,6 +112,8 @@ SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
@ -124,7 +126,7 @@ c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
INSERT INTO t1(c2) VALUES(1);
ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Tablespace for table 't1' exists. Please DISCARD the tablespace before IMPORT.
ERROR HY000: Tablespace for table 'test/t1' exists. Please DISCARD the tablespace before IMPORT.
SELECT * FROM t1;
c1 c2
1 1
@ -459,7 +461,7 @@ t1 CREATE TABLE `t1` (
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `idx` (`c2`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
SELECT * FROM t1;
c1 c2
1 1
@ -498,6 +500,8 @@ DROP TABLE t1;
call mtr.add_suppression("Got error -1 when reading table '.*'");
call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*");
call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");
SET GLOBAL INNODB_FILE_FORMAT=Antelope;
SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL INNODB_FILE_PER_TABLE=1;
SET SESSION innodb_strict_mode=0;
SET SESSION innodb_strict_mode=1;

View file

@ -1,9 +1,12 @@
call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
DROP TABLE IF EXISTS t1;
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
@ -105,6 +108,8 @@ SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
@ -113,7 +118,7 @@ c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
c2 INT) ENGINE=InnoDB;
INSERT INTO t1(c2) VALUES(1);
ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Tablespace for table 't1' exists. Please DISCARD the tablespace before IMPORT.
ERROR HY000: Tablespace for table 'test/t1' exists. Please DISCARD the tablespace before IMPORT.
SELECT * FROM t1;
c1 c2
1 1
@ -426,7 +431,7 @@ t1 CREATE TABLE `t1` (
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `idx` (`c2`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1
SELECT * FROM t1;
c1 c2
1 1
@ -536,7 +541,7 @@ t1 CREATE TABLE `t1` (
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `idx` (`c2`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
SELECT * FROM t1;
c1 c2
1 1
@ -612,7 +617,7 @@ t1 CREATE TABLE `t1` (
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `idx` (`c2`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
SELECT * FROM t1;
c1 c2
1 1
@ -722,7 +727,7 @@ t1 CREATE TABLE `t1` (
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `idx` (`c2`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
SELECT * FROM t1;
c1 c2
1 1
@ -801,7 +806,7 @@ t1 CREATE TABLE `t1` (
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `idx` (`c2`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
SELECT * FROM t1;
c1 c2
1 1
@ -911,7 +916,7 @@ t1 CREATE TABLE `t1` (
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `idx` (`c2`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
SELECT * FROM t1;
c1 c2
1 1
@ -990,7 +995,7 @@ t1 CREATE TABLE `t1` (
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `idx` (`c2`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
SELECT * FROM t1;
c1 c2
1 1
@ -1029,5 +1034,7 @@ DROP TABLE t1;
call mtr.add_suppression("Got error -1 when reading table '.*'");
call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*");
call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");
SET GLOBAL INNODB_FILE_FORMAT=Antelope;
SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL INNODB_FILE_PER_TABLE=1;

View file

@ -947,6 +947,7 @@ desc t1;
Field Type Null Key Default Extra
t int(11) NO MUL 1
drop table t1;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
number bigint(20) NOT NULL default '0',
cname char(15) NOT NULL default '',
@ -1009,6 +1010,7 @@ select * from t2;
number cname carrier_id privacy last_mod_date last_mod_id last_app_date last_app_id version assigned_scps status
333 tubs 99 2 2002-01-09 11:34:53 501 2002-01-09 11:34:53 500 3 10 0
drop table t1,t2;
SET sql_mode = default;
create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
@ -1316,16 +1318,80 @@ INSERT INTO t2 VALUES (10, 'old'), (20, 'other');
UPDATE t1 SET c1 = 'other' WHERE c1 = 'old';
ERROR 23000: Foreign key constraint for table 't1', record 'other-somevalu' would lead to a duplicate entry in table 't2', key 'c1'
DROP TABLE t2,t1;
call mtr.add_suppression("Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 255. Please drop excessive foreign constraints and try again");
create table t1(
id int primary key,
pid int,
index(pid),
foreign key(pid) references t1(id) on delete cascade) engine=innodb;
insert into t1 values(0,0),(1,0),(2,1),(3,2),(4,3),(5,4),(6,5),(7,6),
(8,7),(9,8),(10,9),(11,10),(12,11),(13,12),(14,13),(15,14);
insert into t1 values
( 0, 0), ( 1, 0), ( 2, 1), ( 3, 2),
( 4, 3), ( 5, 4), ( 6, 5), ( 7, 6),
( 8, 7), ( 9, 8), ( 10, 9), ( 11, 10),
( 12, 11), ( 13, 12), ( 14, 13), ( 15, 14),
( 16, 15), ( 17, 16), ( 18, 17), ( 19, 18),
( 20, 19), ( 21, 20), ( 22, 21), ( 23, 22),
( 24, 23), ( 25, 24), ( 26, 25), ( 27, 26),
( 28, 27), ( 29, 28), ( 30, 29), ( 31, 30),
( 32, 31), ( 33, 32), ( 34, 33), ( 35, 34),
( 36, 35), ( 37, 36), ( 38, 37), ( 39, 38),
( 40, 39), ( 41, 40), ( 42, 41), ( 43, 42),
( 44, 43), ( 45, 44), ( 46, 45), ( 47, 46),
( 48, 47), ( 49, 48), ( 50, 49), ( 51, 50),
( 52, 51), ( 53, 52), ( 54, 53), ( 55, 54),
( 56, 55), ( 57, 56), ( 58, 57), ( 59, 58),
( 60, 59), ( 61, 60), ( 62, 61), ( 63, 62),
( 64, 63), ( 65, 64), ( 66, 65), ( 67, 66),
( 68, 67), ( 69, 68), ( 70, 69), ( 71, 70),
( 72, 71), ( 73, 72), ( 74, 73), ( 75, 74),
( 76, 75), ( 77, 76), ( 78, 77), ( 79, 78),
( 80, 79), ( 81, 80), ( 82, 81), ( 83, 82),
( 84, 83), ( 85, 84), ( 86, 85), ( 87, 86),
( 88, 87), ( 89, 88), ( 90, 89), ( 91, 90),
( 92, 91), ( 93, 92), ( 94, 93), ( 95, 94),
( 96, 95), ( 97, 96), ( 98, 97), ( 99, 98),
(100, 99), (101, 100), (102, 101), (103, 102),
(104, 103), (105, 104), (106, 105), (107, 106),
(108, 107), (109, 108), (110, 109), (111, 110),
(112, 111), (113, 112), (114, 113), (115, 114),
(116, 115), (117, 116), (118, 117), (119, 118),
(120, 119), (121, 120), (122, 121), (123, 122),
(124, 123), (125, 124), (126, 125), (127, 126),
(128, 127), (129, 128), (130, 129), (131, 130),
(132, 131), (133, 132), (134, 133), (135, 134),
(136, 135), (137, 136), (138, 137), (139, 138),
(140, 139), (141, 140), (142, 141), (143, 142),
(144, 143), (145, 144), (146, 145), (147, 146),
(148, 147), (149, 148), (150, 149), (151, 150),
(152, 151), (153, 152), (154, 153), (155, 154),
(156, 155), (157, 156), (158, 157), (159, 158),
(160, 159), (161, 160), (162, 161), (163, 162),
(164, 163), (165, 164), (166, 165), (167, 166),
(168, 167), (169, 168), (170, 169), (171, 170),
(172, 171), (173, 172), (174, 173), (175, 174),
(176, 175), (177, 176), (178, 177), (179, 178),
(180, 179), (181, 180), (182, 181), (183, 182),
(184, 183), (185, 184), (186, 185), (187, 186),
(188, 187), (189, 188), (190, 189), (191, 190),
(192, 191), (193, 192), (194, 193), (195, 194),
(196, 195), (197, 196), (198, 197), (199, 198),
(200, 199), (201, 200), (202, 201), (203, 202),
(204, 203), (205, 204), (206, 205), (207, 206),
(208, 207), (209, 208), (210, 209), (211, 210),
(212, 211), (213, 212), (214, 213), (215, 214),
(216, 215), (217, 216), (218, 217), (219, 218),
(220, 219), (221, 220), (222, 221), (223, 222),
(224, 223), (225, 224), (226, 225), (227, 226),
(228, 227), (229, 228), (230, 229), (231, 230),
(232, 231), (233, 232), (234, 233), (235, 234),
(236, 235), (237, 236), (238, 237), (239, 238),
(240, 239), (241, 240), (242, 241), (243, 242),
(244, 243), (245, 244), (246, 245), (247, 246),
(248, 247), (249, 248), (250, 249), (251, 250),
(252, 251), (253, 252), (254, 253), (255, 254);
delete from t1 where id=0;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `t1` (`id`) ON DELETE CASCADE)
delete from t1 where id=15;
Got one of the listed errors
delete from t1 where id=255;
delete from t1 where id=0;
drop table t1;
CREATE TABLE t1 (col1 int(1))ENGINE=InnoDB;
@ -1628,6 +1694,7 @@ a
drop table t1;
create table t1 (a int not null, b int not null, c blob not null, d int not null, e int, primary key (a,b,c(255),d)) engine=innodb;
insert into t1 values (2,2,"b",2,2),(1,1,"a",1,1),(3,3,"ab",3,3);
analyze table t1;
select * from t1 order by a,b,c,d;
a b c d e
1 1 a 1 1
@ -1689,10 +1756,10 @@ variable_value
16384
SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
variable_value - @innodb_rows_deleted_orig
71
311
SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
variable_value - @innodb_rows_inserted_orig
964
1204
SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
variable_value - @innodb_rows_updated_orig
866
@ -2259,7 +2326,7 @@ t1 CREATE TABLE `t1` (
drop table t1;
create table t1 (v varchar(10), c char(10)) row_format=fixed;
Warnings:
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@ -2287,9 +2354,16 @@ select * from t1 where a=20 and b is null;
a b
20 NULL
drop table t1;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
SET GLOBAL innodb_large_prefix=OFF;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1 (v varchar(65530), key(v));
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
SET GLOBAL innodb_large_prefix=default;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
drop table t1;
create table t1 (v varchar(65536));
Warnings:
@ -2309,7 +2383,8 @@ t1 CREATE TABLE `t1` (
`v` mediumtext CHARACTER SET utf8 DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
set storage_engine=MyISAM;
SET sql_mode = default;
set default_storage_engine=MyISAM;
create table t1 (v varchar(16384)) engine=innodb;
drop table t1;
create table t1 (a char(1), b char(1), key(a, b)) engine=innodb;
@ -2434,6 +2509,10 @@ t9 CREATE TABLE `t9` (
KEY `col1` (`col1`,`col2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1, t2, t3, t4, t5, t6, t7, t8, t9;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
SET GLOBAL innodb_large_prefix=OFF;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1 (col1 varchar(768), index(col1))
character set = latin1 engine = innodb;
Warnings:
@ -2450,6 +2529,9 @@ create table t4 (col1 blob, index(col1(768)))
character set = latin1 engine = innodb;
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
SET GLOBAL innodb_large_prefix=default;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@ -2457,6 +2539,9 @@ t1 CREATE TABLE `t1` (
KEY `col1` (`col1`(767))
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1, t2, t3, t4;
set global innodb_large_prefix=OFF;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1 (col1 varchar(768) primary key)
character set = latin1 engine = innodb;
ERROR 42000: Specified key was too long; max key length is 767 bytes
@ -2469,6 +2554,10 @@ ERROR 42000: Specified key was too long; max key length is 767 bytes
create table t4 (col1 blob, primary key(col1(768)))
character set = latin1 engine = innodb;
ERROR 42000: Specified key was too long; max key length is 767 bytes
SET sql_mode = default;
set global innodb_large_prefix=default;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
CREATE TABLE t1
(
id INT PRIMARY KEY
@ -2485,7 +2574,7 @@ INSERT INTO t2 VALUES(1);
DELETE FROM t1 WHERE id = 1;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
DROP TABLE t1;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
Got one of the listed errors
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE t1;
SET FOREIGN_KEY_CHECKS=1;
@ -2608,6 +2697,7 @@ d varchar(255) character set utf8,
e varchar(255) character set utf8,
key (a,b,c,d,e)) engine=innodb;
ERROR 42000: Specified key was too long; max key length is 3072 bytes
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 varbinary(2),primary key (s1)) engine=innodb;
create table t2 (s1 binary(2),primary key (s1)) engine=innodb;
create table t3 (s1 varchar(2) binary,primary key (s1)) engine=innodb;
@ -2723,6 +2813,7 @@ t2 CREATE TABLE `t2` (
KEY `t2_ibfk_0` (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t2,t1;
SET sql_mode = default;
CREATE TABLE t1 (
field1 varchar(8) NOT NULL DEFAULT '',
field2 varchar(8) NOT NULL DEFAULT '',
@ -3095,7 +3186,7 @@ t1 CREATE TABLE `t1` (
CONSTRAINT `t1_t2` FOREIGN KEY (`id`) REFERENCES `t2` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=349 DEFAULT CHARSET=latin1
DROP TABLE t1,t2;
set innodb_strict_mode=on;
SET innodb_strict_mode=ON;
CREATE TABLE t1 (
c01 CHAR(255), c02 CHAR(255), c03 CHAR(255), c04 CHAR(255),
c05 CHAR(255), c06 CHAR(255), c07 CHAR(255), c08 CHAR(255),
@ -3106,7 +3197,8 @@ c21 CHAR(255), c22 CHAR(255), c23 CHAR(255), c24 CHAR(255),
c25 CHAR(255), c26 CHAR(255), c27 CHAR(255), c28 CHAR(255),
c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
) ENGINE = InnoDB;
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
ERROR 42000: Row size too large (> {checked_valid}). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
SET innodb_strict_mode=OFF;
DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table 'test.t1'

View file

@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
create table t1(a blob) engine=innodb key_block_size=8;
create function generate_blob()
@ -17,3 +19,5 @@ truncate t1;
insert into t1 select generate_blob();
drop table t1;
drop function generate_blob;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html

View file

@ -1,24 +0,0 @@
call mtr.add_suppression("InnoDB: The total blob data length");
SET GLOBAL max_allowed_packet = 100*1024*1024;
connect big_packets,localhost,root,,;
connection big_packets;
CREATE TABLE t1 (a BIGINT PRIMARY KEY, b LONGBLOB) ENGINE=InnoDB;
INSERT INTO t1 (a, b) VALUES (1, '1');
INSERT INTO t1 (a, b) VALUES (2, '2');
INSERT INTO t1 (a, b) VALUES (3, '3');
INSERT INTO t1 (a, b) VALUES (4, '4');
INSERT INTO t1 (a, b) VALUES (5, '5');
start transaction;
INSERT INTO t1 (a, b) VALUES (6, REPEAT('a', 20*1024*1024));
ERROR 42000: The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size.
connection default;
# Quick shutdown and restart server
connection default;
SELECT a FROM t1;
a
1
2
3
4
5
DROP TABLE t1;

View file

@ -1,4 +1,5 @@
call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too*");
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot find a free slot for an undo log. Do you have too");
set @old_innodb_undo_logs = @@innodb_undo_logs;
set global innodb_undo_logs=1;
show variables like "max_connections";

View file

@ -1,6 +1,5 @@
call mtr.add_suppression("In ALTER TABLE .* has or is referenced in foreign key constraints which are not compatible with the new table definition.");
create table t1 (f1 integer primary key) engine innodb;
alter table t1 add constraint c1 foreign key (f1) references t1(f1);
ERROR HY000: Error on rename of '#sql-temporary' to './test/t1' (errno: 150 "Foreign key constraint is incorrectly formed")
InnoDB: has or is referenced in foreign key constraints
InnoDB: which are not compatible with the new table definition.
drop table t1;

View file

@ -1,31 +1,10 @@
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed.*");
CALL mtr.add_suppression("InnoDB: Error: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
CALL mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
CALL mtr.add_suppression("InnoDB: Database page corruption on disk or a failed");
CALL mtr.add_suppression("InnoDB: Space .* file test/t1 read of page .*");
CALL mtr.add_suppression("InnoDB: You may have to recover from a backup.");
CALL mtr.add_suppression("InnoDB: It is also possible that your operatingsystem has corrupted its own file cache.");
CALL mtr.add_suppression("InnoDB: and rebooting your computer removes the error.");
CALL mtr.add_suppression("InnoDB: If the corrupt page is an index page you can also try to");
CALL mtr.add_suppression("InnoDB: fix the corruption by dumping, dropping, and reimporting");
CALL mtr.add_suppression("InnoDB: the corrupt table. You can use CHECK");
CALL mtr.add_suppression("InnoDB: TABLE to scan your table for corruption.");
CALL mtr.add_suppression("InnoDB: See also .* about forcing recovery.");
# Create and populate the table to be corrupted
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=InnoDB;
INSERT INTO t1 (b) VALUES ('corrupt me');
INSERT INTO t1 (b) VALUES ('corrupt me');
# Write file to make mysql-test-run.pl expect the "crash", but don't
# start it until it's told to
# We give 30 seconds to do a clean shutdown because we do not want
# to redo apply the pages of t1.ibd at the time of recovery.
# We want SQL to initiate the first access to t1.ibd.
# Wait until disconnected.
# Backup the t1.ibd before corrupting
# Corrupt the table
Munged a string.
Munged a string.
# Write file to make mysql-test-run.pl start up the server again
SET DEBUG_DBUG = '+d,innodb_page_corruption_retries';
# Write file to make mysql-test-run.pl expect the "crash", but don't
# start it until it's told to
@ -34,6 +13,5 @@ SET DEBUG_DBUG = '+d,innodb_page_corruption_retries';
SELECT * FROM t1;
ERROR HY000: Lost connection to MySQL server during query
# Restore the original t1.ibd
# Write file to make mysql-test-run.pl start up the server again
# Cleanup
DROP TABLE t1;

View file

@ -48,9 +48,9 @@ ON orgs.org_id=sa_opportunities.org_id
LEFT JOIN bug30243_2 contacts
ON orgs.org_id=contacts.org_id ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE orgs index NULL org_id 4 NULL 128 Using index
1 SIMPLE sa_opportunities ref org_id org_id 5 test.orgs.org_id 1 Using index
1 SIMPLE contacts ref contacts$org_id contacts$org_id 5 test.orgs.org_id 1 Using index
1 SIMPLE orgs index NULL org_id 4 NULL ROWS Using index
1 SIMPLE sa_opportunities ref org_id org_id 5 test.orgs.org_id ROWS Using index
1 SIMPLE contacts ref contacts$org_id contacts$org_id 5 test.orgs.org_id ROWS Using index
select @@innodb_stats_method;
@@innodb_stats_method
nulls_ignored
@ -74,9 +74,9 @@ ON orgs.org_id=sa_opportunities.org_id
LEFT JOIN bug30243_2 contacts
ON orgs.org_id=contacts.org_id;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE orgs index NULL org_id 4 NULL 128 Using index
1 SIMPLE sa_opportunities ref org_id org_id 5 test.orgs.org_id 1 Using index
1 SIMPLE contacts ref contacts$org_id contacts$org_id 5 test.orgs.org_id 1 Using index
1 SIMPLE orgs index NULL org_id 4 NULL ROWS Using index
1 SIMPLE sa_opportunities ref org_id org_id 5 test.orgs.org_id ROWS Using index
1 SIMPLE contacts ref contacts$org_id contacts$org_id 5 test.orgs.org_id ROWS Using index
SELECT COUNT(*) FROM table_bug30423 WHERE org_id IS NULL;
COUNT(*)
1024

View file

@ -1 +1 @@
SET storage_engine=InnoDB;
SET default_storage_engine=InnoDB;

Some files were not shown because too many files have changed in this diff Show more