1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

dirty merge

This commit is contained in:
Oleksandr Byelkin
2019-02-07 13:59:31 +01:00
185 changed files with 5989 additions and 1902 deletions

View File

@ -242,8 +242,14 @@ ENDIF()
MY_CHECK_AND_SET_COMPILER_FLAG(-ggdb3 DEBUG)
OPTION(ENABLED_LOCAL_INFILE
"If we should should enable LOAD DATA LOCAL by default" ${IF_WIN})
SET(ENABLED_LOCAL_INFILE "AUTO" CACHE STRING "If we should should enable LOAD DATA LOCAL by default (OFF/ON/AUTO)")
IF (ENABLED_LOCAL_INFILE MATCHES "^(0|FALSE)$")
SET(ENABLED_LOCAL_INFILE OFF)
ELSEIF(ENABLED_LOCAL_INFILE MATCHES "^(1|TRUE)$")
SET(ENABLED_LOCAL_INFILE ON)
ELSEIF (NOT ENABLED_LOCAL_INFILE MATCHES "^(ON|OFF|AUTO)$")
MESSAGE(FATAL_ERROR "ENABLED_LOCAL_INFILE must be one of OFF, ON, AUTO")
ENDIF()
# Set DBUG_OFF and other optional release-only flags for non-debug project types
FOREACH(BUILD_TYPE RELEASE RELWITHDEBINFO MINSIZEREL)

View File

@ -83,6 +83,7 @@ ulong mysqld_net_retry_count = 10L;
ulong open_files_limit;
ulong opt_binlog_rows_event_max_size;
ulonglong test_flags = 0;
ulong opt_binlog_rows_event_max_encoded_size= MAX_MAX_ALLOWED_PACKET;
static uint opt_protocol= 0;
static FILE *result_file;
static char *result_file_name= 0;
@ -852,8 +853,14 @@ write_event_header_and_base64(Log_event *ev, FILE *result_file,
DBUG_ENTER("write_event_header_and_base64");
/* Write header and base64 output to cache */
if (ev->print_header(head, print_event_info, FALSE) ||
ev->print_base64(body, print_event_info, FALSE))
if (ev->print_header(head, print_event_info, FALSE))
DBUG_RETURN(ERROR_STOP);
DBUG_ASSERT(print_event_info->base64_output_mode == BASE64_OUTPUT_ALWAYS);
if (ev->print_base64(body, print_event_info,
print_event_info->base64_output_mode !=
BASE64_OUTPUT_DECODE_ROWS))
DBUG_RETURN(ERROR_STOP);
/* Read data from cache and write to result file */
@ -889,12 +896,15 @@ static bool print_base64(PRINT_EVENT_INFO *print_event_info, Log_event *ev)
type_str);
return 1;
}
return ev->print(result_file, print_event_info);
ev->print(result_file, print_event_info);
return
print_event_info->head_cache.error == -1 ||
print_event_info->body_cache.error == -1;
}
static bool print_row_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
ulong table_id, bool is_stmt_end)
ulonglong table_id, bool is_stmt_end)
{
Table_map_log_event *ignored_map=
print_event_info->m_table_map_ignored.get_table(table_id);
@ -1769,6 +1779,15 @@ that may lead to an endless loop.",
"This value must be a multiple of 256.",
&opt_binlog_rows_event_max_size, &opt_binlog_rows_event_max_size, 0,
GET_ULONG, REQUIRED_ARG, UINT_MAX, 256, ULONG_MAX, 0, 256, 0},
#ifndef DBUG_OFF
{"debug-binlog-row-event-max-encoded-size", 0,
"The maximum size of base64-encoded rows-event in one BINLOG pseudo-query "
"instance. When the computed actual size exceeds the limit "
"the BINLOG's argument string is fragmented in two.",
&opt_binlog_rows_event_max_encoded_size,
&opt_binlog_rows_event_max_encoded_size, 0,
GET_ULONG, REQUIRED_ARG, UINT_MAX/4, 256, ULONG_MAX, 0, 256, 0},
#endif
{"verify-binlog-checksum", 'c', "Verify checksum binlog events.",
(uchar**) &opt_verify_binlog_checksum, (uchar**) &opt_verify_binlog_checksum,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},

View File

@ -6118,7 +6118,6 @@ void do_connect(struct st_command *command)
#endif
if (opt_compress || con_compress)
mysql_options(con_slot->mysql, MYSQL_OPT_COMPRESS, NullS);
mysql_options(con_slot->mysql, MYSQL_OPT_LOCAL_INFILE, 0);
mysql_options(con_slot->mysql, MYSQL_SET_CHARSET_NAME,
csname?csname: charset_info->csname);
if (opt_charsets_dir)
@ -6218,6 +6217,11 @@ void do_connect(struct st_command *command)
if (con_slot == next_con)
next_con++; /* if we used the next_con slot, advance the pointer */
}
else // Failed to connect. Free the memory.
{
mysql_close(con_slot->mysql);
con_slot->mysql= NULL;
}
dynstr_free(&ds_connection_name);
dynstr_free(&ds_host);
@ -9326,7 +9330,6 @@ int main(int argc, char **argv)
(void *) &opt_connect_timeout);
if (opt_compress)
mysql_options(con->mysql,MYSQL_OPT_COMPRESS,NullS);
mysql_options(con->mysql, MYSQL_OPT_LOCAL_INFILE, 0);
mysql_options(con->mysql, MYSQL_SET_CHARSET_NAME,
charset_info->csname);
if (opt_charsets_dir)

View File

@ -86,7 +86,6 @@ IF(FEATURE_SET)
ENDIF()
ENDIF()
OPTION(ENABLED_LOCAL_INFILE "" ON)
SET(WITH_INNODB_SNAPPY OFF CACHE STRING "")
IF(WIN32)
SET(INSTALL_MYSQLTESTDIR "" CACHE STRING "")

View File

@ -26,7 +26,7 @@ ENDIF()
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})
# Set the patch version
SET(WSREP_PATCH_VERSION "23")
SET(WSREP_PATCH_VERSION "24")
# Obtain wsrep API version
FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION

View File

@ -444,7 +444,11 @@
/*
MySQL features
*/
#cmakedefine ENABLED_LOCAL_INFILE 1
#define LOCAL_INFILE_MODE_OFF 0
#define LOCAL_INFILE_MODE_ON 1
#define LOCAL_INFILE_MODE_AUTO 2
#define ENABLED_LOCAL_INFILE LOCAL_INFILE_MODE_@ENABLED_LOCAL_INFILE@
#cmakedefine ENABLED_PROFILING 1
#cmakedefine EXTRA_DEBUG 1
#cmakedefine USE_SYMDIR 1

View File

@ -234,8 +234,6 @@ long innobase_write_io_threads = 4;
longlong innobase_page_size = (1LL << 14); /* 16KB */
char* innobase_buffer_pool_filename = NULL;
longlong innobase_buffer_pool_size = 8*1024*1024L;
/* The default values for the following char* start-up parameters
are determined in innobase_init below: */
@ -1258,11 +1256,6 @@ struct my_option xb_server_options[] =
(G_PTR*) &sys_tablespace_auto_extend_increment,
(G_PTR*) &sys_tablespace_auto_extend_increment,
0, GET_ULONG, REQUIRED_ARG, 8L, 1L, 1000L, 0, 1L, 0},
{"innodb_buffer_pool_size", OPT_INNODB_BUFFER_POOL_SIZE,
"The size of the memory buffer InnoDB uses to cache data and indexes of its tables.",
(G_PTR*) &innobase_buffer_pool_size, (G_PTR*) &innobase_buffer_pool_size, 0,
GET_LL, REQUIRED_ARG, 8*1024*1024L, 1024*1024L, LONGLONG_MAX, 0,
1024*1024L, 0},
{"innodb_data_file_path", OPT_INNODB_DATA_FILE_PATH,
"Path to individual files and their sizes.", &innobase_data_file_path,
&innobase_data_file_path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@ -1576,11 +1569,23 @@ end:
}
static const char *xb_client_default_groups[]=
{ "xtrabackup", "mariabackup", "client", 0, 0, 0 };
static const char *xb_client_default_groups[]={
"xtrabackup", "mariabackup",
"client", "client-server",
"client-mariadb",
0, 0, 0
};
static const char *xb_server_default_groups[]=
{ "xtrabackup", "mariabackup", "mysqld", 0, 0, 0 };
static const char *xb_server_default_groups[]={
"xtrabackup", "mariabackup",
"mysqld", "server", MYSQL_BASE_VERSION,
"mariadb", MARIADB_BASE_VERSION,
"client-server",
#ifdef WITH_WSREP
"galera",
#endif
0, 0, 0
};
static void print_version(void)
{
@ -1822,13 +1827,6 @@ static bool innodb_init_param()
msg("mariabackup: use-memory can't be over 4GB"
" on 32-bit systems");
}
if (innobase_buffer_pool_size > UINT_MAX32) {
msg("mariabackup: innobase_buffer_pool_size can't be "
"over 4GB on 32-bit systems");
goto error;
}
}
static char default_path[2] = { FN_CURLIB, 0 };

View File

@ -614,7 +614,9 @@ static inline size_t my_b_bytes_in_cache(const IO_CACHE *info)
return (size_t) (info->read_end - info->read_pos);
}
int my_b_copy_to_file(IO_CACHE *cache, FILE *file);
int my_b_copy_to_file (IO_CACHE *cache, FILE *file, size_t count);
int my_b_copy_all_to_file(IO_CACHE *cache, FILE *file);
my_off_t my_b_append_tell(IO_CACHE* info);
my_off_t my_b_safe_tell(IO_CACHE* info); /* picks the correct tell() */
int my_b_pread(IO_CACHE *info, uchar *Buffer, size_t Count, my_off_t pos);

View File

@ -42,7 +42,7 @@ https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning */
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
# define MEM_CHECK_DEFINED(a,len) ((void) 0)
#else
# define MEM_UNDEFINED(a,len) ((void) 0)
# define MEM_UNDEFINED(a,len) ((void) (a), (void) (len))
# define MEM_NOACCESS(a,len) ((void) 0)
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
# define MEM_CHECK_DEFINED(a,len) ((void) 0)
@ -51,7 +51,7 @@ https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning */
#if !defined(DBUG_OFF) || defined(TRASH_FREED_MEMORY)
#define TRASH_FILL(A,B,C) do { const size_t trash_tmp= (B); MEM_UNDEFINED(A, trash_tmp); memset(A, C, trash_tmp); } while (0)
#else
#define TRASH_FILL(A,B,C) do { const size_t trash_tmp __attribute__((unused))= (B); MEM_UNDEFINED(A,trash_tmp); } while (0)
#define TRASH_FILL(A,B,C) do { MEM_UNDEFINED((A), (B)); } while (0)
#endif
#define TRASH_ALLOC(A,B) do { TRASH_FILL(A,B,0xA5); MEM_UNDEFINED(A,B); } while(0)

View File

@ -293,7 +293,7 @@ typedef struct st_mysql
/* session-wide random string */
char scramble[SCRAMBLE_LENGTH+1];
my_bool unused1;
my_bool auto_local_infile;
void *unused2, *unused3, *unused4, *unused5;
LIST *stmts; /* list of all statements */

View File

@ -382,7 +382,7 @@ typedef struct st_mysql
my_bool free_me;
my_bool reconnect;
char scramble[20 +1];
my_bool unused1;
my_bool auto_local_infile;
void *unused2, *unused3, *unused4, *unused5;
LIST *stmts;
const struct st_mysql_methods *methods;

View File

@ -86,7 +86,6 @@ call mtr.check_testcase();
let $datadir=`select @@datadir`;
list_files $datadir mysql_upgrade_info;
list_files_write_file $datadir.tempfiles.txt $datadir/test #sql*;
--replace_regex /#sql-ib[0-9a-f]+-[0-9a-f]+\.ibd\n//
cat_file $datadir.tempfiles.txt;
remove_file $datadir.tempfiles.txt;
list_files $datadir/mysql #sql*;

View File

@ -2467,6 +2467,55 @@ ERROR 23000: Duplicate entry '1' for key 'i'
UNLOCK TABLES;
DROP TABLE t1;
#
# MDEV-17599 ALTER TABLE DROP CONSTRAINT does not work for foreign keys.
#
CREATE TABLE t1(id INT PRIMARY KEY, c1 INT) ENGINE= INNODB;
CREATE TABLE t2(id INT PRIMARY KEY, c1 INT, c2 INT NOT NULL,
CONSTRAINT sid FOREIGN KEY (`c1`) REFERENCES t1 (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT UNIQUE `ui`(c2)) ENGINE= INNODB;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`id` int(11) NOT NULL,
`c1` int(11) DEFAULT NULL,
`c2` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `ui` (`c2`),
KEY `sid` (`c1`),
CONSTRAINT `sid` FOREIGN KEY (`c1`) REFERENCES `t1` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE t2 DROP CONSTRAINT sid;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`id` int(11) NOT NULL,
`c1` int(11) DEFAULT NULL,
`c2` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `ui` (`c2`),
KEY `sid` (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE t2 DROP CONSTRAINT ui;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`id` int(11) NOT NULL,
`c1` int(11) DEFAULT NULL,
`c2` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `sid` (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE t2 DROP CONSTRAINT PRIMARY KEY;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`id` int(11) NOT NULL,
`c1` int(11) DEFAULT NULL,
`c2` int(11) NOT NULL,
KEY `sid` (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t2, t1;
#
# End of 10.2 tests
#
#

View File

@ -2018,6 +2018,23 @@ UNLOCK TABLES;
DROP TABLE t1;
--echo #
--echo # MDEV-17599 ALTER TABLE DROP CONSTRAINT does not work for foreign keys.
--echo #
CREATE TABLE t1(id INT PRIMARY KEY, c1 INT) ENGINE= INNODB;
CREATE TABLE t2(id INT PRIMARY KEY, c1 INT, c2 INT NOT NULL,
CONSTRAINT sid FOREIGN KEY (`c1`) REFERENCES t1 (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT UNIQUE `ui`(c2)) ENGINE= INNODB;
SHOW CREATE TABLE t2;
ALTER TABLE t2 DROP CONSTRAINT sid;
SHOW CREATE TABLE t2;
ALTER TABLE t2 DROP CONSTRAINT ui;
SHOW CREATE TABLE t2;
ALTER TABLE t2 DROP CONSTRAINT PRIMARY KEY;
SHOW CREATE TABLE t2;
DROP TABLE t2, t1;
--echo #
--echo # End of 10.2 tests
--echo #

View File

@ -27,3 +27,9 @@ t2 CREATE TEMPORARY TABLE `t2` (
`a` int(11) DEFAULT NULL,
`v` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop temporary table t1, t2;
create temporary table t1 (a int);
alter table t1 add column f text;
insert into t1 values ('x','foo');
ERROR 22007: Incorrect integer value: 'x' for column `test`.`t1`.`a` at row 1
drop temporary table t1;

View File

@ -19,3 +19,13 @@ lock table t2 write;
--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter table t2 change column a b int, algorithm=inplace;
show create table t2;
drop temporary table t1, t2;
#
# MDEV-18083 ASAN heap-use-after-free in Field::set_warning_truncated_wrong_value upon inserting into temporary table
#
create temporary table t1 (a int);
alter table t1 add column f text;
--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
insert into t1 values ('x','foo');
drop temporary table t1;

View File

@ -95,3 +95,10 @@ Warnings:
Warning 4025 CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
alter table t1;
drop table t1;
create temporary table t1 (a int default 0, check (a > 0));
alter table t1 drop constraint if exists non_existing_constraint;
Warnings:
Note 1091 Can't DROP CONSTRAINT `non_existing_constraint`; check that it exists
insert into t1 () values ();
ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
drop table t1;

View File

@ -115,3 +115,12 @@ insert into t1 () values ();
alter ignore table t1 add constraint check (f > 0);
alter table t1;
drop table t1;
#
# MDEV-16905 ASAN heap-use-after-free in __interceptor_strnlen / ... / TABLE::verify_constraints upon INSERT into temporary table with CHECK constraint
#
create temporary table t1 (a int default 0, check (a > 0));
alter table t1 drop constraint if exists non_existing_constraint;
--error ER_CONSTRAINT_FAILED
insert into t1 () values ();
drop table t1;

View File

@ -44,7 +44,7 @@ a b
103 103
set check_constraint_checks=@save_check_constraint;
alter table t1 add c int default 0 check (c < 10);
ERROR 23000: CONSTRAINT `max` failed for table
ERROR 23000: CONSTRAINT `max` failed for `test`.`t1`
set check_constraint_checks=0;
alter table t1 add c int default 0 check (c < 10);
alter table t1 add check (a+b+c < 500);

View File

@ -27,7 +27,6 @@ insert into t1 values (101,101),(102,102),(600,600),(103,103);
select * from t1;
set check_constraint_checks=@save_check_constraint;
--replace_regex /failed for.*/failed for table/
--error ER_CONSTRAINT_FAILED
alter table t1 add c int default 0 check (c < 10);

View File

@ -0,0 +1,9 @@
create table t1 (a int, b smallint) engine=innodb;
connect con1,localhost,root,,test;
alter table t1 add constraint check (b < 8);
alter table t1 modify column b int, algorithm=inplace;
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type INPLACE. Try ALGORITHM=COPY
connection default;
alter table t1 add primary key (a);
drop table t1;
disconnect con1;

View File

@ -0,0 +1,14 @@
--source include/have_innodb.inc
#
# MDEV-18239 ASAN use-after-poison in process_str_arg / ... / mark_unsupported_func or unexpected ER_BAD_FIELD_ERROR upon ALTER TABLE
#
create table t1 (a int, b smallint) engine=innodb;
connect con1,localhost,root,,test;
alter table t1 add constraint check (b < 8);
error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON;
alter table t1 modify column b int, algorithm=inplace;
connection default;
alter table t1 add primary key (a);
drop table t1;
disconnect con1;

View File

@ -21,3 +21,4 @@ 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
partition_open_files_limit : open_files_limit check broken by MDEV-18360

View File

@ -1,6 +1,3 @@
DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (
a varchar(32) character set utf8 collate utf8_bin NOT NULL,
b varchar(32) character set utf8 collate utf8_bin NOT NULL )
@ -15,7 +12,7 @@ INSERT INTO t1 VALUES
set tmp_table_size=1024;
set session debug_dbug="+d,raise_error";
SELECT MAX(a) FROM t1 GROUP BY a,b;
ERROR 23000: Can't write; duplicate key in table 'tmp_table'
ERROR 23000: Can't write; duplicate key in table '(temporary)'
set tmp_table_size=default;
DROP TABLE t1;
#

View File

@ -1,12 +1,9 @@
-- source include/have_debug.inc
--source include/have_debug.inc
--source include/not_embedded.inc
#
# Bug #28499: crash for grouping query when tmp_table_size is too small
#
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
a varchar(32) character set utf8 collate utf8_bin NOT NULL,
b varchar(32) character set utf8 collate utf8_bin NOT NULL )
@ -26,14 +23,12 @@ set tmp_table_size=1024;
# tmp table in query is converted from heap to myisam
set session debug_dbug="+d,raise_error";
--replace_regex /in table '[^']+'/in table 'tmp_table'/
--error ER_DUP_KEY
SELECT MAX(a) FROM t1 GROUP BY a,b;
set tmp_table_size=default;
DROP TABLE t1;
--echo #
--echo # Bug #50946: fast index creation still seems to copy the table
--echo #

View File

@ -1483,6 +1483,14 @@ ip_full_addr
2000::
DROP PROCEDURE p1;
#
# MDEV-18195 ASAN use-after-poison in my_strcasecmp_utf8 / Item::eq upon prepared statement with ORDER BY NAME_CONST
#
PREPARE stmt FROM "SELECT 'x' ORDER BY NAME_CONST( 'f', 'foo' )";
EXECUTE stmt;
x
x
DEALLOCATE PREPARE stmt;
#
# Start of 10.2 tests
#
#

View File

@ -1130,6 +1130,14 @@ DELIMITER ;$$
CALL p1();
DROP PROCEDURE p1;
--echo #
--echo # MDEV-18195 ASAN use-after-poison in my_strcasecmp_utf8 / Item::eq upon prepared statement with ORDER BY NAME_CONST
--echo #
PREPARE stmt FROM "SELECT 'x' ORDER BY NAME_CONST( 'f', 'foo' )";
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
--echo #
--echo # Start of 10.2 tests

View File

@ -762,7 +762,6 @@ drop table t1;
--echo # on char > 31 bytes".
--echo #
create table t1(a char(32) not null) engine=myisam;
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
--error ER_WRONG_ARGUMENTS
create spatial index i on t1 (a);
drop table t1;

View File

@ -600,3 +600,18 @@ a
2
drop table "a1\""b1";
set sql_mode=default;
create table t1 (a text);
select count(*) from t1;
count(*)
41
truncate table t1;
select count(*) from t1;
count(*)
41
truncate table t1;
select count(*) from t1;
count(*)
0
truncate table t1;
### FIXME: update libmariadb
drop table t1;

View File

@ -680,3 +680,26 @@ show create table "a1\""b1";
select * from "a1\""b1";
drop table "a1\""b1";
set sql_mode=default;
#
# mysql --local-infile
#
--let $ldli = load data local infile '$MYSQLTEST_VARDIR/tmp/bug.sql' into table test.t1;
create table t1 (a text);
--exec $MYSQL -e "$ldli"
select count(*) from t1; truncate table t1;
--exec $MYSQL --enable-local-infile -e "$ldli"
select count(*) from t1; truncate table t1;
--error 1
--exec $MYSQL --disable-local-infile -e "$ldli"
select count(*) from t1; truncate table t1;
--echo ### FIXME: update libmariadb
#--error 1
#--exec $MYSQL -e "/*q*/$ldli"
#select count(*) from t1; truncate table t1;
#--exec $MYSQL --enable-local-infile -e "/*q*/$ldli"
#select count(*) from t1; truncate table t1;
# --error 1
# --exec $MYSQL --disable-local-infile -e "/*q*/$ldli"
#select count(*) from t1; truncate table t1;
drop table t1;

View File

@ -237,43 +237,64 @@ BEGIN
#Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL
#<date> server id 1 end_log_pos 2591 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2591
<<<<<<< HEAD:mysql-test/main/mysqlbinlog_row_minimal.result
#<date> server id 1 end_log_pos 2665 CRC32 XXX Update_rows: table id 33 flags: STMT_END_F
||||||| merged common ancestors
#<date> server id 1 end_log_pos 2665 CRC32 XXX Update_rows: table id 32 flags: STMT_END_F
=======
#<date> server id 1 end_log_pos 2657 CRC32 XXX Update_rows: table id 32 flags: STMT_END_F
>>>>>>> 10.2:mysql-test/r/mysqlbinlog_row_minimal.result
### UPDATE `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
### @5=4 /* INT meta=0 nullable=1 is_null=0 */
### SET
### @5=5 /* INT meta=0 nullable=1 is_null=0 */
### UPDATE `test`.`t2`
### WHERE
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
### @5=4 /* INT meta=0 nullable=1 is_null=0 */
### SET
### @5=5 /* INT meta=0 nullable=1 is_null=0 */
### UPDATE `test`.`t2`
### WHERE
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
### @5=NULL /* INT meta=0 nullable=1 is_null=1 */
### SET
### @5=5 /* INT meta=0 nullable=1 is_null=0 */
<<<<<<< HEAD:mysql-test/main/mysqlbinlog_row_minimal.result
# Number of rows: 3
# at 2665
#<date> server id 1 end_log_pos 2738 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
||||||| merged common ancestors
# at 2665
#<date> server id 1 end_log_pos 2738 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
=======
# at 2657
#<date> server id 1 end_log_pos 2730 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
>>>>>>> 10.2:mysql-test/r/mysqlbinlog_row_minimal.result
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 2738
#<date> server id 1 end_log_pos 2780 CRC32 XXX GTID 0-1-9
# at 2730
#<date> server id 1 end_log_pos 2772 CRC32 XXX GTID 0-1-9
/*!100001 SET @@session.gtid_seq_no=9*//*!*/;
BEGIN
/*!*/;
# at 2780
# at 2817
#<date> server id 1 end_log_pos 2817 CRC32 XXX Annotate_rows:
# at 2772
# at 2809
#<date> server id 1 end_log_pos 2809 CRC32 XXX Annotate_rows:
#Q> DELETE FROM t1
<<<<<<< HEAD:mysql-test/main/mysqlbinlog_row_minimal.result
#<date> server id 1 end_log_pos 2873 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 2873
#<date> server id 1 end_log_pos 2927 CRC32 XXX Delete_rows: table id 32 flags: STMT_END_F
||||||| merged common ancestors
#<date> server id 1 end_log_pos 2873 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 2873
#<date> server id 1 end_log_pos 2927 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F
=======
#<date> server id 1 end_log_pos 2865 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 2865
#<date> server id 1 end_log_pos 2919 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F
>>>>>>> 10.2:mysql-test/r/mysqlbinlog_row_minimal.result
### DELETE FROM `test`.`t1`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -286,24 +307,42 @@ BEGIN
### DELETE FROM `test`.`t1`
### WHERE
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
<<<<<<< HEAD:mysql-test/main/mysqlbinlog_row_minimal.result
# Number of rows: 4
# at 2927
#<date> server id 1 end_log_pos 3000 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
||||||| merged common ancestors
# at 2927
#<date> server id 1 end_log_pos 3000 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
=======
# at 2919
#<date> server id 1 end_log_pos 2992 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
>>>>>>> 10.2:mysql-test/r/mysqlbinlog_row_minimal.result
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 3000
#<date> server id 1 end_log_pos 3042 CRC32 XXX GTID 0-1-10
# at 2992
#<date> server id 1 end_log_pos 3034 CRC32 XXX GTID 0-1-10
/*!100001 SET @@session.gtid_seq_no=10*//*!*/;
BEGIN
/*!*/;
# at 3042
# at 3079
#<date> server id 1 end_log_pos 3079 CRC32 XXX Annotate_rows:
# at 3034
# at 3071
#<date> server id 1 end_log_pos 3071 CRC32 XXX Annotate_rows:
#Q> DELETE FROM t2
<<<<<<< HEAD:mysql-test/main/mysqlbinlog_row_minimal.result
#<date> server id 1 end_log_pos 3135 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 3135
#<date> server id 1 end_log_pos 3189 CRC32 XXX Delete_rows: table id 33 flags: STMT_END_F
||||||| merged common ancestors
#<date> server id 1 end_log_pos 3135 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 3135
#<date> server id 1 end_log_pos 3189 CRC32 XXX Delete_rows: table id 32 flags: STMT_END_F
=======
#<date> server id 1 end_log_pos 3127 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 3127
#<date> server id 1 end_log_pos 3181 CRC32 XXX Delete_rows: table id 32 flags: STMT_END_F
>>>>>>> 10.2:mysql-test/r/mysqlbinlog_row_minimal.result
### DELETE FROM `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -316,14 +355,90 @@ BEGIN
### DELETE FROM `test`.`t2`
### WHERE
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
<<<<<<< HEAD:mysql-test/main/mysqlbinlog_row_minimal.result
# Number of rows: 4
# at 3189
#<date> server id 1 end_log_pos 3262 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
||||||| merged common ancestors
# at 3189
#<date> server id 1 end_log_pos 3262 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
=======
# at 3181
#<date> server id 1 end_log_pos 3254 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
>>>>>>> 10.2:mysql-test/r/mysqlbinlog_row_minimal.result
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 3262
#<date> server id 1 end_log_pos 3310 CRC32 XXX Rotate to master-bin.000002 pos: 4
# at 3254
#<date> server id 1 end_log_pos 3302 CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
DROP TABLE t1,t2;
CREATE TABLE `t1` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`is_deleted` BIT(1) DEFAULT b'0',
`last_updated` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`ref_id` BIGINT(20) UNSIGNED NOT NULL,
PRIMARY KEY (`id`),
KEY `last_updated_KEY` (`last_updated`)
);
CREATE TABLE `t2` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`short_desc` VARCHAR(50) NOT NULL,
PRIMARY KEY (`id`)
);
INSERT INTO t2 (id, short_desc) VALUES (1, 'test');
INSERT INTO t1 (id, is_deleted, ref_id) VALUES (1, b'0', 1);
FLUSH BINARY LOGS;
UPDATE t1 t1 INNER JOIN t2 t2 ON t1.ref_id = t2.id
SET t1.is_deleted = TRUE
WHERE t1.id = 1;
FLUSH BINARY LOGS;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 387
#<date> server id 1 end_log_pos 429 CRC32 XXX GTID 0-1-16
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=16*//*!*/;
BEGIN
/*!*/;
# at 429
# at 543
#<date> server id 1 end_log_pos 543 CRC32 XXX Annotate_rows:
#Q> UPDATE t1 t1 INNER JOIN t2 t2 ON t1.ref_id = t2.id
#Q> SET t1.is_deleted = TRUE
#Q> WHERE t1.id =
#<date> server id 1 end_log_pos 594 CRC32 XXX Table_map: `test`.`t1` mapped to number 34
# at 594
#<date> server id 1 end_log_pos 643 CRC32 XXX Update_rows: table id 34 flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
### @1=1 /* LONGINT meta=0 nullable=0 is_null=0 */
### SET
### @2=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
### @3=X /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
# at 643
#<date> server id 1 end_log_pos 725 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=5/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
COMMIT
/*!*/;
# at 725
#<date> server id 1 end_log_pos 773 CRC32 XXX Rotate to master-bin.000004 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;

View File

@ -26,8 +26,49 @@ DELETE FROM t2;
--let $datadir = `SELECT @@datadir`
FLUSH BINARY LOGS;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /mapped to number \d*/mapped to number num/ /CRC32 0x[0-9a-f]+/CRC32 XXX/
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog
DROP TABLE t1,t2;
#
# MDEV-14605 ON UPDATE CURRENT_TIMESTAMP fields by multi-table UPDATE are not logged with binlog_row_image=MINIMAL
#
CREATE TABLE `t1` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`is_deleted` BIT(1) DEFAULT b'0',
`last_updated` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`ref_id` BIGINT(20) UNSIGNED NOT NULL,
PRIMARY KEY (`id`),
KEY `last_updated_KEY` (`last_updated`)
);
CREATE TABLE `t2` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`short_desc` VARCHAR(50) NOT NULL,
PRIMARY KEY (`id`)
);
INSERT INTO t2 (id, short_desc) VALUES (1, 'test');
INSERT INTO t1 (id, is_deleted, ref_id) VALUES (1, b'0', 1);
FLUSH BINARY LOGS;
--let $binlog_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
UPDATE t1 t1 INNER JOIN t2 t2 ON t1.ref_id = t2.id
SET t1.is_deleted = TRUE
WHERE t1.id = 1;
--let $binlog = query_get_value(SHOW MASTER STATUS, File, 1)
FLUSH BINARY LOGS;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /@3=\d*/@3=X/ /CRC32 0x[0-9a-f]+/CRC32 XXX/
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog --start-position=$binlog_pos
DROP TABLE t1,t2;

View File

@ -83,3 +83,19 @@ checksum table t1 extended;
Table Checksum
test.t1 452555338
drop table t1;
#
# MDEV-17085: CHECKSUM TABLE EXTENDED does not work correctly
#
CREATE TABLE t1 ( c1 int NOT NULL, c2 int NOT NULL, c4 varchar(20), c5 varchar(20), c6 varchar(20), c7 varchar(20), c8 varchar(20), c9 varchar(20), c10 varchar(20), c11 varchar(20), c12 varchar(20), c13 varchar(20), c14 varchar(20), c15 varchar(20), c16 varchar(20), c19 int NOT NULL, c20 int NOT NULL, c21 varchar(20), c22 VARCHAR(20), c23 varchar(20));
insert into t1 values (5,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,"dog",NULL,NULL);
# Important is that checksum is different from following
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 2514025256
UPDATE t1 SET c21='cat' WHERE c1=5;
# Important is that checksum is different from above
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 2326430205
drop table t1;
# End of 5.5 tests

View File

@ -83,3 +83,19 @@ checksum table t1 extended;
Table Checksum
test.t1 229851577
drop table t1;
#
# MDEV-17085: CHECKSUM TABLE EXTENDED does not work correctly
#
CREATE TABLE t1 ( c1 int NOT NULL, c2 int NOT NULL, c4 varchar(20), c5 varchar(20), c6 varchar(20), c7 varchar(20), c8 varchar(20), c9 varchar(20), c10 varchar(20), c11 varchar(20), c12 varchar(20), c13 varchar(20), c14 varchar(20), c15 varchar(20), c16 varchar(20), c19 int NOT NULL, c20 int NOT NULL, c21 varchar(20), c22 VARCHAR(20), c23 varchar(20));
insert into t1 values (5,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,"dog",NULL,NULL);
# Important is that checksum is different from following
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 2514025256
UPDATE t1 SET c21='cat' WHERE c1=5;
# Important is that checksum is different from above
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 2326430205
drop table t1;
# End of 5.5 tests

View File

@ -60,3 +60,20 @@ checksum table t1;
checksum table t1 quick;
checksum table t1 extended;
drop table t1;
--echo #
--echo # MDEV-17085: CHECKSUM TABLE EXTENDED does not work correctly
--echo #
CREATE TABLE t1 ( c1 int NOT NULL, c2 int NOT NULL, c4 varchar(20), c5 varchar(20), c6 varchar(20), c7 varchar(20), c8 varchar(20), c9 varchar(20), c10 varchar(20), c11 varchar(20), c12 varchar(20), c13 varchar(20), c14 varchar(20), c15 varchar(20), c16 varchar(20), c19 int NOT NULL, c20 int NOT NULL, c21 varchar(20), c22 VARCHAR(20), c23 varchar(20));
insert into t1 values (5,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,"dog",NULL,NULL);
--echo # Important is that checksum is different from following
CHECKSUM TABLE t1 EXTENDED;
UPDATE t1 SET c21='cat' WHERE c1=5;
--echo # Important is that checksum is different from above
CHECKSUM TABLE t1 EXTENDED;
drop table t1;
--echo # End of 5.5 tests

View File

@ -394,3 +394,25 @@ select null in (select a from t1 where a < out3.a union select a from t2 where
(select a from t3) +1 < out3.a+1) from t3 out3;
ERROR 21000: Subquery returns more than 1 row
drop table t1, t2, t3;
CREATE TABLE t1(
q11 int, q12 int, q13 int, q14 int, q15 int, q16 int, q17 int, q18 int, q19 int,
q21 int, q22 int, q23 int, q24 int, q25 int, q26 int, q27 int, q28 int, q29 int,
f1 int
);
CREATE TABLE t2(f2 int, f21 int, f3 timestamp, f4 int, f5 int, f6 int);
INSERT INTO t1 (f1) VALUES (1),(1),(2),(2);
INSERT INTO t2 VALUES (1,1,"2004-02-29 11:11:11",0,0,0), (2,2,"2004-02-29 11:11:11",0,0,0);
SELECT f1,
(SELECT t.f21 from t2 t where max(
q11+q12+q13+q14+q15+q16+q17+q18+q19+
q21+q22+q23+q24+q25+q26+q27+q28+q29) = t.f2 UNION
SELECT t.f3 FROM t2 AS t WHERE t1.f1=t.f2 AND t.f3=MAX(t1.f1) UNION
SELECT 1 LIMIT 1) AS test
FROM t1 GROUP BY f1;
f1 test
1 1
2 1
Warnings:
Warning 1292 Incorrect datetime value: '1'
Warning 1292 Incorrect datetime value: '2'
DROP TABLE t1,t2;

View File

@ -411,3 +411,23 @@ insert into t3 select a from t1;
select null in (select a from t1 where a < out3.a union select a from t2 where
(select a from t3) +1 < out3.a+1) from t3 out3;
drop table t1, t2, t3;
#
# Bug #28499924: INCORRECT BEHAVIOR WITH UNION IN SUBQUERY
#
CREATE TABLE t1(
q11 int, q12 int, q13 int, q14 int, q15 int, q16 int, q17 int, q18 int, q19 int,
q21 int, q22 int, q23 int, q24 int, q25 int, q26 int, q27 int, q28 int, q29 int,
f1 int
);
CREATE TABLE t2(f2 int, f21 int, f3 timestamp, f4 int, f5 int, f6 int);
INSERT INTO t1 (f1) VALUES (1),(1),(2),(2);
INSERT INTO t2 VALUES (1,1,"2004-02-29 11:11:11",0,0,0), (2,2,"2004-02-29 11:11:11",0,0,0);
SELECT f1,
(SELECT t.f21 from t2 t where max(
q11+q12+q13+q14+q15+q16+q17+q18+q19+
q21+q22+q23+q24+q25+q26+q27+q28+q29) = t.f2 UNION
SELECT t.f3 FROM t2 AS t WHERE t1.f1=t.f2 AND t.f3=MAX(t1.f1) UNION
SELECT 1 LIMIT 1) AS test
FROM t1 GROUP BY f1;
DROP TABLE t1,t2;

View File

@ -2865,6 +2865,22 @@ SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 );
f
DROP TABLE t1, t2;
#
# MDEV-18255: Server crashes in Bitmap<64u>::intersect
#
create table t1 (v1 varchar(1)) engine=myisam ;
create table t2 (v1 varchar(1)) engine=myisam ;
explain
select 1 from t1 where exists
(select 1 from t1 where t1.v1 in (select t2.v1 from t2 having t2.v1 < 'j')) ;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table
3 MATERIALIZED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
select 1 from t1 where exists
(select 1 from t1 where t1.v1 in (select t2.v1 from t2 having t2.v1 < 'j')) ;
1
drop table t1,t2;
#
# MDEV-9489: Assertion `0' failed in Protocol::end_statement() on
# UNION ALL
#

View File

@ -268,6 +268,19 @@ SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 );
SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 );
DROP TABLE t1, t2;
--echo #
--echo # MDEV-18255: Server crashes in Bitmap<64u>::intersect
--echo #
create table t1 (v1 varchar(1)) engine=myisam ;
create table t2 (v1 varchar(1)) engine=myisam ;
explain
select 1 from t1 where exists
(select 1 from t1 where t1.v1 in (select t2.v1 from t2 having t2.v1 < 'j')) ;
select 1 from t1 where exists
(select 1 from t1 where t1.v1 in (select t2.v1 from t2 having t2.v1 < 'j')) ;
drop table t1,t2;
--echo #
--echo # MDEV-9489: Assertion `0' failed in Protocol::end_statement() on
--echo # UNION ALL

View File

@ -30,7 +30,7 @@ partition by list (a)
(partition p0 values in (1), partition p1 values in (2));
insert into t1 values (1), (2);
create index inx on t1 (a);
ERROR HY000: Can't create table `db99`.`#sql-temporary` (errno: 140 "Wrong create options")
ERROR HY000: Can't create table `db99`.`t1` (errno: 140 "Wrong create options")
alter table t1 add partition (partition p2 values in (3));
alter table t1 drop partition p2;
use test;
@ -141,7 +141,7 @@ t1 CREATE TABLE `t1` (
PARTITION BY HASH (`fld1`)
PARTITIONS 5
ALTER TABLE t1 ENGINE= ARCHIVE;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
#After the patch, the ENGINE is correctly displayed as MyISAM
SHOW CREATE TABLE t1;
Table Create Table

View File

@ -47,7 +47,7 @@ engine=archive
partition by list (a)
(partition p0 values in (1), partition p1 values in (2));
insert into t1 values (1), (2);
--replace_regex /#sql-[0-9a-f_]+/#sql-temporary/ /Not owner/Operation not permitted/
--replace_regex /Not owner/Operation not permitted/
--error ER_CANT_CREATE_TABLE
create index inx on t1 (a);
alter table t1 add partition (partition p2 values in (3));
@ -138,7 +138,6 @@ CREATE TABLE t1 (fld1 INT PRIMARY KEY) ENGINE= MYISAM PARTITION BY HASH(fld1)
PARTITIONS 5;
SHOW CREATE TABLE t1;
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CANT_CREATE_TABLE
ALTER TABLE t1 ENGINE= ARCHIVE;

View File

@ -28,6 +28,25 @@ a
1
1
3
DELETE FROM t1 WHERE a=3;
BINLOG '
ODdYRw8BAAAAZgAAAGoAAAABAAQANS4xLjIzLXJjLWRlYnVnLWxvZwAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAA4N1hHEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
';
SET @binlog_fragment_0='
TFtYRxMBAAAAKQAAAH8BAAAAABAAAAAAAAAABHRlc3QAAnQxAAEDAAE=
TFtYRxcBAAAAIgAAAKEBAAAQABAAAAAAAAEAAf/+AwAAAA==
';
SET @binlog_fragment_1='';
BINLOG @binlog_fragment_0, @binlog_fragment_1;
select * from t1;
a
1
1
3
SELECT @binlog_fragment_0, @binlog_fragment_1 as 'NULL','NULL';
@binlog_fragment_0 NULL NULL
NULL NULL NULL
==== Test --base64-output=never on a binlog with row events ====
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;

View File

@ -0,0 +1,24 @@
CREATE TABLE t (a TEXT);
RESET MASTER;
INSERT INTO t SET a=repeat('a', 1024);
SELECT a from t into @a;
FLUSH LOGS;
DELETE FROM t;
FOUND 1 /BINLOG @binlog_fragment_0, @binlog_fragment_1/ in mysqlbinlog.sql
SELECT a LIKE @a as 'true' FROM t;
true
1
BINLOG number-of-fragments must be exactly two
BINLOG @binlog_fragment;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
BINLOG @binlog_fragment, @binlog_fragment, @binlog_fragment;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' @binlog_fragment' at line 1
SET @binlog_fragment_0='012345';
SET @binlog_fragment_1='012345';
BINLOG @binlog_fragment_0, @binlog_fragment_1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use
SET @binlog_fragment_0='012345';
BINLOG @binlog_fragment_0, @binlog_fragment_not_exist;
ERROR 42000: Incorrect argument type to variable 'binlog_fragment_not_exist'
# Cleanup
DROP TABLE t;

View File

@ -67,6 +67,28 @@ TFtYRxcBAAAAIgAAAKEBAAAQABAAAAAAAAEAAf/+AwAAAA==
# The above line should succeed and 3 should be in the table
select * from t1;
# The same as above with one-fragment BINLOG to prove
# equivalency with the fragmented BINLOG @frag_0, @frag_1.
DELETE FROM t1 WHERE a=3;
# This is a binlog statement containing a Format_description_log_event
# from the same version as the Table_map and Write_rows_log_event.
BINLOG '
ODdYRw8BAAAAZgAAAGoAAAABAAQANS4xLjIzLXJjLWRlYnVnLWxvZwAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAA4N1hHEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
';
# This is a Table_map_log_event+Write_rows_log_event corresponding to:
# INSERT INTO TABLE test.t1 VALUES (3)
SET @binlog_fragment_0='
TFtYRxMBAAAAKQAAAH8BAAAAABAAAAAAAAAABHRlc3QAAnQxAAEDAAE=
TFtYRxcBAAAAIgAAAKEBAAAQABAAAAAAAAEAAf/+AwAAAA==
';
SET @binlog_fragment_1='';
BINLOG @binlog_fragment_0, @binlog_fragment_1;
# The above line should succeed and 3 should be in the table:
select * from t1;
# show "one-shot" feature of binlog_fragment variables
SELECT @binlog_fragment_0, @binlog_fragment_1 as 'NULL','NULL';
# New mysqlbinlog supports --base64-output=never
--echo ==== Test --base64-output=never on a binlog with row events ====

View File

@ -0,0 +1,46 @@
--source include/have_debug.inc
--source include/have_binlog_format_row.inc
--let $MYSQLD_DATADIR= `select @@datadir`
CREATE TABLE t (a TEXT);
# events of interest are guaranteed to stay in 000001 log
RESET MASTER;
--eval INSERT INTO t SET a=repeat('a', 1024)
SELECT a from t into @a;
FLUSH LOGS;
DELETE FROM t;
# Todo: MDEV-10362 to test multi-row Rows_log_event:s in verbose mode
--exec $MYSQL_BINLOG -vv --debug-binlog-row-event-max-encoded-size=256 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
--let SEARCH_PATTERN= BINLOG @binlog_fragment_0, @binlog_fragment_1
--let SEARCH_FILE= $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
--source include/search_pattern_in_file.inc
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
SELECT a LIKE @a as 'true' FROM t;
# improper syntax error
--echo BINLOG number-of-fragments must be exactly two
--error ER_PARSE_ERROR
BINLOG @binlog_fragment;
--error ER_PARSE_ERROR
BINLOG @binlog_fragment, @binlog_fragment, @binlog_fragment;
# corrupted fragments error check (to the expected error code notice,
# the same error code occurs in a similar unfragmented case)
SET @binlog_fragment_0='012345';
SET @binlog_fragment_1='012345';
--error ER_SYNTAX_ERROR
BINLOG @binlog_fragment_0, @binlog_fragment_1;
# Not existing fragment is not allowed
SET @binlog_fragment_0='012345';
--error ER_WRONG_TYPE_FOR_VAR
BINLOG @binlog_fragment_0, @binlog_fragment_not_exist;
--echo # Cleanup
--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
DROP TABLE t;

View File

@ -65,11 +65,11 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
CREATE TABLE t2 (a int not null primary key) engine=innodb;
ALTER TABLE t2 ENCRYPTION_KEY_ID=4, ALGORITHM=COPY;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
ERROR HY000: Can't create table `test`.`t2` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
Warning 140 InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
Error 1005 Can't create table `test`.`t2` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
SHOW CREATE TABLE t2;
Table Create Table

View File

@ -10,7 +10,7 @@ DROP TABLE t1;
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=YES ENGINE=INNODB;
ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate), ALGORITHM=COPY;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate), FORCE, ALGORITHM=INPLACE;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED'
ALTER TABLE t1 ADD SPATIAL INDEX(coordinate);

View File

@ -92,10 +92,8 @@ SHOW CREATE TABLE t1;
DROP TABLE t1;
CREATE TABLE t2 (a int not null primary key) engine=innodb;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error ER_CANT_CREATE_TABLE
ALTER TABLE t2 ENCRYPTION_KEY_ID=4, ALGORITHM=COPY;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
SHOW WARNINGS;
SHOW CREATE TABLE t2;

View File

@ -9,7 +9,6 @@
# (1) Do not allow creating table with ENCRYPTED=YES
#
#
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB
@ -31,7 +30,6 @@ CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=YES ENGINE=INNODB;
# FIXME: MDEV-13851 Encrypted table refuses some form of ALGORITHM=COPY,
# but allows rebuild by FORCE
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error ER_CANT_CREATE_TABLE
ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate), ALGORITHM=COPY;
--error ER_ILLEGAL_HA_CREATE_OPTION

View File

@ -19,6 +19,7 @@ ORDER BY VARIABLE_NAME;
VARIABLE_NAME VARIABLE_VALUE
WSREP_AUTO_INCREMENT_CONTROL ON
WSREP_CAUSAL_READS ON
WSREP_CERTIFICATION_RULES strict
WSREP_CERTIFY_NONPK ON
WSREP_CLUSTER_ADDRESS gcomm://
WSREP_CLUSTER_NAME my_wsrep_cluster

View File

@ -1,9 +1,11 @@
connection node_1;
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 3
1
SET GLOBAL wsrep_provider_options = 'pc.weight=3';
SELECT VARIABLE_VALUE = 5 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 5
1
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
connection node_2;
SET SESSION wsrep_sync_wait=0;
@ -14,6 +16,7 @@ Variable_name Value
wsrep_cluster_size 2
SHOW STATUS LIKE 'wsrep_cluster_weight';
Variable_name Value
wsrep_cluster_weight 0
SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
wsrep_cluster_status non-Primary
@ -38,6 +41,7 @@ Variable_name Value
wsrep_cluster_size 2
SHOW STATUS LIKE 'wsrep_cluster_weight';
Variable_name Value
wsrep_cluster_weight 0
SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
wsrep_cluster_status non-Primary
@ -56,6 +60,7 @@ wsrep_local_state_comment Initialized
connection node_1;
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 3
1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
@ -74,7 +79,13 @@ VARIABLE_VALUE = 'Synced'
SET GLOBAL wsrep_provider_options = 'pc.weight=1';
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 1
<<<<<<< HEAD
connection node_1;
||||||| merged common ancestors
=======
1
connection node_1;
>>>>>>> 10.2
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
connection node_2;
connection node_3;
@ -84,6 +95,7 @@ VARIABLE_VALUE = 3
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 3
1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
@ -105,6 +117,7 @@ VARIABLE_VALUE = 3
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 3
1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
@ -126,6 +139,7 @@ VARIABLE_VALUE = 3
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
VARIABLE_VALUE = 3
1
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1

View File

@ -11,8 +11,15 @@ connection node_1;
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
<<<<<<< HEAD
connection node_3;
connection node_1;
||||||| merged common ancestors
=======
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_3;
connection node_1;
>>>>>>> 10.2
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 1']
@ -28,6 +35,7 @@ Killing server ...
safe_to_bootstrap: 1
safe_to_bootstrap: 0
safe_to_bootstrap: 0
<<<<<<< HEAD
connection node_1;
connection node_2;
connection node_3;
@ -37,13 +45,25 @@ CALL mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster fro
CALL mtr.add_suppression("WSREP: wsrep::connect(.*) failed: 7");
CALL mtr.add_suppression("Aborting");
CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0");
||||||| merged common ancestors
=======
connection node_1;
connection node_2;
connection node_3;
connection node_2;
>>>>>>> 10.2
CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
<<<<<<< HEAD
connection node_3;
CALL mtr.add_suppression("WSREP: no nodes coming from prim view, prim not possible");
CALL mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node");
CALL mtr.add_suppression("WSREP: wsrep::connect(.*) failed: 7");
CALL mtr.add_suppression("Aborting");
CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0");
||||||| merged common ancestors
=======
connection node_3;
>>>>>>> 10.2
CALL mtr.add_suppression("Failed to prepare for incremental state transfer");
SHOW CREATE TABLE t1;
Table Create Table

View File

@ -49,10 +49,25 @@ push @::global_suppressions,
qr|WSREP: discarding established \(time wait\) .*|,
qr(WSREP: There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside. Will use that one.),
qr(WSREP: evs::proto.*),
<<<<<<< HEAD
qr|WSREP: Ignoring possible split-brain \(allowed by configuration\) from view:.*|,
||||||| merged common ancestors
qr|WSREP: Ignoring possible split-brain (allowed by configuration) from view:.*|,
=======
qr|WSREP: Ignoring possible split-brain \(allowed by configuration\) from view:.*|,
qr(WSREP: no nodes coming from prim view, prim not possible),
>>>>>>> 10.2
qr(WSREP: Member .* requested state transfer from .* but it is impossible to select State Transfer donor: Resource temporarily unavailable),
<<<<<<< HEAD
qr(WSREP: .* sending install message failed: Transport endpoint is not connected),
qr(WSREP: .* sending install message failed: Resource temporarily unavailable),
||||||| merged common ancestors
=======
qr(WSREP: user message in state LEAVING),
qr(WSREP: .* sending install message failed: Transport endpoint is not connected),
qr(WSREP: .* sending install message failed: Resource temporarily unavailable),
qr(WSREP: Sending JOIN failed: -107 \(Transport endpoint is not connected\). Will retry in new primary component.),
>>>>>>> 10.2
qr(WSREP: Could not find peer:),
qr|WSREP: gcs_caused\(\) returned .*|,
qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(SYNCED\). Message ignored.|,
@ -65,6 +80,7 @@ push @::global_suppressions,
$ENV{PATH}="$epath:$ENV{PATH}";
$ENV{PATH}="$spath:$ENV{PATH}" unless $epath eq $spath;
<<<<<<< HEAD
$ENV{PATH}="$cpath:$ENV{PATH}" unless $cpath eq $spath;
$ENV{PATH}="$bpath:$ENV{PATH}" unless $bpath eq $spath;
@ -86,6 +102,30 @@ sub skip_combinations {
unless $ENV{MTR_GALERA_TFMT};
%skip;
}
||||||| merged common ancestors
=======
$ENV{PATH}="$cpath:$ENV{PATH}" unless $cpath eq $spath;
$ENV{PATH}="$bpath:$ENV{PATH}" unless $bpath eq $spath;
if (which(socat)) {
$ENV{MTR_GALERA_TFMT}='socat';
} elsif (which(nc)) {
$ENV{MTR_GALERA_TFMT}='nc';
}
sub skip_combinations {
my %skip = ();
$skip{'include/have_filekeymanagement.inc'} = 'needs file_key_management plugin'
unless $ENV{FILE_KEY_MANAGEMENT_SO};
$skip{'suite/galera/include/have_mariabackup.inc'} = 'Need mariabackup'
unless which(mariabackup);
$skip{'suite/galera/include/have_mariabackup.inc'} = 'Need ss'
unless which(ss);
$skip{'suite/galera/include/have_mariabackup.inc'} = 'Need socat or nc'
unless $ENV{MTR_GALERA_TFMT};
%skip;
}
>>>>>>> 10.2
bless { };

View File

@ -4,7 +4,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_mariabackup.inc
--source suite/galera/include/have_mariabackup.inc
--let $galera_connection_name = node_3
--let $galera_server_number = 3

View File

@ -0,0 +1 @@
--bind-address=:: --skip-innodb-safe-truncate

View File

@ -150,7 +150,6 @@ create table t2 (a int);
alter table t1 add constraint foreign key fk(d) references t2(a);
if ($support_virtual_foreign)
{
--replace_regex /`#sql-.*`/`#sql-temporary`/
--error ER_CANT_CREATE_TABLE
alter table t1 add constraint foreign key fk(b) references t2(a);
}

View File

@ -156,7 +156,6 @@ create table t1 (a int, b int generated always as (a+1) virtual,
foreign key (b) references t2(a));
create table t1 (a int, b int generated always as (a+1) virtual);
--replace_regex /`#sql-.*`/`#sql-temporary`/
--error ER_CANT_CREATE_TABLE
alter table t1 add foreign key (b) references t2(a);
drop table t1;

View File

@ -153,7 +153,7 @@ foreign key (b) references t2(a));
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
create table t1 (a int, b int generated always as (a+1) virtual);
alter table t1 add foreign key (b) references t2(a);
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
drop table t1;
# Allowed FK options.
create table t2 (a int primary key, b char(5));

View File

@ -702,7 +702,7 @@ v3 TIME AS (c3) VIRTUAL,
v4 CHAR(10) AS (c4) VIRTUAL
) ENGINE=InnoDB;
ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
SET foreign_key_checks=0;
ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk' in the foreign table 't1'
@ -725,7 +725,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE t1 DROP FOREIGN KEY fk;
ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (

View File

@ -590,7 +590,6 @@ CREATE TABLE t1 (
v3 TIME AS (c3) VIRTUAL,
v4 CHAR(10) AS (c4) VIRTUAL
) ENGINE=InnoDB;
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CANT_CREATE_TABLE
ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
SET foreign_key_checks=0;
@ -601,7 +600,6 @@ ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
SET foreign_key_checks=1;
SHOW CREATE TABLE t1;
ALTER TABLE t1 DROP FOREIGN KEY fk;
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CANT_CREATE_TABLE
ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
SHOW CREATE TABLE t1;

View File

@ -6,7 +6,7 @@ create table t2(a int, b int, key(a),key(b))engine=innodb;
alter table t2 add constraint b foreign key (b) references t1(a);
alter table t1 add constraint b1 foreign key (b) references t2(a);
alter table t2 add constraint b1 foreign key (b) references t1(a);
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 121 "Duplicate key on write or update")
ERROR HY000: Can't create table `test`.`t2` (errno: 121 "Duplicate key on write or update")
alter table t2 drop foreign key b;
alter table t1 drop foreign key b1;
drop table t2;

View File

@ -21,6 +21,6 @@ Tables_in_bug
parent
alter table parent row_format=dynamic;
Warnings:
Warning 1088 InnoDB: Could not add foreign key constraints.
Warning 1088 failed to load FOREIGN KEY constraints
drop table parent;
drop database bug;

View File

@ -457,3 +457,12 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
DROP PROCEDURE get_index_id;
DROP PROCEDURE get_table_id;
create table t (a varchar(100)) engine=innodb;
select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a';
name pos mtype prtype len
a 0 1 524303 100
alter table t modify a varchar(110), algorithm=inplace;
select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a';
name pos mtype prtype len
a 0 1 524303 110
drop table t;

View File

@ -10,7 +10,7 @@ ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint
create table t2 (f1 int primary key,
constraint c1 foreign key (f1) references t1(f1)) engine=innodb;
alter table t2 add constraint c1 foreign key (f1) references t1(f1);
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 121 "Duplicate key on write or update")
ERROR HY000: Can't create table `test`.`t2` (errno: 121 "Duplicate key on write or update")
set foreign_key_checks = 0;
alter table t2 add constraint c1 foreign key (f1) references t1(f1);
ERROR HY000: Duplicate FOREIGN KEY constraint name 'test/c1'
@ -206,6 +206,39 @@ connection default;
ERROR 70100: Query execution was interrupted
disconnect fk;
DROP TABLE t3,t1;
#
# MDEV-18222 InnoDB: Failing assertion: heap->magic_n == MEM_BLOCK_MAGIC_N
# or ASAN heap-use-after-free in dict_foreign_remove_from_cache upon CHANGE COLUMN
#
CREATE TABLE t1 (a INT, UNIQUE(a), KEY(a)) ENGINE=InnoDB;
ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES t1 (a);
SET SESSION FOREIGN_KEY_CHECKS = OFF;
ALTER TABLE t1 CHANGE COLUMN a a TIME NOT NULL;
ALTER TABLE t1 ADD pk INT NOT NULL AUTO_INCREMENT PRIMARY KEY;
ALTER TABLE t1 CHANGE COLUMN a b TIME;
SET SESSION FOREIGN_KEY_CHECKS = ON;
DROP TABLE t1;
#
# MDEV-18256 InnoDB: Failing assertion: heap->magic_n == MEM_BLOCK_MAGIC_N
# upon DROP FOREIGN KEY
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (b INT PRIMARY KEY, FOREIGN KEY fk1 (b) REFERENCES t1 (a))
ENGINE=InnoDB;
ALTER TABLE t2 DROP FOREIGN KEY fk1, DROP FOREIGN KEY fk1;
DROP TABLE t2, t1;
CREATE TABLE t1 (f VARCHAR(256)) ENGINE=InnoDB;
SET SESSION FOREIGN_KEY_CHECKS = OFF;
ALTER TABLE t1 ADD FOREIGN KEY (f) REFERENCES non_existing_table (x);
SET SESSION FOREIGN_KEY_CHECKS = ON;
ALTER TABLE t1 ADD FULLTEXT INDEX ft1 (f);
Warnings:
Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID
Warning 1088 failed to load FOREIGN KEY constraints
ALTER TABLE t1 ADD FULLTEXT INDEX ft2 (f);
Warnings:
Warning 1088 failed to load FOREIGN KEY constraints
DROP TABLE t1;
# Start of 10.2 tests
#
# MDEV-13246 Stale rows despite ON DELETE CASCADE constraint

View File

@ -39,21 +39,21 @@ Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is
Warning 1215 Cannot add foreign key constraint for `t2`
create table t2(a int, b int, constraint a foreign key a (a) references t1(a)) engine=innodb;
alter table t2 add constraint b foreign key (b) references t2(b);
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
Warning 150 Alter table '`test`.`t2`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns near ' foreign key (b) references t2(b)'.
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint
drop table t2, t1;
create table t1 (f1 integer primary key) engine=innodb;
alter table t1 add constraint c1 foreign key (f1) references t11(f1);
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
Warning 150 Alter table `test`.`t1` with foreign key constraint failed. Referenced table `test`.`t11` not found in the data dictionary near ' foreign key (f1) references t11(f1)'.
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
Error 1005 Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint
drop table t1;
create temporary table t1(a int not null primary key, b int, key(b)) engine=innodb;
create temporary table t2(a int, foreign key(a) references t1(a)) engine=innodb;
@ -78,12 +78,12 @@ Warning 150 Create table `mysqld.1`.`t2` with foreign key constraint failed. Re
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `t2`
alter table t1 add foreign key(b) references t1(a);
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
Warning 150 Alter table `mysqld.1`.`t1` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary near 'foreign key(b) references t1(a)'.
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
Error 1005 Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint
drop table t1;
create table t1(a int not null primary key, b int, key(b)) engine=innodb;
alter table t1 add foreign key(a,b) references t1(a);
@ -101,12 +101,12 @@ Error 1239 Incorrect foreign key definition for 'foreign key without name': Key
drop table t1;
create table t1 (f1 integer not null primary key) engine=innodb;
alter table t1 add constraint c1 foreign key (f1) references t1(f1) on update set null;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
Warning 150 Alter table `test`.`t1` with foreign key constraint failed. You have defined a SET NULL condition but column 'f1' is defined as NOT NULL in ' foreign key (f1) references t1(f1) on update set null' near ' on update set null'.
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
Error 1005 Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint
create table t2(a int not null, foreign key(a) references t1(f1) on delete set null) engine=innodb;
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;

View File

@ -62,12 +62,12 @@ PRIMARY KEY (`id`),
CONSTRAINT fk2 FOREIGN KEY (f2) REFERENCES t1 (`id`) ON DELETE CASCADE
) ENGINE=InnoDB;
ALTER TABLE t2 ADD CONSTRAINT fk3 FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
Warning 150 Alter table `test`.`t2` with foreign key constraint failed. Referenced table `test`.`t3` not found in the data dictionary near ' FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE'.
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint
drop table t2;
drop table t1;
CREATE DATABASE kg_test1;

View File

@ -513,7 +513,7 @@ SET DEBUG_SYNC = 'RESET';
disconnect con1;
CREATE TABLE t2 (c VARCHAR(64)) ENGINE=InnoDB;
ALTER TABLE t2 ADD FOREIGN KEY (c) REFERENCES t1 (c);
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
DROP TABLE t2,t1;
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
SET GLOBAL innodb_monitor_enable = default;

View File

@ -506,7 +506,7 @@ t4 CREATE TABLE `t4` (
CONSTRAINT `dc` FOREIGN KEY (`a`) REFERENCES `t1` (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
alter table t3 add constraint dc foreign key (a) references t1(a);
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 121 "Duplicate key on write or update")
ERROR HY000: Can't create table `test`.`t3` (errno: 121 "Duplicate key on write or update")
SET FOREIGN_KEY_CHECKS=0;
alter table t3 add constraint dc foreign key (a) references t1(a);
ERROR HY000: Failed to add the foreign key constraint 'test/dc' to system tables
@ -951,13 +951,13 @@ PRIMARY KEY (c1)
SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1), ALGORITHM=COPY;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1);
ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2), ALGORITHM=COPY;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
@ -966,13 +966,13 @@ FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1), ALGORITHM=INPLACE;
ERROR HY000: Failed to add the foreign key constraint on table 't2'. Incorrect options in FOREIGN KEY constraint 'test/fk_t2_ca'
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1), ALGORITHM=COPY;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
ALTER TABLE t1 MODIFY COLUMN c2 BIGINT(12) NOT NULL;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2), ALGORITHM=COPY;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'

View File

@ -10,11 +10,11 @@ f1 f2
insert into t1 values(2, 3);
ERROR HY000: Running in read-only mode
alter table t1 add f3 int not null, algorithm=copy;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 165 "Table is read only")
ERROR HY000: Can't create table `test`.`t1` (errno: 165 "Table is read only")
alter table t1 add f3 int not null, algorithm=inplace;
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY
drop index idx on t1;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 165 "Table is read only")
ERROR HY000: Can't create table `test`.`t1` (errno: 165 "Table is read only")
alter table t1 drop index idx, algorithm=inplace;
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY
update t1 set f1=3 where f2=2;
@ -38,11 +38,11 @@ f1 f2
insert into t2 values(2, 3);
ERROR HY000: Running in read-only mode
alter table t2 add f3 int not null, algorithm=copy;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 165 "Table is read only")
ERROR HY000: Can't create table `test`.`t2` (errno: 165 "Table is read only")
alter table t2 add f3 int not null, algorithm=inplace;
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY
drop index idx on t2;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 165 "Table is read only")
ERROR HY000: Can't create table `test`.`t2` (errno: 165 "Table is read only")
update t2 set f1=3 where f2=2;
ERROR HY000: Running in read-only mode
create table t1(f1 int not null)engine=innodb;

View File

@ -1,9 +0,0 @@
create table t (a varchar(100)) engine=innodb;
select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a';
name pos mtype prtype len
a 0 1 524303 100
alter table t modify a varchar(110), algorithm=inplace;
select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a';
name pos mtype prtype len
a 0 1 524303 110
drop table t;

View File

@ -10,7 +10,6 @@ create table t2(a int, b int, key(a),key(b))engine=innodb;
alter table t2 add constraint b foreign key (b) references t1(a);
alter table t1 add constraint b1 foreign key (b) references t2(a);
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CANT_CREATE_TABLE
alter table t2 add constraint b1 foreign key (b) references t1(a);

View File

@ -334,3 +334,10 @@ DROP TABLE t1;
DROP PROCEDURE get_index_id;
DROP PROCEDURE get_table_id;
# LEN must increase here
create table t (a varchar(100)) engine=innodb;
select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a';
alter table t modify a varchar(110), algorithm=inplace;
select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a';
drop table t;

View File

@ -14,7 +14,6 @@ constraint c1 foreign key (f1) references t1(f1)) engine=InnoDB;
create table t2 (f1 int primary key,
constraint c1 foreign key (f1) references t1(f1)) engine=innodb;
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CANT_CREATE_TABLE
alter table t2 add constraint c1 foreign key (f1) references t1(f1);
@ -191,6 +190,37 @@ disconnect fk;
DROP TABLE t3,t1;
--echo #
--echo # MDEV-18222 InnoDB: Failing assertion: heap->magic_n == MEM_BLOCK_MAGIC_N
--echo # or ASAN heap-use-after-free in dict_foreign_remove_from_cache upon CHANGE COLUMN
--echo #
CREATE TABLE t1 (a INT, UNIQUE(a), KEY(a)) ENGINE=InnoDB;
ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES t1 (a);
SET SESSION FOREIGN_KEY_CHECKS = OFF;
ALTER TABLE t1 CHANGE COLUMN a a TIME NOT NULL;
ALTER TABLE t1 ADD pk INT NOT NULL AUTO_INCREMENT PRIMARY KEY;
ALTER TABLE t1 CHANGE COLUMN a b TIME;
SET SESSION FOREIGN_KEY_CHECKS = ON;
DROP TABLE t1;
--echo #
--echo # MDEV-18256 InnoDB: Failing assertion: heap->magic_n == MEM_BLOCK_MAGIC_N
--echo # upon DROP FOREIGN KEY
--echo #
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (b INT PRIMARY KEY, FOREIGN KEY fk1 (b) REFERENCES t1 (a))
ENGINE=InnoDB;
ALTER TABLE t2 DROP FOREIGN KEY fk1, DROP FOREIGN KEY fk1;
DROP TABLE t2, t1;
CREATE TABLE t1 (f VARCHAR(256)) ENGINE=InnoDB;
SET SESSION FOREIGN_KEY_CHECKS = OFF;
ALTER TABLE t1 ADD FOREIGN KEY (f) REFERENCES non_existing_table (x);
SET SESSION FOREIGN_KEY_CHECKS = ON;
ALTER TABLE t1 ADD FULLTEXT INDEX ft1 (f);
ALTER TABLE t1 ADD FULLTEXT INDEX ft2 (f);
DROP TABLE t1;
--echo # Start of 10.2 tests
--echo #

View File

@ -48,10 +48,8 @@ create table t2(a int, b int, constraint a foreign key a (a) references t1(a),
constraint a foreign key a (a) references t1(b)) engine=innodb;
show warnings;
create table t2(a int, b int, constraint a foreign key a (a) references t1(a)) engine=innodb;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error 1005
alter table t2 add constraint b foreign key (b) references t2(b);
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
show warnings;
drop table t2, t1;
@ -60,10 +58,8 @@ drop table t2, t1;
#
create table t1 (f1 integer primary key) engine=innodb;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error 1005
alter table t1 add constraint c1 foreign key (f1) references t11(f1);
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
show warnings;
drop table t1;
@ -87,15 +83,11 @@ create temporary table t1(a int not null primary key, b int, key(b)) engine=inno
--echo Warning 150 Alter table `mysqld.1`.`t1` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary close to foreign key(b) references t1(a).
--echo Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
--echo Warning 1215 Cannot add foreign key constraint
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error 1005
create temporary table t2(a int, foreign key(a) references t1(a)) engine=innodb;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
show warnings;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error 1005
alter table t1 add foreign key(b) references t1(a);
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
show warnings;
drop table t1;
@ -103,17 +95,13 @@ drop table t1;
# Column numbers do not match
#
create table t1(a int not null primary key, b int, key(b)) engine=innodb;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error 1239
alter table t1 add foreign key(a,b) references t1(a);
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
show warnings;
drop table t1;
create table t1(a int not null primary key, b int, key(b)) engine=innodb;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error 1239
alter table t1 add foreign key(a) references t1(a,b);
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
show warnings;
drop table t1;
@ -121,15 +109,11 @@ drop table t1;
# ON UPDATE/DELETE SET NULL on NOT NULL column
#
create table t1 (f1 integer not null primary key) engine=innodb;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error 1005
alter table t1 add constraint c1 foreign key (f1) references t1(f1) on update set null;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
show warnings;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error 1005
create table t2(a int not null, foreign key(a) references t1(f1) on delete set null) engine=innodb;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
show warnings;
drop table t1;
@ -137,9 +121,7 @@ drop table t1;
# Incorrect types
#
create table t1 (id int not null primary key, f1 int, f2 int, key(f1)) engine=innodb;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error 1005
create table t2(a char(20), key(a), foreign key(a) references t1(f1)) engine=innodb;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
show warnings;
drop table t1;

View File

@ -115,11 +115,9 @@ CREATE TABLE t2 (
CONSTRAINT fk2 FOREIGN KEY (f2) REFERENCES t1 (`id`) ON DELETE CASCADE
) ENGINE=InnoDB;
--replace_regex /#sql-[0-9_a-f-]*/#sql-temporary/
--error 1005
ALTER TABLE t2 ADD CONSTRAINT fk3 FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE;
--replace_regex /#sql-[0-9_a-f-]*/#sql-temporary/
show warnings;
drop table t2;

View File

@ -492,7 +492,6 @@ reap;
SET DEBUG_SYNC = 'RESET';
disconnect con1;
CREATE TABLE t2 (c VARCHAR(64)) ENGINE=InnoDB;
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CANT_CREATE_TABLE
ALTER TABLE t2 ADD FOREIGN KEY (c) REFERENCES t1 (c);
DROP TABLE t2,t1;

View File

@ -218,7 +218,6 @@ alter table t4 add constraint dc foreign key (a) references t1(a);
--disable_info
show create table t4;
# mysqltest first does replace_regex, then replace_result
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
# Embedded server doesn't chdir to data directory
--replace_result $MYSQLD_DATADIR ./ master-data/ ''
# a foreign key 'test/dc' already exists
@ -416,7 +415,6 @@ SET FOREIGN_KEY_CHECKS=0;
--enable_info
# mysqltest first does replace_regex, then replace_result
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
# Embedded server doesn't chdir to data directory
--replace_result $MYSQLD_DATADIR ./ master-data/ ''
--error ER_CANT_CREATE_TABLE
@ -426,7 +424,6 @@ ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1);
# mysqltest first does replace_regex, then replace_result
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
# Embedded server doesn't chdir to data directory
--replace_result $MYSQLD_DATADIR ./ master-data/ ''
--error ER_CANT_CREATE_TABLE
@ -441,7 +438,6 @@ ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1), ALGORITHM=INPLACE;
# mysqltest first does replace_regex, then replace_result
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
# Embedded server doesn't chdir to data directory
--replace_result $MYSQLD_DATADIR ./ master-data/ ''
--error ER_CANT_CREATE_TABLE
@ -450,7 +446,6 @@ ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
ALTER TABLE t1 MODIFY COLUMN c2 BIGINT(12) NOT NULL;
# mysqltest first does replace_regex, then replace_result
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
# Embedded server doesn't chdir to data directory
--replace_result $MYSQLD_DATADIR ./ master-data/ ''
--error ER_CANT_CREATE_TABLE

View File

@ -9,20 +9,16 @@ set global innodb_compression_algorithm = 1;
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 page_compressed=1;
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic page_compressed=1;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error 1005
create table innodb_compressed(c1 bigint not null, b char(200)) engine=innodb row_format=compressed page_compressed=1;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
show warnings;
show create table innodb_compact;
show create table innodb_dynamic;
# MDEV-7133: InnoDB: Assertion failure in thread 140737091569408 in file dict0mem.cc line 74
# InnoDB: Failing assertion: dict_tf_is_valid(flags)
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error 1005
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant page_compressed=1;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
show warnings;
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant;
show create table innodb_redundant;

View File

@ -26,14 +26,12 @@ select * from t1;
--error ER_READ_ONLY_MODE
insert into t1 values(2, 3);
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CANT_CREATE_TABLE
alter table t1 add f3 int not null, algorithm=copy;
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
alter table t1 add f3 int not null, algorithm=inplace;
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CANT_CREATE_TABLE
drop index idx on t1;
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
@ -66,14 +64,12 @@ select * from t2;
--error ER_READ_ONLY_MODE
insert into t2 values(2, 3);
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CANT_CREATE_TABLE
alter table t2 add f3 int not null, algorithm=copy;
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
alter table t2 add f3 int not null, algorithm=inplace;
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CANT_CREATE_TABLE
drop index idx on t2;

View File

@ -1,8 +0,0 @@
--source include/have_innodb.inc
# LEN must increase here
create table t (a varchar(100)) engine=innodb;
select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a';
alter table t modify a varchar(110), algorithm=inplace;
select name, pos, mtype, prtype, len from information_schema.innodb_sys_columns where name='a';
drop table t;

View File

@ -1521,28 +1521,28 @@ child CREATE TABLE `child` (
SPATIAL KEY `idx2` (`p`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR HY000: Can't create table `test`.`child` (errno: 150 "Foreign key constraint is incorrectly formed")
show warnings;
Level Code Message
Warning 150 Alter table '`test`.`child`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns near 'FOREIGN KEY(p) REFERENCES parent(p)'.
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
Error 1005 Can't create table `test`.`child` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint
ALTER TABLE parent DROP INDEX idx1;
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
Got one of the listed errors
show warnings;
Level Code Message
Warning 150 Alter table '`test`.`child`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns near 'FOREIGN KEY(p) REFERENCES parent(p)'.
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
Error 1005 Can't create table `test`.`child` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint
ALTER TABLE child DROP INDEX idx2;
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
Got one of the listed errors
show warnings;
Level Code Message
Warning 150 Alter table '`test`.`child`' with foreign key constraint failed. There is only prefix index in the referenced table where the referenced columns appear as the first columns near 'FOREIGN KEY(p) REFERENCES parent(p)'.
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
Error 1005 Can't create table `test`.`child` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint
DROP TABLE child, parent;
#
# Bug#28763: Selecting geometry fields in UNION caused server crash.

View File

@ -772,24 +772,18 @@ ALTER TABLE child ADD SPATIAL INDEX idx2(p ASC);
SHOW CREATE TABLE parent;
SHOW CREATE TABLE child;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error ER_CANT_CREATE_TABLE
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
show warnings;
ALTER TABLE parent DROP INDEX idx1;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error ER_CANNOT_ADD_FOREIGN,ER_CANT_CREATE_TABLE
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
show warnings;
ALTER TABLE child DROP INDEX idx2;
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
--error ER_CANNOT_ADD_FOREIGN,ER_CANT_CREATE_TABLE
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
show warnings;
DROP TABLE child, parent;

View File

@ -16,7 +16,9 @@ wait/synch/mutex/sql/LOCK_after_binlog_sync YES YES
wait/synch/mutex/sql/LOCK_audit_mask YES YES
select * from performance_schema.setup_instruments
where name like 'Wait/Synch/Rwlock/sql/%'
and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock')
and name not in (
'wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock',
'wait/synch/rwlock/sql/LOCK_named_pipe_full_access_group')
order by name limit 10;
NAME ENABLED TIMED
wait/synch/rwlock/sql/LOCK_dboptions YES YES

View File

@ -22,10 +22,13 @@ select * from performance_schema.setup_instruments
order by name limit 10;
# CRYPTO_dynlock_value::lock is dependent on the build (SSL)
# LOCK_named_pipe_full_access_group is dependent on the build (Windows)
select * from performance_schema.setup_instruments
where name like 'Wait/Synch/Rwlock/sql/%'
and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock')
and name not in (
'wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock',
'wait/synch/rwlock/sql/LOCK_named_pipe_full_access_group')
order by name limit 10;
# COND_handler_count is dependent on the build (Windows only)

View File

@ -56,6 +56,6 @@ drop user testuser@localhost;
set global general_log=@old_global_general_log;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ /#sql2-[-0-9a-f_]*/#sql2-temporary/ /::1// /127.0.0.1//
--replace_regex /::1// /127.0.0.1//
cat_file $MYSQLD_DATADIR/audit_null_tables.log;

View File

@ -10,5 +10,6 @@ there should be *no* long test name listed below:
select distinct variable_name as `there should be *no* variables listed below:` from t2
left join t1 on variable_name=test_name where test_name is null;
there should be *no* variables listed below:
wsrep_certification_rules
drop table t1;
drop table t2;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,697 @@
--- mysql-test/suite/sys_vars/r/sysvars_innodb.result 2018-07-30 23:41:05.030930072 +0200
+++ mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.reject 2018-07-31 09:45:20.330811949 +0200
@@ -47,6 +47,20 @@
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX_PARTITIONS
+SESSION_VALUE NULL
+GLOBAL_VALUE 1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of InnoDB adaptive hash index partitions (default 1: disable partitioning)
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 64
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_ADAPTIVE_MAX_SLEEP_DELAY
SESSION_VALUE NULL
GLOBAL_VALUE 150000
@@ -355,6 +369,20 @@
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BUFFER_POOL_POPULATE
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Deprecated. This option has no effect and will be removed in MariaDB 10.2.3.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_BUFFER_POOL_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 8388608
@@ -446,7 +474,7 @@
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting this to OFF. Enable InnoDB checksums validation (enabled by default). Disable with --skip-innodb-checksums.
+VARIABLE_COMMENT DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting this to OFF
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
@@ -467,6 +495,104 @@
ENUM_VALUE_LIST CRC32,STRICT_CRC32,INNODB,STRICT_INNODB,NONE,STRICT_NONE
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_CLEANER_EVICTION_FACTOR
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Make page cleaner LRU flushes use evicted instead of flushed page counts for its heuristics
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_CLEANER_FLUSH_CHUNK_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 100
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 100
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Divide page cleaner flush list flush batches into chunks of this size
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_CLEANER_FREE_LIST_LWM
+SESSION_VALUE NULL
+GLOBAL_VALUE 10
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 10
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Page cleaner will keep on flushing the same buffer pool instance if its free list length is below this percentage of innodb_lru_scan_depth
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 100
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_CLEANER_LRU_CHUNK_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 100
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 100
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Divide page cleaner LRU list flush batches into chunks of this size
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_CLEANER_LSN_AGE_FACTOR
+SESSION_VALUE NULL
+GLOBAL_VALUE HIGH_CHECKPOINT
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE HIGH_CHECKPOINT
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT The formula for LSN age factor for page cleaner adaptive flushing. LEGACY: Original Oracle MySQL 5.6 formula. HIGH_CHECKPOINT: (the default) Percona Server 5.6 formula.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST LEGACY,HIGH_CHECKPOINT
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_CLEANER_MAX_FLUSH_TIME
+SESSION_VALUE NULL
+GLOBAL_VALUE 1000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1000
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The maximum time limit for a single flush list flush iteration by the page cleaner thread in miliseconds
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_CLEANER_MAX_LRU_TIME
+SESSION_VALUE NULL
+GLOBAL_VALUE 1000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1000
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The maximum time limit for a single LRU tail flush iteration by the page cleaner thread in miliseconds
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_CMP_PER_INDEX_ENABLED
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -565,6 +691,20 @@
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_CORRUPT_TABLE_ACTION
+SESSION_VALUE NULL
+GLOBAL_VALUE assert
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE assert
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Warn corruptions of user tables as 'corrupt table' instead of not crashing itself, when used with file_per_table. All file io for the datafile after detected as corrupt are disabled, except for the deletion.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST assert,warn,salvage
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DATA_FILE_PATH
SESSION_VALUE NULL
GLOBAL_VALUE ibdata1:12M:autoextend
@@ -789,6 +929,20 @@
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_EMPTY_FREE_LIST_ALGORITHM
+SESSION_VALUE NULL
+GLOBAL_VALUE LEGACY
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE BACKOFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT The algorithm to use for empty free list handling. Allowed values: LEGACY: Original Oracle MySQL 5.6 handling with single page flushes; BACKOFF: (default) Wait until cleaner produces a free page.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST LEGACY,BACKOFF
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_ENCRYPTION_ROTATE_KEY_AGE
SESSION_VALUE NULL
GLOBAL_VALUE 1
@@ -859,6 +1013,20 @@
ENUM_VALUE_LIST OFF,ON,FORCE
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_FAKE_CHANGES
+SESSION_VALUE OFF
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT In the transaction after enabled, UPDATE, INSERT and DELETE only move the cursor to the records and do nothing other operations (no changes, no ibuf, no undo, no transaction log) in the transaction. This is to cause replication prefetch IO. ATTENTION: the transaction started after enabled is affected.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FAST_SHUTDOWN
SESSION_VALUE NULL
GLOBAL_VALUE 1
@@ -986,11 +1154,11 @@
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FLUSH_LOG_AT_TRX_COMMIT
-SESSION_VALUE NULL
+SESSION_VALUE 1
GLOBAL_VALUE 1
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
-VARIABLE_SCOPE GLOBAL
+VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Controls the durability/speed trade-off for commits. Set to 0 (write and flush redo log to disk only once per second), 1 (flush to disk at each commit), 2 (write to log at commit but flush to disk only once per second) or 3 (flush to disk at prepare and at commit, slower and usually redundant). 1 and 3 guarantees that after a crash, committed transactions will not be lost and will be consistent with the binlog and other transactional engines. 2 can get inconsistent and lose transactions if there is a power failure or kernel crash but not if mysqld crashes. 0 has no guarantees in case of crash. 0 and 2 can be faster than 1 or 3.
NUMERIC_MIN_VALUE 0
@@ -1069,6 +1237,20 @@
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_FOREGROUND_PREFLUSH
+SESSION_VALUE NULL
+GLOBAL_VALUE EXPONENTIAL_BACKOFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE EXPONENTIAL_BACKOFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT The algorithm InnoDB uses for the query threads at sync preflush. Possible values are SYNC_PREFLUSH: perform a sync preflush as Oracle MySQL; EXPONENTIAL_BACKOFF: (default) wait for the page cleaner flush.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST SYNC_PREFLUSH,EXPONENTIAL_BACKOFF
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FT_AUX_TABLE
SESSION_VALUE NULL
GLOBAL_VALUE
@@ -1307,6 +1489,20 @@
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_KILL_IDLE_TRANSACTION
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT No effect for this build.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 9223372036854775807
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LARGE_PREFIX
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -1335,6 +1531,20 @@
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LOCKING_FAKE_CHANGES
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT ###EXPERIMENTAL### if enabled, transactions will get S row locks instead of X locks for fake changes. If disabled, fake change transactions will not take any locks at all.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_LOCKS_UNSAFE_FOR_BINLOG
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -1377,6 +1587,62 @@
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LOG_ARCHIVE
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Set to 1 if you want to have logs archived.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_LOG_ARCH_DIR
+SESSION_VALUE NULL
+GLOBAL_VALUE PATH
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Where full logs should be archived.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LOG_ARCH_EXPIRE_SEC
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Expiration time for archived innodb transaction logs.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_LOG_BLOCK_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 512
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 512
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT ###EXPERIMENTAL###: The log block size of the transaction log file. Changing for created log file is not supported. Use on your own risk!
+NUMERIC_MIN_VALUE 512
+NUMERIC_MAX_VALUE 65536
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOG_BUFFER_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 1048576
@@ -1405,6 +1671,20 @@
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_LOG_CHECKSUM_ALGORITHM
+SESSION_VALUE NULL
+GLOBAL_VALUE INNODB
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE INNODB
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT The algorithm InnoDB uses for log block checksums. Possible values are CRC32 (hardware accelerated if the CPU supports it) write crc32, allow any of the other checksums to match when reading; STRICT_CRC32 write crc32, do not allow other algorithms to match when reading; INNODB write a software calculated checksum, allow any other checksums to match when reading; STRICT_INNODB write a software calculated checksum, do not allow other algorithms to match when reading; NONE write a constant magic number, do not do any checksum verification when reading (same as innodb_checksums=OFF); STRICT_NONE write a constant magic number, do not allow values other than that magic number when reading; Logs created when this option is set to crc32/strict_crc32/none/strict_none will not be readable by any MySQL version or Percona Server versions that donot support this feature
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST CRC32,STRICT_CRC32,INNODB,STRICT_INNODB,NONE,STRICT_NONE
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOG_COMPRESSED_PAGES
SESSION_VALUE NULL
GLOBAL_VALUE ON
@@ -1475,6 +1755,34 @@
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_MAX_BITMAP_FILE_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 104857600
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 104857600
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The maximum size of changed page bitmap files
+NUMERIC_MIN_VALUE 4096
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_MAX_CHANGED_PAGES
+SESSION_VALUE NULL
+GLOBAL_VALUE 1000000
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1000000
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT The maximum number of rows for INFORMATION_SCHEMA.INNODB_CHANGED_PAGES table, 0 - unlimited
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MAX_DIRTY_PAGES_PCT
SESSION_VALUE NULL
GLOBAL_VALUE 75.000000
@@ -1659,7 +1967,7 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_OPEN_FILES
SESSION_VALUE NULL
-GLOBAL_VALUE 2000
+GLOBAL_VALUE 300
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -1741,6 +2049,76 @@
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PRINT_LOCK_WAIT_TIMEOUT_INFO
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Print lock wait timeout info to MySQL error log (off by default)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PRIORITY_CLEANER
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Make buffer pool cleaner and LRU manager threads acquire shared resources with priority
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PRIORITY_IO
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Make I/O threads acquire shared resources with priority
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PRIORITY_MASTER
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Make buffer pool cleaner thread acquire shared resources with priority
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PRIORITY_PURGE
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Make purge coordinator and worker threads acquire shared resources with priority
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PURGE_BATCH_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 300
@@ -1909,6 +2287,48 @@
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_SCHED_PRIORITY_IO
+SESSION_VALUE NULL
+GLOBAL_VALUE 19
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 19
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Nice value for the I/O handler thread scheduling
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 39
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_SCHED_PRIORITY_MASTER
+SESSION_VALUE NULL
+GLOBAL_VALUE 19
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 19
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Nice value for the master thread scheduling
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 39
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_SCHED_PRIORITY_PURGE
+SESSION_VALUE NULL
+GLOBAL_VALUE 19
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 19
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Nice value for the purge thread scheduling
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 39
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_SCRUB_LOG
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -1937,6 +2357,34 @@
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_SHOW_LOCKS_HELD
+SESSION_VALUE NULL
+GLOBAL_VALUE 10
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 10
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of locks held to print for each InnoDB transaction in SHOW INNODB STATUS.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1000
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_SHOW_VERBOSE_LOCKS
+SESSION_VALUE NULL
+GLOBAL_VALUE 0
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Whether to show records locked in SHOW INNODB STATUS.
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_SIMULATE_COMP_FAILURES
SESSION_VALUE NULL
GLOBAL_VALUE 0
@@ -2014,7 +2462,7 @@
DEFAULT_VALUE nulls_equal
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
-VARIABLE_COMMENT Specifies how InnoDB index statistics collection code should treat NULLs. Possible values are NULLS_EQUAL (default), NULLS_UNEQUAL and NULLS_IGNORED
+VARIABLE_COMMENT Specifies how InnoDB index statistics collection code should treat NULLs
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
@@ -2259,6 +2707,34 @@
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_TRACK_CHANGED_PAGES
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Track the redo log for changed pages and output a changed page bitmap
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_TRACK_REDO_LOG_NOW
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Force log tracker to catch up with checkpoint now
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -2336,7 +2812,7 @@
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Prevent partial page writes, via atomic writes.The option is used to prevent partial writes in case of a crash/poweroff, as faster alternative to doublewrite buffer.Currently this option works only on Linux only with FusionIO device, and directFS filesystem.
+VARIABLE_COMMENT Prevent partial page writes, via atomic writes (beta). The option is used to prevent partial writes in case of a crash/poweroff, as faster alternative to doublewrite buffer. Currently this option works only on Linux only with FusionIO device, and directFS filesystem.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
@@ -2357,6 +2833,20 @@
ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_USE_GLOBAL_FLUSH_LOG_AT_TRX_COMMIT
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Use global innodb_flush_log_at_trx_commit value. (default: ON).
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_USE_MTFLUSH
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -2371,6 +2861,20 @@
ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_USE_STACKTRACE
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Print stacktrace on long semaphore wait (off by default supported only on linux)
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_USE_SYS_MALLOC
SESSION_VALUE NULL
GLOBAL_VALUE ON
@@ -2401,12 +2905,12 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_VERSION
SESSION_VALUE NULL
-GLOBAL_VALUE 5.6.43
+GLOBAL_VALUE 5.6.42-84.2
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
-VARIABLE_COMMENT InnoDB version
+VARIABLE_COMMENT Percona-InnoDB-plugin version
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL

View File

@ -29,6 +29,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_CERTIFICATION_RULES
SESSION_VALUE NULL
GLOBAL_VALUE strict
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE strict
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Certification rules to use in the cluster. Possible values are: "strict": stricter rules that could result in more certification failures. "optimized": relaxed rules that allow more concurrency and cause less certification failures.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST strict,optimized
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_CERTIFY_NONPK
SESSION_VALUE NULL
GLOBAL_VALUE ON

View File

@ -18,7 +18,7 @@ Variable_name Value
Created_tmp_disk_tables 1
set @@session.tmp_disk_table_size=1000000;
select count(*) as c from t1 group by b having c>1;
ERROR HY000: The table '#sql_xxx' is full
ERROR HY000: The table '(temporary)' is full
show status like "created_tmp_disk%";
Variable_name Value
Created_tmp_disk_tables 2

View File

@ -21,7 +21,6 @@ insert into t1 values (20000,"A");
select count(*) as c from t1 group by b having c>1;
show status like "created_tmp_disk%";
set @@session.tmp_disk_table_size=1000000;
--replace_regex /The table '.*' is full/The table '#sql_xxx' is full/
--error ER_RECORD_FILE_FULL
select count(*) as c from t1 group by b having c>1;
show status like "created_tmp_disk%";

View File

@ -127,7 +127,6 @@ if ($with_foreign_keys) {
create table t1 (a int, b int as (a+1), foreign key (b) references t2(a));
create table t1 (a int, b int as (a+1));
--replace_regex /`#sql-.*`/`#sql-temporary`/
--error ER_CANT_CREATE_TABLE
alter table t1 add foreign key (b) references t2(a);
drop table t1;

View File

@ -126,7 +126,7 @@ create table t1 (a int, b int as (a+1), foreign key (b) references t2(a));
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
create table t1 (a int, b int as (a+1));
alter table t1 add foreign key (b) references t2(a);
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
drop table t1;
# Allowed FK options.
create table t2 (a int primary key, b char(5));

View File

@ -23,51 +23,56 @@
#include <stdarg.h>
#include <m_ctype.h>
/*
Copy contents of an IO_CACHE to a file.
SYNOPSIS
my_b_copy_to_file()
cache IO_CACHE to copy from
file File to copy to
DESCRIPTION
Copy the contents of the cache to the file. The cache will be
re-inited to a read cache and will read from the beginning of the
cache.
If a failure to write fully occurs, the cache is only copied
partially.
/**
Copy the cache to the file. Copying can be constrained to @c count
number of bytes when the parameter is less than SIZE_T_MAX. The
cache will be optionally re-inited to a read cache and will read
from the beginning of the cache. If a failure to write fully
occurs, the cache is only copied partially.
TODO
Make this function solid by handling partial reads from the cache
in a correct manner: it should be atomic.
Make this function solid by handling partial reads from the cache
in a correct manner: it should be atomic.
RETURN VALUE
0 All OK
1 An error occurred
@param cache IO_CACHE to copy from
@param file File to copy to
@param count the copied size or the max of the type
when the whole cache is to be copied.
@return
0 All OK
1 An error occurred
*/
int
my_b_copy_to_file(IO_CACHE *cache, FILE *file)
my_b_copy_to_file(IO_CACHE *cache, FILE *file,
size_t count)
{
size_t bytes_in_cache;
size_t curr_write, bytes_in_cache;
DBUG_ENTER("my_b_copy_to_file");
/* Reinit the cache to read from the beginning of the cache */
if (reinit_io_cache(cache, READ_CACHE, 0L, FALSE, FALSE))
DBUG_RETURN(1);
bytes_in_cache= my_b_bytes_in_cache(cache);
do
{
if (my_fwrite(file, cache->read_pos, bytes_in_cache,
curr_write= MY_MIN(bytes_in_cache, count);
if (my_fwrite(file, cache->read_pos, curr_write,
MYF(MY_WME | MY_NABP)) == (size_t) -1)
DBUG_RETURN(1);
} while ((bytes_in_cache= my_b_fill(cache)));
cache->read_pos += curr_write;
count -= curr_write;
} while (count && (bytes_in_cache= my_b_fill(cache)));
if(cache->error == -1)
DBUG_RETURN(1);
DBUG_RETURN(0);
}
int my_b_copy_all_to_file(IO_CACHE *cache, FILE *file)
{
DBUG_ENTER("my_b_copy_all_to_file");
/* Reinit the cache to read from the beginning of the cache */
if (reinit_io_cache(cache, READ_CACHE, 0L, FALSE, FALSE))
DBUG_RETURN(1);
DBUG_RETURN(my_b_copy_to_file(cache, file, SIZE_T_MAX));
}
my_off_t my_b_append_tell(IO_CACHE* info)
{

View File

@ -52,10 +52,9 @@ static uint set_max_open_files(uint max_file_limit)
DBUG_PRINT("info", ("rlim_cur: %u rlim_max: %u",
(uint) rlimit.rlim_cur,
(uint) rlimit.rlim_max));
if ((ulonglong) rlimit.rlim_cur == (ulonglong) RLIM_INFINITY)
rlimit.rlim_cur = max_file_limit;
if (rlimit.rlim_cur >= max_file_limit)
DBUG_RETURN(rlimit.rlim_cur); /* purecov: inspected */
if ((ulonglong) rlimit.rlim_cur == (ulonglong) RLIM_INFINITY ||
rlimit.rlim_cur >= max_file_limit)
DBUG_RETURN(max_file_limit);
rlimit.rlim_cur= rlimit.rlim_max= max_file_limit;
if (setrlimit(RLIMIT_NOFILE, &rlimit))
max_file_limit= old_cur; /* Use original value */

View File

@ -117,6 +117,7 @@ void *my_malloc(size_t size, myf my_flags)
MY_TEST(my_flags & MY_THREAD_SPECIFIC));
update_malloc_size(size + MALLOC_PREFIX_SIZE,
MY_TEST(my_flags & MY_THREAD_SPECIFIC));
TRASH_ALLOC(point, size);
DBUG_EXECUTE_IF("simulate_out_of_memory",
{
/* my_free() handles memory accounting */

View File

@ -32,10 +32,12 @@ push @::global_suppressions,
qr(WSREP: Failed to send state UUID:.*),
qr(WSREP: wsrep_sst_receive_address.*),
qr(WSREP: Could not open saved state file for reading: .*),
qr(WSREP: Could not open state file for reading: .*),
qr(WSREP: last inactive check more than .* skipping check),
qr(WSREP: Gap in state sequence. Need state transfer.),
qr(WSREP: Failed to prepare for incremental state transfer: .*),
qr(WSREP: SYNC message from member .* in non-primary configuration. Ignored.),
qr|WSREP: access file\(.*gvwstate.dat\) failed\(No such file or directory\)|,
);

View File

@ -41,6 +41,9 @@ auth_root_authentication_method=normal
auth_root_socket_user='root'
skip_test_db=0
dirname0=`dirname $0 2>/dev/null`
dirname0=`dirname $dirname0 2>/dev/null`
usage()
{
cat <<EOF
@ -236,11 +239,6 @@ cannot_find_file()
done
fi
echo
echo "If you compiled from source, you need to either run 'make install' to"
echo "copy the software into the correct location ready for operation."
echo "If you don't want to do a full install, you can use the --srcdir"
echo "option to only install the mysql database and privilege tables"
echo
echo "If you compiled from source, you need to either run 'make install' to"
echo "copy the software into the correct location ready for operation."
@ -287,6 +285,9 @@ then
cannot_find_file my_print_defaults $basedir/bin $basedir/extra
exit 1
fi
elif test -n "$dirname0" -a -x "$dirname0/@bindir@/my_print_defaults"
then
print_defaults="$dirname0/@bindir@/my_print_defaults"
else
print_defaults="@bindir@/my_print_defaults"
fi
@ -342,6 +343,16 @@ then
exit 1
fi
plugindir=`find_in_dirs --dir auth_socket.so $basedir/lib*/plugin $basedir/lib*/mysql/plugin`
# relative from where the script was run for a relocatable install
elif test -n "$dirname0" -a -x "$dirname0/@INSTALL_SBINDIR@/mysqld"
then
basedir="$dirname0"
bindir="$basedir/@INSTALL_SBINDIR@"
resolveip="$bindir/resolveip"
mysqld="$basedir/@INSTALL_SBINDIR@/mysqld"
srcpkgdatadir="$basedir/@INSTALL_MYSQLSHAREDIR@"
buildpkgdatadir="$basedir/@INSTALL_MYSQLSHAREDIR@"
plugindir="$basedir/@INSTALL_PLUGINDIR@"
else
basedir="@prefix@"
bindir="@bindir@"

View File

@ -516,7 +516,7 @@ kill_xtrabackup()
setup_ports()
{
if [[ "$WSREP_SST_OPT_ROLE" == "donor" ]];then
if [[ ${WSREP_SST_OPT_ADDR:0:1} == '[' ]];then
if [ "${WSREP_SST_OPT_ADDR#\[}" != "$WSREP_SST_OPT_ADDR" ]; then
remain=$(echo $WSREP_SST_OPT_ADDR | awk -F '\\][:/]' '{ print $2 }')
REMOTEIP=$(echo $WSREP_SST_OPT_ADDR | awk -F '\\]:' '{ print $1 }')"]"
SST_PORT=$(echo $remain | awk -F '[:/]' '{ print $1 }')
@ -529,7 +529,7 @@ setup_ports()
sst_ver=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $5 }')
fi
else
if [[ ${WSREP_SST_OPT_ADDR:0:1} == '[' ]];then
if [ "${WSREP_SST_OPT_ADDR#\[}" != "$WSREP_SST_OPT_ADDR" ]; then
SST_PORT=$(echo ${WSREP_SST_OPT_ADDR} | awk -F '\\]:' '{ print $2 }')
else
SST_PORT=$(echo ${WSREP_SST_OPT_ADDR} | awk -F ':' '{ print $2 }')
@ -972,7 +972,7 @@ then
if [ -z "${SST_PORT}" ]
then
SST_PORT=4444
if [[ ${ADDR:0:1} == '[' ]];then
if [ "${ADDR#\[}" != "$ADDR" ]; then
ADDR="$(echo ${WSREP_SST_OPT_ADDR} | awk -F '\\]:' '{ print $1 }')]:${SST_PORT}"
else
ADDR="$(echo ${WSREP_SST_OPT_ADDR} | awk -F ':' '{ print $1 }'):${SST_PORT}"

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