mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.2 into 10.3
This commit is contained in:
@ -242,8 +242,14 @@ ENDIF()
|
|||||||
|
|
||||||
MY_CHECK_AND_SET_COMPILER_FLAG(-ggdb3 DEBUG)
|
MY_CHECK_AND_SET_COMPILER_FLAG(-ggdb3 DEBUG)
|
||||||
|
|
||||||
OPTION(ENABLED_LOCAL_INFILE
|
SET(ENABLED_LOCAL_INFILE "AUTO" CACHE STRING "If we should should enable LOAD DATA LOCAL by default (OFF/ON/AUTO)")
|
||||||
"If we should should enable LOAD DATA LOCAL by default" ${IF_WIN})
|
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
|
# Set DBUG_OFF and other optional release-only flags for non-debug project types
|
||||||
FOREACH(BUILD_TYPE RELEASE RELWITHDEBINFO MINSIZEREL)
|
FOREACH(BUILD_TYPE RELEASE RELWITHDEBINFO MINSIZEREL)
|
||||||
|
@ -83,6 +83,7 @@ ulong mysqld_net_retry_count = 10L;
|
|||||||
ulong open_files_limit;
|
ulong open_files_limit;
|
||||||
ulong opt_binlog_rows_event_max_size;
|
ulong opt_binlog_rows_event_max_size;
|
||||||
ulonglong test_flags = 0;
|
ulonglong test_flags = 0;
|
||||||
|
ulong opt_binlog_rows_event_max_encoded_size= MAX_MAX_ALLOWED_PACKET;
|
||||||
static uint opt_protocol= 0;
|
static uint opt_protocol= 0;
|
||||||
static FILE *result_file;
|
static FILE *result_file;
|
||||||
static char *result_file_name= 0;
|
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");
|
DBUG_ENTER("write_event_header_and_base64");
|
||||||
|
|
||||||
/* Write header and base64 output to cache */
|
/* Write header and base64 output to cache */
|
||||||
if (ev->print_header(head, print_event_info, FALSE) ||
|
if (ev->print_header(head, print_event_info, FALSE))
|
||||||
ev->print_base64(body, 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);
|
DBUG_RETURN(ERROR_STOP);
|
||||||
|
|
||||||
/* Read data from cache and write to result file */
|
/* Read data from cache and write to result file */
|
||||||
@ -889,12 +896,13 @@ static bool print_base64(PRINT_EVENT_INFO *print_event_info, Log_event *ev)
|
|||||||
type_str);
|
type_str);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ev->print(result_file, print_event_info);
|
return ev->print(result_file, print_event_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool print_row_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
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=
|
Table_map_log_event *ignored_map=
|
||||||
print_event_info->m_table_map_ignored.get_table(table_id);
|
print_event_info->m_table_map_ignored.get_table(table_id);
|
||||||
@ -1769,6 +1777,15 @@ that may lead to an endless loop.",
|
|||||||
"This value must be a multiple of 256.",
|
"This value must be a multiple of 256.",
|
||||||
&opt_binlog_rows_event_max_size, &opt_binlog_rows_event_max_size, 0,
|
&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},
|
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.",
|
{"verify-binlog-checksum", 'c', "Verify checksum binlog events.",
|
||||||
(uchar**) &opt_verify_binlog_checksum, (uchar**) &opt_verify_binlog_checksum,
|
(uchar**) &opt_verify_binlog_checksum, (uchar**) &opt_verify_binlog_checksum,
|
||||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
@ -4019,63 +4019,6 @@ void do_mkdir(struct st_command *command)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Remove directory recursively.
|
|
||||||
*/
|
|
||||||
static int rmtree(const char *dir)
|
|
||||||
{
|
|
||||||
char path[FN_REFLEN];
|
|
||||||
char sep[]={ FN_LIBCHAR, 0 };
|
|
||||||
int err=0;
|
|
||||||
|
|
||||||
MY_DIR *dir_info= my_dir(dir, MYF(MY_DONT_SORT | MY_WANT_STAT));
|
|
||||||
if (!dir_info)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
for (uint i= 0; i < dir_info->number_of_files; i++)
|
|
||||||
{
|
|
||||||
FILEINFO *file= dir_info->dir_entry + i;
|
|
||||||
/* Skip "." and ".." */
|
|
||||||
if (!strcmp(file->name, ".") || !strcmp(file->name, ".."))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
strxnmov(path, sizeof(path), dir, sep, file->name, NULL);
|
|
||||||
|
|
||||||
if (!MY_S_ISDIR(file->mystat->st_mode))
|
|
||||||
{
|
|
||||||
err= my_delete(path, 0);
|
|
||||||
#ifdef _WIN32
|
|
||||||
/*
|
|
||||||
On Windows, check and possible reset readonly attribute.
|
|
||||||
my_delete(), or DeleteFile does not remove theses files.
|
|
||||||
*/
|
|
||||||
if (err)
|
|
||||||
{
|
|
||||||
DWORD attr= GetFileAttributes(path);
|
|
||||||
if (attr != INVALID_FILE_ATTRIBUTES &&
|
|
||||||
(attr & FILE_ATTRIBUTE_READONLY))
|
|
||||||
{
|
|
||||||
SetFileAttributes(path, attr &~ FILE_ATTRIBUTE_READONLY);
|
|
||||||
err= my_delete(path, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else
|
|
||||||
err= rmtree(path);
|
|
||||||
|
|
||||||
if(err)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
my_dirend(dir_info);
|
|
||||||
|
|
||||||
if (!err)
|
|
||||||
err= rmdir(dir);
|
|
||||||
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
@ -4103,7 +4046,7 @@ void do_rmdir(struct st_command *command)
|
|||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
|
|
||||||
DBUG_PRINT("info", ("removing directory: %s", ds_dirname.str));
|
DBUG_PRINT("info", ("removing directory: %s", ds_dirname.str));
|
||||||
if (rmtree(ds_dirname.str))
|
if (my_rmtree(ds_dirname.str, MYF(0)))
|
||||||
handle_command_error(command, 1, errno);
|
handle_command_error(command, 1, errno);
|
||||||
|
|
||||||
dynstr_free(&ds_dirname);
|
dynstr_free(&ds_dirname);
|
||||||
@ -6118,7 +6061,6 @@ void do_connect(struct st_command *command)
|
|||||||
#endif
|
#endif
|
||||||
if (opt_compress || con_compress)
|
if (opt_compress || con_compress)
|
||||||
mysql_options(con_slot->mysql, MYSQL_OPT_COMPRESS, NullS);
|
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,
|
mysql_options(con_slot->mysql, MYSQL_SET_CHARSET_NAME,
|
||||||
csname?csname: charset_info->csname);
|
csname?csname: charset_info->csname);
|
||||||
if (opt_charsets_dir)
|
if (opt_charsets_dir)
|
||||||
@ -6218,6 +6160,11 @@ void do_connect(struct st_command *command)
|
|||||||
if (con_slot == next_con)
|
if (con_slot == next_con)
|
||||||
next_con++; /* if we used the next_con slot, advance the pointer */
|
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_connection_name);
|
||||||
dynstr_free(&ds_host);
|
dynstr_free(&ds_host);
|
||||||
@ -9326,7 +9273,6 @@ int main(int argc, char **argv)
|
|||||||
(void *) &opt_connect_timeout);
|
(void *) &opt_connect_timeout);
|
||||||
if (opt_compress)
|
if (opt_compress)
|
||||||
mysql_options(con->mysql,MYSQL_OPT_COMPRESS,NullS);
|
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,
|
mysql_options(con->mysql, MYSQL_SET_CHARSET_NAME,
|
||||||
charset_info->csname);
|
charset_info->csname);
|
||||||
if (opt_charsets_dir)
|
if (opt_charsets_dir)
|
||||||
|
@ -86,7 +86,6 @@ IF(FEATURE_SET)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
OPTION(ENABLED_LOCAL_INFILE "" ON)
|
|
||||||
SET(WITH_INNODB_SNAPPY OFF CACHE STRING "")
|
SET(WITH_INNODB_SNAPPY OFF CACHE STRING "")
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(INSTALL_MYSQLTESTDIR "" CACHE STRING "")
|
SET(INSTALL_MYSQLTESTDIR "" CACHE STRING "")
|
||||||
|
@ -10,7 +10,12 @@ IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
|||||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||||
OUTPUT_VARIABLE cmake_update_submodules
|
OUTPUT_VARIABLE cmake_update_submodules
|
||||||
RESULT_VARIABLE git_config_get_result)
|
RESULT_VARIABLE git_config_get_result)
|
||||||
IF(git_config_get_result EQUAL 128 OR cmake_update_submodules MATCHES no)
|
IF(cmake_update_submodules MATCHES no)
|
||||||
|
SET(update_result 0)
|
||||||
|
SET(SUBMODULE_UPDATE_CONFIG_MESSAGE
|
||||||
|
"\n\nTo update submodules automatically, set cmake.update-submodules to 'yes', or 'force' to update automatically:
|
||||||
|
${GIT_EXECUTABLE} config cmake.update-submodules yes")
|
||||||
|
ELSEIF(git_config_get_result EQUAL 128)
|
||||||
SET(update_result 0)
|
SET(update_result 0)
|
||||||
ELSEIF (cmake_update_submodules MATCHES force)
|
ELSEIF (cmake_update_submodules MATCHES force)
|
||||||
MESSAGE(STATUS "Updating submodules (forced)")
|
MESSAGE(STATUS "Updating submodules (forced)")
|
||||||
@ -31,7 +36,6 @@ ENDIF()
|
|||||||
|
|
||||||
IF(update_result OR NOT EXISTS ${CMAKE_SOURCE_DIR}/libmariadb/CMakeLists.txt)
|
IF(update_result OR NOT EXISTS ${CMAKE_SOURCE_DIR}/libmariadb/CMakeLists.txt)
|
||||||
MESSAGE(FATAL_ERROR "No MariaDB Connector/C! Run
|
MESSAGE(FATAL_ERROR "No MariaDB Connector/C! Run
|
||||||
git submodule update --init
|
${GIT_EXECUTABLE} submodule update --init
|
||||||
Then restart the build.
|
Then restart the build.${SUBMODULE_UPDATE_CONFIG_MESSAGE}")
|
||||||
")
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -26,7 +26,7 @@ ENDIF()
|
|||||||
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})
|
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})
|
||||||
|
|
||||||
# Set the patch version
|
# Set the patch version
|
||||||
SET(WSREP_PATCH_VERSION "23")
|
SET(WSREP_PATCH_VERSION "24")
|
||||||
|
|
||||||
# Obtain wsrep API version
|
# Obtain wsrep API version
|
||||||
FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION
|
FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION
|
||||||
|
@ -444,7 +444,11 @@
|
|||||||
/*
|
/*
|
||||||
MySQL features
|
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 ENABLED_PROFILING 1
|
||||||
#cmakedefine EXTRA_DEBUG 1
|
#cmakedefine EXTRA_DEBUG 1
|
||||||
#cmakedefine USE_SYMDIR 1
|
#cmakedefine USE_SYMDIR 1
|
||||||
|
@ -1629,8 +1629,21 @@ ibx_copy_incremental_over_full()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (directory_exists(ROCKSDB_BACKUP_DIR, false)) {
|
||||||
|
if (my_rmtree(ROCKSDB_BACKUP_DIR, MYF(0))) {
|
||||||
|
die("Can't remove " ROCKSDB_BACKUP_DIR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
snprintf(path, sizeof(path), "%s/" ROCKSDB_BACKUP_DIR, xtrabackup_incremental_dir);
|
||||||
|
if (directory_exists(path, false)) {
|
||||||
|
if (my_mkdir(ROCKSDB_BACKUP_DIR, 0777, MYF(0))) {
|
||||||
|
die("my_mkdir failed for " ROCKSDB_BACKUP_DIR);
|
||||||
|
}
|
||||||
|
copy_or_move_dir(path, ROCKSDB_BACKUP_DIR, true, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (it != NULL) {
|
if (it != NULL) {
|
||||||
datadir_iter_free(it);
|
datadir_iter_free(it);
|
||||||
|
@ -234,8 +234,6 @@ long innobase_write_io_threads = 4;
|
|||||||
longlong innobase_page_size = (1LL << 14); /* 16KB */
|
longlong innobase_page_size = (1LL << 14); /* 16KB */
|
||||||
char* innobase_buffer_pool_filename = NULL;
|
char* innobase_buffer_pool_filename = NULL;
|
||||||
|
|
||||||
longlong innobase_buffer_pool_size = 8*1024*1024L;
|
|
||||||
|
|
||||||
/* The default values for the following char* start-up parameters
|
/* The default values for the following char* start-up parameters
|
||||||
are determined in innobase_init below: */
|
are determined in innobase_init below: */
|
||||||
|
|
||||||
@ -801,7 +799,6 @@ enum options_xtrabackup
|
|||||||
OPT_INNODB_LOG_CHECKSUMS,
|
OPT_INNODB_LOG_CHECKSUMS,
|
||||||
OPT_XTRA_INCREMENTAL_FORCE_SCAN,
|
OPT_XTRA_INCREMENTAL_FORCE_SCAN,
|
||||||
OPT_DEFAULTS_GROUP,
|
OPT_DEFAULTS_GROUP,
|
||||||
OPT_INNODB_ENCRYPT_LOG,
|
|
||||||
OPT_CLOSE_FILES,
|
OPT_CLOSE_FILES,
|
||||||
OPT_CORE_FILE,
|
OPT_CORE_FILE,
|
||||||
|
|
||||||
@ -1258,11 +1255,6 @@ struct my_option xb_server_options[] =
|
|||||||
(G_PTR*) &sys_tablespace_auto_extend_increment,
|
(G_PTR*) &sys_tablespace_auto_extend_increment,
|
||||||
(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},
|
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,
|
{"innodb_data_file_path", OPT_INNODB_DATA_FILE_PATH,
|
||||||
"Path to individual files and their sizes.", &innobase_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},
|
&innobase_data_file_path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
@ -1376,10 +1368,6 @@ struct my_option xb_server_options[] =
|
|||||||
&xb_plugin_dir, &xb_plugin_dir,
|
&xb_plugin_dir, &xb_plugin_dir,
|
||||||
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
|
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
|
||||||
|
|
||||||
{ "innodb-encrypt-log", OPT_INNODB_ENCRYPT_LOG, "Whether to encrypt innodb log",
|
|
||||||
&srv_encrypt_log, &srv_encrypt_log,
|
|
||||||
0, GET_BOOL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
|
|
||||||
|
|
||||||
{"innodb-log-checksums", OPT_INNODB_LOG_CHECKSUMS,
|
{"innodb-log-checksums", OPT_INNODB_LOG_CHECKSUMS,
|
||||||
"Whether to require checksums for InnoDB redo log blocks",
|
"Whether to require checksums for InnoDB redo log blocks",
|
||||||
&innodb_log_checksums, &innodb_log_checksums,
|
&innodb_log_checksums, &innodb_log_checksums,
|
||||||
@ -1576,11 +1564,23 @@ end:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static const char *xb_client_default_groups[]=
|
static const char *xb_client_default_groups[]={
|
||||||
{ "xtrabackup", "mariabackup", "client", 0, 0, 0 };
|
"xtrabackup", "mariabackup",
|
||||||
|
"client", "client-server",
|
||||||
|
"client-mariadb",
|
||||||
|
0, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
static const char *xb_server_default_groups[]=
|
static const char *xb_server_default_groups[]={
|
||||||
{ "xtrabackup", "mariabackup", "mysqld", 0, 0, 0 };
|
"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)
|
static void print_version(void)
|
||||||
{
|
{
|
||||||
@ -1822,13 +1822,6 @@ static bool innodb_init_param()
|
|||||||
msg("mariabackup: use-memory can't be over 4GB"
|
msg("mariabackup: use-memory can't be over 4GB"
|
||||||
" on 32-bit systems");
|
" 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 };
|
static char default_path[2] = { FN_CURLIB, 0 };
|
||||||
@ -2759,7 +2752,10 @@ static bool xtrabackup_copy_logfile(bool last = false)
|
|||||||
log_mutex_exit();
|
log_mutex_exit();
|
||||||
|
|
||||||
if (!start_lsn) {
|
if (!start_lsn) {
|
||||||
die("xtrabackup_copy_logfile() failed.");
|
msg(recv_sys->found_corrupt_log
|
||||||
|
? "xtrabackup_copy_logfile() failed: corrupt log."
|
||||||
|
: "xtrabackup_copy_logfile() failed.");
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
} while (start_lsn == end_lsn);
|
} while (start_lsn == end_lsn);
|
||||||
|
|
||||||
|
@ -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);
|
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_append_tell(IO_CACHE* info);
|
||||||
my_off_t my_b_safe_tell(IO_CACHE* info); /* picks the correct tell() */
|
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);
|
int my_b_pread(IO_CACHE *info, uchar *Buffer, size_t Count, my_off_t pos);
|
||||||
@ -628,6 +630,7 @@ extern int (*mysys_test_invalid_symlink)(const char *filename);
|
|||||||
|
|
||||||
extern int my_copy(const char *from,const char *to,myf MyFlags);
|
extern int my_copy(const char *from,const char *to,myf MyFlags);
|
||||||
extern int my_delete(const char *name,myf MyFlags);
|
extern int my_delete(const char *name,myf MyFlags);
|
||||||
|
extern int my_rmtree(const char *name, myf Myflags);
|
||||||
extern int my_getwd(char * buf,size_t size,myf MyFlags);
|
extern int my_getwd(char * buf,size_t size,myf MyFlags);
|
||||||
extern int my_setwd(const char *dir,myf MyFlags);
|
extern int my_setwd(const char *dir,myf MyFlags);
|
||||||
extern int my_lock(File fd,int op,my_off_t start, my_off_t length,myf MyFlags);
|
extern int my_lock(File fd,int op,my_off_t start, my_off_t length,myf MyFlags);
|
||||||
|
@ -42,7 +42,7 @@ https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning */
|
|||||||
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
|
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
|
||||||
# define MEM_CHECK_DEFINED(a,len) ((void) 0)
|
# define MEM_CHECK_DEFINED(a,len) ((void) 0)
|
||||||
#else
|
#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_NOACCESS(a,len) ((void) 0)
|
||||||
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
|
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
|
||||||
# define MEM_CHECK_DEFINED(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)
|
#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)
|
#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
|
#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
|
#endif
|
||||||
|
|
||||||
#define TRASH_ALLOC(A,B) do { TRASH_FILL(A,B,0xA5); MEM_UNDEFINED(A,B); } while(0)
|
#define TRASH_ALLOC(A,B) do { TRASH_FILL(A,B,0xA5); MEM_UNDEFINED(A,B); } while(0)
|
||||||
|
@ -293,7 +293,7 @@ typedef struct st_mysql
|
|||||||
|
|
||||||
/* session-wide random string */
|
/* session-wide random string */
|
||||||
char scramble[SCRAMBLE_LENGTH+1];
|
char scramble[SCRAMBLE_LENGTH+1];
|
||||||
my_bool unused1;
|
my_bool auto_local_infile;
|
||||||
void *unused2, *unused3, *unused4, *unused5;
|
void *unused2, *unused3, *unused4, *unused5;
|
||||||
|
|
||||||
LIST *stmts; /* list of all statements */
|
LIST *stmts; /* list of all statements */
|
||||||
|
@ -382,7 +382,7 @@ typedef struct st_mysql
|
|||||||
my_bool free_me;
|
my_bool free_me;
|
||||||
my_bool reconnect;
|
my_bool reconnect;
|
||||||
char scramble[20 +1];
|
char scramble[20 +1];
|
||||||
my_bool unused1;
|
my_bool auto_local_infile;
|
||||||
void *unused2, *unused3, *unused4, *unused5;
|
void *unused2, *unused3, *unused4, *unused5;
|
||||||
LIST *stmts;
|
LIST *stmts;
|
||||||
const struct st_mysql_methods *methods;
|
const struct st_mysql_methods *methods;
|
||||||
|
Submodule libmariadb updated: 34f8887af0...2c5aebb3bc
@ -86,7 +86,6 @@ call mtr.check_testcase();
|
|||||||
let $datadir=`select @@datadir`;
|
let $datadir=`select @@datadir`;
|
||||||
list_files $datadir mysql_upgrade_info;
|
list_files $datadir mysql_upgrade_info;
|
||||||
list_files_write_file $datadir.tempfiles.txt $datadir/test #sql*;
|
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;
|
cat_file $datadir.tempfiles.txt;
|
||||||
remove_file $datadir.tempfiles.txt;
|
remove_file $datadir.tempfiles.txt;
|
||||||
list_files $datadir/mysql #sql*;
|
list_files $datadir/mysql #sql*;
|
||||||
|
@ -35,7 +35,6 @@ BEGIN
|
|||||||
AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP'
|
AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP'
|
||||||
AND variable_name not like 'GTID%POS'
|
AND variable_name not like 'GTID%POS'
|
||||||
AND variable_name != 'GTID_BINLOG_STATE'
|
AND variable_name != 'GTID_BINLOG_STATE'
|
||||||
AND variable_name != 'AUTO_INCREMENT_INCREMENT'
|
|
||||||
ORDER BY variable_name;
|
ORDER BY variable_name;
|
||||||
|
|
||||||
-- Dump all databases, there should be none
|
-- Dump all databases, there should be none
|
||||||
|
@ -2467,6 +2467,55 @@ ERROR 23000: Duplicate entry '1' for key 'i'
|
|||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
DROP TABLE t1;
|
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
|
# End of 10.2 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -2018,6 +2018,23 @@ UNLOCK TABLES;
|
|||||||
DROP TABLE t1;
|
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 #
|
||||||
--echo # End of 10.2 tests
|
--echo # End of 10.2 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -27,3 +27,9 @@ t2 CREATE TEMPORARY TABLE `t2` (
|
|||||||
`a` int(11) DEFAULT NULL,
|
`a` int(11) DEFAULT NULL,
|
||||||
`v` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL
|
`v` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) 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;
|
||||||
|
@ -19,3 +19,13 @@ lock table t2 write;
|
|||||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||||
alter table t2 change column a b int, algorithm=inplace;
|
alter table t2 change column a b int, algorithm=inplace;
|
||||||
show create table t2;
|
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;
|
||||||
|
@ -95,3 +95,10 @@ Warnings:
|
|||||||
Warning 4025 CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
|
Warning 4025 CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
|
||||||
alter table t1;
|
alter table t1;
|
||||||
drop 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;
|
||||||
|
@ -115,3 +115,12 @@ insert into t1 () values ();
|
|||||||
alter ignore table t1 add constraint check (f > 0);
|
alter ignore table t1 add constraint check (f > 0);
|
||||||
alter table t1;
|
alter table t1;
|
||||||
drop 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;
|
||||||
|
@ -44,7 +44,7 @@ a b
|
|||||||
103 103
|
103 103
|
||||||
set check_constraint_checks=@save_check_constraint;
|
set check_constraint_checks=@save_check_constraint;
|
||||||
alter table t1 add c int default 0 check (c < 10);
|
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;
|
set check_constraint_checks=0;
|
||||||
alter table t1 add c int default 0 check (c < 10);
|
alter table t1 add c int default 0 check (c < 10);
|
||||||
alter table t1 add check (a+b+c < 500);
|
alter table t1 add check (a+b+c < 500);
|
||||||
|
@ -27,7 +27,6 @@ insert into t1 values (101,101),(102,102),(600,600),(103,103);
|
|||||||
select * from t1;
|
select * from t1;
|
||||||
set check_constraint_checks=@save_check_constraint;
|
set check_constraint_checks=@save_check_constraint;
|
||||||
|
|
||||||
--replace_regex /failed for.*/failed for table/
|
|
||||||
--error ER_CONSTRAINT_FAILED
|
--error ER_CONSTRAINT_FAILED
|
||||||
alter table t1 add c int default 0 check (c < 10);
|
alter table t1 add c int default 0 check (c < 10);
|
||||||
|
|
||||||
|
9
mysql-test/main/check_constraint_innodb.result
Normal file
9
mysql-test/main/check_constraint_innodb.result
Normal 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;
|
14
mysql-test/main/check_constraint_innodb.test
Normal file
14
mysql-test/main/check_constraint_innodb.test
Normal 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;
|
@ -21,3 +21,4 @@ innodb-wl5522-debug-zip : broken upstream
|
|||||||
innodb_bug12902967 : broken upstream
|
innodb_bug12902967 : broken upstream
|
||||||
file_contents : MDEV-6526 these files are not installed anymore
|
file_contents : MDEV-6526 these files are not installed anymore
|
||||||
max_statement_time : cannot possibly work, depends on timing
|
max_statement_time : cannot possibly work, depends on timing
|
||||||
|
partition_open_files_limit : open_files_limit check broken by MDEV-18360
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
DROP TABLE IF EXISTS t1;
|
|
||||||
Warnings:
|
|
||||||
Note 1051 Unknown table 'test.t1'
|
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
a varchar(32) character set utf8 collate utf8_bin NOT NULL,
|
a varchar(32) character set utf8 collate utf8_bin NOT NULL,
|
||||||
b 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 tmp_table_size=1024;
|
||||||
set session debug_dbug="+d,raise_error";
|
set session debug_dbug="+d,raise_error";
|
||||||
SELECT MAX(a) FROM t1 GROUP BY a,b;
|
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;
|
set tmp_table_size=default;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
-- source include/have_debug.inc
|
--source include/have_debug.inc
|
||||||
--source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #28499: crash for grouping query when tmp_table_size is too small
|
# Bug #28499: crash for grouping query when tmp_table_size is too small
|
||||||
#
|
#
|
||||||
|
|
||||||
DROP TABLE IF EXISTS t1;
|
|
||||||
|
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
a varchar(32) character set utf8 collate utf8_bin NOT NULL,
|
a varchar(32) character set utf8 collate utf8_bin NOT NULL,
|
||||||
b 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
|
# tmp table in query is converted from heap to myisam
|
||||||
set session debug_dbug="+d,raise_error";
|
set session debug_dbug="+d,raise_error";
|
||||||
|
|
||||||
--replace_regex /in table '[^']+'/in table 'tmp_table'/
|
|
||||||
--error ER_DUP_KEY
|
--error ER_DUP_KEY
|
||||||
SELECT MAX(a) FROM t1 GROUP BY a,b;
|
SELECT MAX(a) FROM t1 GROUP BY a,b;
|
||||||
|
|
||||||
set tmp_table_size=default;
|
set tmp_table_size=default;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Bug #50946: fast index creation still seems to copy the table
|
--echo # Bug #50946: fast index creation still seems to copy the table
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -1483,6 +1483,14 @@ ip_full_addr
|
|||||||
2000::
|
2000::
|
||||||
DROP PROCEDURE p1;
|
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
|
# Start of 10.2 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -1130,6 +1130,14 @@ DELIMITER ;$$
|
|||||||
CALL p1();
|
CALL p1();
|
||||||
DROP PROCEDURE 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 #
|
||||||
--echo # Start of 10.2 tests
|
--echo # Start of 10.2 tests
|
||||||
|
@ -762,7 +762,6 @@ drop table t1;
|
|||||||
--echo # on char > 31 bytes".
|
--echo # on char > 31 bytes".
|
||||||
--echo #
|
--echo #
|
||||||
create table t1(a char(32) not null) engine=myisam;
|
create table t1(a char(32) not null) engine=myisam;
|
||||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
|
||||||
--error ER_WRONG_ARGUMENTS
|
--error ER_WRONG_ARGUMENTS
|
||||||
create spatial index i on t1 (a);
|
create spatial index i on t1 (a);
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -33,6 +33,6 @@ SET timestamp=default;
|
|||||||
create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1))));
|
create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1))));
|
||||||
set timestamp=10;
|
set timestamp=10;
|
||||||
alter table t1 add column i int;
|
alter table t1 add column i int;
|
||||||
ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column `test`.`(temporary)`.`p` at row 1
|
ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column `test`.`t1`.`p` at row 1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
SET timestamp=default;
|
SET timestamp=default;
|
||||||
|
@ -600,3 +600,29 @@ a
|
|||||||
2
|
2
|
||||||
drop table "a1\""b1";
|
drop table "a1\""b1";
|
||||||
set sql_mode=default;
|
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;
|
||||||
|
select count(*) from t1;
|
||||||
|
count(*)
|
||||||
|
0
|
||||||
|
truncate table t1;
|
||||||
|
select count(*) from t1;
|
||||||
|
count(*)
|
||||||
|
41
|
||||||
|
truncate table t1;
|
||||||
|
select count(*) from t1;
|
||||||
|
count(*)
|
||||||
|
0
|
||||||
|
truncate table t1;
|
||||||
|
drop table t1;
|
||||||
|
@ -680,3 +680,25 @@ show create table "a1\""b1";
|
|||||||
select * from "a1\""b1";
|
select * from "a1\""b1";
|
||||||
drop table "a1\""b1";
|
drop table "a1\""b1";
|
||||||
set sql_mode=default;
|
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;
|
||||||
|
--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;
|
||||||
|
@ -237,43 +237,40 @@ BEGIN
|
|||||||
#Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL
|
#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
|
#<date> server id 1 end_log_pos 2591 CRC32 XXX Table_map: `test`.`t2` mapped to number num
|
||||||
# at 2591
|
# at 2591
|
||||||
#<date> server id 1 end_log_pos 2665 CRC32 XXX Update_rows: table id 33 flags: STMT_END_F
|
#<date> server id 1 end_log_pos 2657 CRC32 XXX Update_rows: table id 33 flags: STMT_END_F
|
||||||
### UPDATE `test`.`t2`
|
### UPDATE `test`.`t2`
|
||||||
### WHERE
|
### WHERE
|
||||||
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
|
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
|
||||||
### @5=4 /* INT meta=0 nullable=1 is_null=0 */
|
|
||||||
### SET
|
### SET
|
||||||
### @5=5 /* INT meta=0 nullable=1 is_null=0 */
|
### @5=5 /* INT meta=0 nullable=1 is_null=0 */
|
||||||
### UPDATE `test`.`t2`
|
### UPDATE `test`.`t2`
|
||||||
### WHERE
|
### WHERE
|
||||||
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
|
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
|
||||||
### @5=4 /* INT meta=0 nullable=1 is_null=0 */
|
|
||||||
### SET
|
### SET
|
||||||
### @5=5 /* INT meta=0 nullable=1 is_null=0 */
|
### @5=5 /* INT meta=0 nullable=1 is_null=0 */
|
||||||
### UPDATE `test`.`t2`
|
### UPDATE `test`.`t2`
|
||||||
### WHERE
|
### WHERE
|
||||||
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
|
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
|
||||||
### @5=NULL /* INT meta=0 nullable=1 is_null=1 */
|
|
||||||
### SET
|
### SET
|
||||||
### @5=5 /* INT meta=0 nullable=1 is_null=0 */
|
### @5=5 /* INT meta=0 nullable=1 is_null=0 */
|
||||||
# Number of rows: 3
|
# Number of rows: 3
|
||||||
# at 2665
|
# at 2657
|
||||||
#<date> server id 1 end_log_pos 2738 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
|
#<date> server id 1 end_log_pos 2730 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
|
||||||
SET TIMESTAMP=X/*!*/;
|
SET TIMESTAMP=X/*!*/;
|
||||||
COMMIT
|
COMMIT
|
||||||
/*!*/;
|
/*!*/;
|
||||||
# at 2738
|
# at 2730
|
||||||
#<date> server id 1 end_log_pos 2780 CRC32 XXX GTID 0-1-9
|
#<date> server id 1 end_log_pos 2772 CRC32 XXX GTID 0-1-9
|
||||||
/*!100001 SET @@session.gtid_seq_no=9*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=9*//*!*/;
|
||||||
BEGIN
|
BEGIN
|
||||||
/*!*/;
|
/*!*/;
|
||||||
# at 2780
|
# at 2772
|
||||||
# at 2817
|
# at 2809
|
||||||
#<date> server id 1 end_log_pos 2817 CRC32 XXX Annotate_rows:
|
#<date> server id 1 end_log_pos 2809 CRC32 XXX Annotate_rows:
|
||||||
#Q> DELETE FROM t1
|
#Q> DELETE FROM t1
|
||||||
#<date> server id 1 end_log_pos 2873 CRC32 XXX Table_map: `test`.`t1` mapped to number num
|
#<date> server id 1 end_log_pos 2865 CRC32 XXX Table_map: `test`.`t1` mapped to number num
|
||||||
# at 2873
|
# at 2865
|
||||||
#<date> server id 1 end_log_pos 2927 CRC32 XXX Delete_rows: table id 32 flags: STMT_END_F
|
#<date> server id 1 end_log_pos 2919 CRC32 XXX Delete_rows: table id 32 flags: STMT_END_F
|
||||||
### DELETE FROM `test`.`t1`
|
### DELETE FROM `test`.`t1`
|
||||||
### WHERE
|
### WHERE
|
||||||
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
|
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
|
||||||
@ -287,23 +284,23 @@ BEGIN
|
|||||||
### WHERE
|
### WHERE
|
||||||
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
|
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
|
||||||
# Number of rows: 4
|
# Number of rows: 4
|
||||||
# at 2927
|
# at 2919
|
||||||
#<date> server id 1 end_log_pos 3000 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
|
#<date> server id 1 end_log_pos 2992 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
|
||||||
SET TIMESTAMP=X/*!*/;
|
SET TIMESTAMP=X/*!*/;
|
||||||
COMMIT
|
COMMIT
|
||||||
/*!*/;
|
/*!*/;
|
||||||
# at 3000
|
# at 2992
|
||||||
#<date> server id 1 end_log_pos 3042 CRC32 XXX GTID 0-1-10
|
#<date> server id 1 end_log_pos 3034 CRC32 XXX GTID 0-1-10
|
||||||
/*!100001 SET @@session.gtid_seq_no=10*//*!*/;
|
/*!100001 SET @@session.gtid_seq_no=10*//*!*/;
|
||||||
BEGIN
|
BEGIN
|
||||||
/*!*/;
|
/*!*/;
|
||||||
# at 3042
|
# at 3034
|
||||||
# at 3079
|
# at 3071
|
||||||
#<date> server id 1 end_log_pos 3079 CRC32 XXX Annotate_rows:
|
#<date> server id 1 end_log_pos 3071 CRC32 XXX Annotate_rows:
|
||||||
#Q> DELETE FROM t2
|
#Q> DELETE FROM t2
|
||||||
#<date> server id 1 end_log_pos 3135 CRC32 XXX Table_map: `test`.`t2` mapped to number num
|
#<date> server id 1 end_log_pos 3127 CRC32 XXX Table_map: `test`.`t2` mapped to number num
|
||||||
# at 3135
|
# at 3127
|
||||||
#<date> server id 1 end_log_pos 3189 CRC32 XXX Delete_rows: table id 33 flags: STMT_END_F
|
#<date> server id 1 end_log_pos 3181 CRC32 XXX Delete_rows: table id 33 flags: STMT_END_F
|
||||||
### DELETE FROM `test`.`t2`
|
### DELETE FROM `test`.`t2`
|
||||||
### WHERE
|
### WHERE
|
||||||
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
|
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
|
||||||
@ -317,13 +314,82 @@ BEGIN
|
|||||||
### WHERE
|
### WHERE
|
||||||
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
|
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
|
||||||
# Number of rows: 4
|
# Number of rows: 4
|
||||||
# at 3189
|
# at 3181
|
||||||
#<date> server id 1 end_log_pos 3262 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
|
#<date> server id 1 end_log_pos 3254 CRC32 XXX Query thread_id=5 exec_time=x error_code=0
|
||||||
SET TIMESTAMP=X/*!*/;
|
SET TIMESTAMP=X/*!*/;
|
||||||
COMMIT
|
COMMIT
|
||||||
/*!*/;
|
/*!*/;
|
||||||
# at 3262
|
# at 3254
|
||||||
#<date> server id 1 end_log_pos 3310 CRC32 XXX Rotate to master-bin.000002 pos: 4
|
#<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 35
|
||||||
|
# at 594
|
||||||
|
#<date> server id 1 end_log_pos 643 CRC32 XXX Update_rows: table id 35 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 */
|
||||||
|
# Number of rows: 1
|
||||||
|
# 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 ;
|
DELIMITER ;
|
||||||
# End of log file
|
# End of log file
|
||||||
ROLLBACK /* added by mysqlbinlog */;
|
ROLLBACK /* added by mysqlbinlog */;
|
||||||
|
@ -26,8 +26,49 @@ DELETE FROM t2;
|
|||||||
--let $datadir = `SELECT @@datadir`
|
--let $datadir = `SELECT @@datadir`
|
||||||
|
|
||||||
FLUSH BINARY LOGS;
|
FLUSH BINARY LOGS;
|
||||||
|
|
||||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
--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/
|
--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
|
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog
|
||||||
|
|
||||||
DROP TABLE t1,t2;
|
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;
|
||||||
|
|
||||||
|
@ -83,3 +83,19 @@ checksum table t1 extended;
|
|||||||
Table Checksum
|
Table Checksum
|
||||||
test.t1 452555338
|
test.t1 452555338
|
||||||
drop table t1;
|
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
|
||||||
|
@ -83,3 +83,19 @@ checksum table t1 extended;
|
|||||||
Table Checksum
|
Table Checksum
|
||||||
test.t1 229851577
|
test.t1 229851577
|
||||||
drop table t1;
|
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
|
||||||
|
@ -60,3 +60,20 @@ checksum table t1;
|
|||||||
checksum table t1 quick;
|
checksum table t1 quick;
|
||||||
checksum table t1 extended;
|
checksum table t1 extended;
|
||||||
drop table t1;
|
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
|
||||||
|
@ -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;
|
(select a from t3) +1 < out3.a+1) from t3 out3;
|
||||||
ERROR 21000: Subquery returns more than 1 row
|
ERROR 21000: Subquery returns more than 1 row
|
||||||
drop table t1, t2, t3;
|
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;
|
||||||
|
@ -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 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;
|
(select a from t3) +1 < out3.a+1) from t3 out3;
|
||||||
drop table t1, t2, t3;
|
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;
|
||||||
|
@ -2865,6 +2865,22 @@ SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 );
|
|||||||
f
|
f
|
||||||
DROP TABLE t1, t2;
|
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
|
# MDEV-9489: Assertion `0' failed in Protocol::end_statement() on
|
||||||
# UNION ALL
|
# UNION ALL
|
||||||
#
|
#
|
||||||
|
@ -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 );
|
SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 );
|
||||||
DROP TABLE t1, t2;
|
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 #
|
||||||
--echo # MDEV-9489: Assertion `0' failed in Protocol::end_statement() on
|
--echo # MDEV-9489: Assertion `0' failed in Protocol::end_statement() on
|
||||||
--echo # UNION ALL
|
--echo # UNION ALL
|
||||||
|
@ -30,7 +30,7 @@ partition by list (a)
|
|||||||
(partition p0 values in (1), partition p1 values in (2));
|
(partition p0 values in (1), partition p1 values in (2));
|
||||||
insert into t1 values (1), (2);
|
insert into t1 values (1), (2);
|
||||||
create index inx on t1 (a);
|
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 add partition (partition p2 values in (3));
|
||||||
alter table t1 drop partition p2;
|
alter table t1 drop partition p2;
|
||||||
use test;
|
use test;
|
||||||
@ -141,7 +141,7 @@ t1 CREATE TABLE `t1` (
|
|||||||
PARTITION BY HASH (`fld1`)
|
PARTITION BY HASH (`fld1`)
|
||||||
PARTITIONS 5
|
PARTITIONS 5
|
||||||
ALTER TABLE t1 ENGINE= ARCHIVE;
|
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
|
#After the patch, the ENGINE is correctly displayed as MyISAM
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
|
@ -47,7 +47,7 @@ engine=archive
|
|||||||
partition by list (a)
|
partition by list (a)
|
||||||
(partition p0 values in (1), partition p1 values in (2));
|
(partition p0 values in (1), partition p1 values in (2));
|
||||||
insert into t1 values (1), (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
|
--error ER_CANT_CREATE_TABLE
|
||||||
create index inx on t1 (a);
|
create index inx on t1 (a);
|
||||||
alter table t1 add partition (partition p2 values in (3));
|
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;
|
PARTITIONS 5;
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
|
|
||||||
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
--error ER_CANT_CREATE_TABLE
|
||||||
ALTER TABLE t1 ENGINE= ARCHIVE;
|
ALTER TABLE t1 ENGINE= ARCHIVE;
|
||||||
|
|
||||||
|
@ -28,6 +28,25 @@ a
|
|||||||
1
|
1
|
||||||
1
|
1
|
||||||
3
|
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 ====
|
==== Test --base64-output=never on a binlog with row events ====
|
||||||
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
|
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
|
||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
|
24
mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_frag.result
Normal file
24
mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_frag.result
Normal 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;
|
@ -67,6 +67,28 @@ TFtYRxcBAAAAIgAAAKEBAAAQABAAAAAAAAEAAf/+AwAAAA==
|
|||||||
# The above line should succeed and 3 should be in the table
|
# The above line should succeed and 3 should be in the table
|
||||||
select * from t1;
|
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
|
# New mysqlbinlog supports --base64-output=never
|
||||||
--echo ==== Test --base64-output=never on a binlog with row events ====
|
--echo ==== Test --base64-output=never on a binlog with row events ====
|
||||||
|
46
mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_frag.test
Normal file
46
mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_frag.test
Normal 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;
|
@ -65,11 +65,11 @@ t1 CREATE TABLE `t1` (
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CREATE TABLE t2 (a int not null primary key) engine=innodb;
|
CREATE TABLE t2 (a int not null primary key) engine=innodb;
|
||||||
ALTER TABLE t2 ENCRYPTION_KEY_ID=4, ALGORITHM=COPY;
|
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;
|
SHOW WARNINGS;
|
||||||
Level Code Message
|
Level Code Message
|
||||||
Warning 140 InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1
|
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
|
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
|
@ -10,7 +10,7 @@ DROP TABLE t1;
|
|||||||
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
||||||
c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=YES ENGINE=INNODB;
|
c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=YES ENGINE=INNODB;
|
||||||
ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate), ALGORITHM=COPY;
|
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;
|
ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate), FORCE, ALGORITHM=INPLACE;
|
||||||
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED'
|
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTED'
|
||||||
ALTER TABLE t1 ADD SPATIAL INDEX(coordinate);
|
ALTER TABLE t1 ADD SPATIAL INDEX(coordinate);
|
||||||
|
@ -92,10 +92,8 @@ SHOW CREATE TABLE t1;
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
CREATE TABLE t2 (a int not null primary key) engine=innodb;
|
CREATE TABLE t2 (a int not null primary key) engine=innodb;
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
--error ER_CANT_CREATE_TABLE
|
||||||
ALTER TABLE t2 ENCRYPTION_KEY_ID=4, ALGORITHM=COPY;
|
ALTER TABLE t2 ENCRYPTION_KEY_ID=4, ALGORITHM=COPY;
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
SHOW WARNINGS;
|
SHOW WARNINGS;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
# (1) Do not allow creating table with ENCRYPTED=YES
|
# (1) Do not allow creating table with ENCRYPTED=YES
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
--error ER_CANT_CREATE_TABLE
|
||||||
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT,
|
||||||
c VARCHAR(256), coordinate POINT NOT NULL, SPATIAL index(coordinate)) ENGINE=INNODB
|
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;
|
c VARCHAR(256), coordinate POINT NOT NULL) ENCRYPTED=YES ENGINE=INNODB;
|
||||||
# FIXME: MDEV-13851 Encrypted table refuses some form of ALGORITHM=COPY,
|
# FIXME: MDEV-13851 Encrypted table refuses some form of ALGORITHM=COPY,
|
||||||
# but allows rebuild by FORCE
|
# but allows rebuild by FORCE
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
--error ER_CANT_CREATE_TABLE
|
||||||
ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate), ALGORITHM=COPY;
|
ALTER TABLE t1 ADD SPATIAL INDEX b(coordinate), ALGORITHM=COPY;
|
||||||
--error ER_ILLEGAL_HA_CREATE_OPTION
|
--error ER_ILLEGAL_HA_CREATE_OPTION
|
||||||
|
@ -19,6 +19,7 @@ ORDER BY VARIABLE_NAME;
|
|||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
WSREP_AUTO_INCREMENT_CONTROL ON
|
WSREP_AUTO_INCREMENT_CONTROL ON
|
||||||
WSREP_CAUSAL_READS ON
|
WSREP_CAUSAL_READS ON
|
||||||
|
WSREP_CERTIFICATION_RULES strict
|
||||||
WSREP_CERTIFY_NONPK ON
|
WSREP_CERTIFY_NONPK ON
|
||||||
WSREP_CLUSTER_ADDRESS gcomm://
|
WSREP_CLUSTER_ADDRESS gcomm://
|
||||||
WSREP_CLUSTER_NAME my_wsrep_cluster
|
WSREP_CLUSTER_NAME my_wsrep_cluster
|
||||||
|
@ -9,6 +9,7 @@ innodb-autoinc-lock-mode=2
|
|||||||
default-storage-engine=innodb
|
default-storage-engine=innodb
|
||||||
wsrep_gtid_mode=1
|
wsrep_gtid_mode=1
|
||||||
gtid_ignore_duplicates
|
gtid_ignore_duplicates
|
||||||
|
auto_increment_increment=3
|
||||||
|
|
||||||
wsrep-on=1
|
wsrep-on=1
|
||||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
binlog-format=row
|
binlog-format=row
|
||||||
innodb-autoinc-lock-mode=2
|
innodb-autoinc-lock-mode=2
|
||||||
default-storage-engine=innodb
|
default-storage-engine=innodb
|
||||||
|
auto_increment_increment=3
|
||||||
|
|
||||||
wsrep-on=1
|
wsrep-on=1
|
||||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
#
|
|
||||||
# suite.pm will make sure that all tests including this file
|
|
||||||
# will be skipped as needed
|
|
||||||
#
|
|
@ -1,4 +1,8 @@
|
|||||||
|
connection node_1;
|
||||||
|
connection node_2;
|
||||||
|
connection node_3;
|
||||||
Killing node #3 to free ports for garbd ...
|
Killing node #3 to free ports for garbd ...
|
||||||
|
connection node_3;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
Starting garbd ...
|
Starting garbd ...
|
||||||
CREATE TABLE t1 (f1 INTEGER);
|
CREATE TABLE t1 (f1 INTEGER);
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
connection node_1;
|
connection node_1;
|
||||||
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
|
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
|
||||||
VARIABLE_VALUE = 3
|
VARIABLE_VALUE = 3
|
||||||
|
1
|
||||||
SET GLOBAL wsrep_provider_options = 'pc.weight=3';
|
SET GLOBAL wsrep_provider_options = 'pc.weight=3';
|
||||||
SELECT VARIABLE_VALUE = 5 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
|
SELECT VARIABLE_VALUE = 5 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
|
||||||
VARIABLE_VALUE = 5
|
VARIABLE_VALUE = 5
|
||||||
|
1
|
||||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
|
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
|
||||||
connection node_2;
|
connection node_2;
|
||||||
SET SESSION wsrep_sync_wait=0;
|
SET SESSION wsrep_sync_wait=0;
|
||||||
@ -14,6 +16,7 @@ Variable_name Value
|
|||||||
wsrep_cluster_size 2
|
wsrep_cluster_size 2
|
||||||
SHOW STATUS LIKE 'wsrep_cluster_weight';
|
SHOW STATUS LIKE 'wsrep_cluster_weight';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
|
wsrep_cluster_weight 0
|
||||||
SHOW STATUS LIKE 'wsrep_cluster_status';
|
SHOW STATUS LIKE 'wsrep_cluster_status';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
wsrep_cluster_status non-Primary
|
wsrep_cluster_status non-Primary
|
||||||
@ -38,6 +41,7 @@ Variable_name Value
|
|||||||
wsrep_cluster_size 2
|
wsrep_cluster_size 2
|
||||||
SHOW STATUS LIKE 'wsrep_cluster_weight';
|
SHOW STATUS LIKE 'wsrep_cluster_weight';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
|
wsrep_cluster_weight 0
|
||||||
SHOW STATUS LIKE 'wsrep_cluster_status';
|
SHOW STATUS LIKE 'wsrep_cluster_status';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
wsrep_cluster_status non-Primary
|
wsrep_cluster_status non-Primary
|
||||||
@ -56,6 +60,7 @@ wsrep_local_state_comment Initialized
|
|||||||
connection node_1;
|
connection node_1;
|
||||||
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
|
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
|
||||||
VARIABLE_VALUE = 3
|
VARIABLE_VALUE = 3
|
||||||
|
1
|
||||||
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
||||||
VARIABLE_VALUE = 'Primary'
|
VARIABLE_VALUE = 'Primary'
|
||||||
1
|
1
|
||||||
@ -74,6 +79,7 @@ VARIABLE_VALUE = 'Synced'
|
|||||||
SET GLOBAL wsrep_provider_options = 'pc.weight=1';
|
SET GLOBAL wsrep_provider_options = 'pc.weight=1';
|
||||||
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
|
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
|
||||||
VARIABLE_VALUE = 1
|
VARIABLE_VALUE = 1
|
||||||
|
1
|
||||||
connection node_1;
|
connection node_1;
|
||||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
|
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
|
||||||
connection node_2;
|
connection node_2;
|
||||||
@ -84,6 +90,7 @@ VARIABLE_VALUE = 3
|
|||||||
1
|
1
|
||||||
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
|
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
|
||||||
VARIABLE_VALUE = 3
|
VARIABLE_VALUE = 3
|
||||||
|
1
|
||||||
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
||||||
VARIABLE_VALUE = 'Primary'
|
VARIABLE_VALUE = 'Primary'
|
||||||
1
|
1
|
||||||
@ -105,6 +112,7 @@ VARIABLE_VALUE = 3
|
|||||||
1
|
1
|
||||||
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
|
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
|
||||||
VARIABLE_VALUE = 3
|
VARIABLE_VALUE = 3
|
||||||
|
1
|
||||||
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
||||||
VARIABLE_VALUE = 'Primary'
|
VARIABLE_VALUE = 'Primary'
|
||||||
1
|
1
|
||||||
@ -126,6 +134,7 @@ VARIABLE_VALUE = 3
|
|||||||
1
|
1
|
||||||
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
|
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';
|
||||||
VARIABLE_VALUE = 3
|
VARIABLE_VALUE = 3
|
||||||
|
1
|
||||||
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
||||||
VARIABLE_VALUE = 'Primary'
|
VARIABLE_VALUE = 'Primary'
|
||||||
1
|
1
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
connection node_1;
|
||||||
|
connection node_2;
|
||||||
|
connection node_3;
|
||||||
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 INTEGER);
|
CREATE TABLE t1 (f1 INTEGER);
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
connection node_2;
|
connection node_2;
|
||||||
|
@ -50,9 +50,12 @@ push @::global_suppressions,
|
|||||||
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: 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.*),
|
qr(WSREP: evs::proto.*),
|
||||||
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),
|
||||||
qr(WSREP: Member .* requested state transfer from .* but it is impossible to select State Transfer donor: Resource temporarily unavailable),
|
qr(WSREP: Member .* requested state transfer from .* but it is impossible to select State Transfer donor: Resource temporarily unavailable),
|
||||||
|
qr(WSREP: user message in state LEAVING),
|
||||||
qr(WSREP: .* sending install message failed: Transport endpoint is not connected),
|
qr(WSREP: .* sending install message failed: Transport endpoint is not connected),
|
||||||
qr(WSREP: .* sending install message failed: Resource temporarily unavailable),
|
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.),
|
||||||
qr(WSREP: Could not find peer:),
|
qr(WSREP: Could not find peer:),
|
||||||
qr|WSREP: gcs_caused\(\) returned .*|,
|
qr|WSREP: gcs_caused\(\) returned .*|,
|
||||||
qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(SYNCED\). Message ignored.|,
|
qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(SYNCED\). Message ignored.|,
|
||||||
@ -78,11 +81,11 @@ sub skip_combinations {
|
|||||||
my %skip = ();
|
my %skip = ();
|
||||||
$skip{'include/have_filekeymanagement.inc'} = 'needs file_key_management plugin'
|
$skip{'include/have_filekeymanagement.inc'} = 'needs file_key_management plugin'
|
||||||
unless $ENV{FILE_KEY_MANAGEMENT_SO};
|
unless $ENV{FILE_KEY_MANAGEMENT_SO};
|
||||||
$skip{'include/have_mariabackup.inc'} = 'Need mariabackup'
|
$skip{'suite/galera/include/have_mariabackup.inc'} = 'Need mariabackup'
|
||||||
unless which(mariabackup);
|
unless which(mariabackup);
|
||||||
$skip{'include/have_mariabackup.inc'} = 'Need ss'
|
$skip{'suite/galera/include/have_mariabackup.inc'} = 'Need ss'
|
||||||
unless which(ss);
|
unless which(ss);
|
||||||
$skip{'include/have_mariabackup.inc'} = 'Need socat or nc'
|
$skip{'suite/galera/include/have_mariabackup.inc'} = 'Need socat or nc'
|
||||||
unless $ENV{MTR_GALERA_TFMT};
|
unless $ENV{MTR_GALERA_TFMT};
|
||||||
%skip;
|
%skip;
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,18 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
|
|
||||||
--echo Killing node #3 to free ports for garbd ...
|
|
||||||
--let $galera_connection_name = node_3
|
--let $galera_connection_name = node_3
|
||||||
--let $galera_server_number = 3
|
--let $galera_server_number = 3
|
||||||
--source include/galera_connect.inc
|
--source include/galera_connect.inc
|
||||||
|
|
||||||
|
# Save original auto_increment_offset values.
|
||||||
|
--let $node_1=node_1
|
||||||
|
--let $node_2=node_2
|
||||||
|
--let $node_3=node_3
|
||||||
|
--source ../galera/include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
|
--echo Killing node #3 to free ports for garbd ...
|
||||||
|
--connection node_3
|
||||||
--let $gp3 = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('base_port =', @@wsrep_provider_options) + LENGTH('base_port = '))`
|
--let $gp3 = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('base_port =', @@wsrep_provider_options) + LENGTH('base_port = '))`
|
||||||
--let $galera_port_3 = `SELECT SUBSTR('$gp3', 1, LOCATE(';', '$gp3') - 1)`
|
--let $galera_port_3 = `SELECT SUBSTR('$gp3', 1, LOCATE(';', '$gp3') - 1)`
|
||||||
--source include/shutdown_mysqld.inc
|
--source include/shutdown_mysqld.inc
|
||||||
@ -55,6 +63,8 @@ DROP TABLE t1;
|
|||||||
--connection node_3
|
--connection node_3
|
||||||
--source include/start_mysqld.inc
|
--source include/start_mysqld.inc
|
||||||
|
|
||||||
|
# Restore original auto_increment_offset values.
|
||||||
|
--source ../galera/include/auto_increment_offset_restore.inc
|
||||||
|
|
||||||
# Workaround for galera#101
|
# Workaround for galera#101
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
--source include/have_innodb.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_connection_name = node_3
|
||||||
--let $galera_server_number = 3
|
--let $galera_server_number = 3
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
--source include/check_ipv6.inc
|
--source include/check_ipv6.inc
|
||||||
--source include/have_mariabackup.inc
|
--source suite/galera/include/have_mariabackup.inc
|
||||||
|
|
||||||
# Confirm that initial handshake happened over ipv6
|
# Confirm that initial handshake happened over ipv6
|
||||||
|
|
||||||
|
@ -5,6 +5,17 @@
|
|||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
--let $galera_connection_name = node_3
|
||||||
|
--let $galera_server_number = 3
|
||||||
|
--source include/galera_connect.inc
|
||||||
|
|
||||||
|
# Save original auto_increment_offset values.
|
||||||
|
--let $node_1=node_1
|
||||||
|
--let $node_2=node_2
|
||||||
|
--let $node_3=node_3
|
||||||
|
--source ../galera/include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
CREATE TABLE t1 (f1 INTEGER);
|
CREATE TABLE t1 (f1 INTEGER);
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
|
|
||||||
@ -110,3 +121,6 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
|
|||||||
--source include/wait_condition.inc
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
# Restore original auto_increment_offset values.
|
||||||
|
--source ../galera/include/auto_increment_offset_restore.inc
|
||||||
|
@ -150,7 +150,6 @@ create table t2 (a int);
|
|||||||
alter table t1 add constraint foreign key fk(d) references t2(a);
|
alter table t1 add constraint foreign key fk(d) references t2(a);
|
||||||
if ($support_virtual_foreign)
|
if ($support_virtual_foreign)
|
||||||
{
|
{
|
||||||
--replace_regex /`#sql-.*`/`#sql-temporary`/
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
--error ER_CANT_CREATE_TABLE
|
||||||
alter table t1 add constraint foreign key fk(b) references t2(a);
|
alter table t1 add constraint foreign key fk(b) references t2(a);
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,6 @@ create table t1 (a int, b int generated always as (a+1) virtual,
|
|||||||
foreign key (b) references t2(a));
|
foreign key (b) references t2(a));
|
||||||
|
|
||||||
create table t1 (a int, b int generated always as (a+1) virtual);
|
create table t1 (a int, b int generated always as (a+1) virtual);
|
||||||
--replace_regex /`#sql-.*`/`#sql-temporary`/
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
--error ER_CANT_CREATE_TABLE
|
||||||
alter table t1 add foreign key (b) references t2(a);
|
alter table t1 add foreign key (b) references t2(a);
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -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")
|
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);
|
create table t1 (a int, b int generated always as (a+1) virtual);
|
||||||
alter table t1 add foreign key (b) references t2(a);
|
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;
|
drop table t1;
|
||||||
# Allowed FK options.
|
# Allowed FK options.
|
||||||
create table t2 (a int primary key, b char(5));
|
create table t2 (a int primary key, b char(5));
|
||||||
|
@ -702,7 +702,7 @@ v3 TIME AS (c3) VIRTUAL,
|
|||||||
v4 CHAR(10) AS (c4) VIRTUAL
|
v4 CHAR(10) AS (c4) VIRTUAL
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
|
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;
|
SET foreign_key_checks=0;
|
||||||
ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
|
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'
|
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
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
ALTER TABLE t1 DROP FOREIGN KEY fk;
|
ALTER TABLE t1 DROP FOREIGN KEY fk;
|
||||||
ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
|
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;
|
SHOW CREATE TABLE t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
|
@ -590,7 +590,6 @@ CREATE TABLE t1 (
|
|||||||
v3 TIME AS (c3) VIRTUAL,
|
v3 TIME AS (c3) VIRTUAL,
|
||||||
v4 CHAR(10) AS (c4) VIRTUAL
|
v4 CHAR(10) AS (c4) VIRTUAL
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
--error ER_CANT_CREATE_TABLE
|
||||||
ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
|
ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
|
||||||
SET foreign_key_checks=0;
|
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;
|
SET foreign_key_checks=1;
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
ALTER TABLE t1 DROP FOREIGN KEY fk;
|
ALTER TABLE t1 DROP FOREIGN KEY fk;
|
||||||
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
--error ER_CANT_CREATE_TABLE
|
||||||
ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
|
ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
|
@ -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 t2 add constraint b foreign key (b) references t1(a);
|
||||||
alter table t1 add constraint b1 foreign key (b) references t2(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);
|
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 t2 drop foreign key b;
|
||||||
alter table t1 drop foreign key b1;
|
alter table t1 drop foreign key b1;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
|
@ -21,6 +21,6 @@ Tables_in_bug
|
|||||||
parent
|
parent
|
||||||
alter table parent row_format=dynamic;
|
alter table parent row_format=dynamic;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1088 InnoDB: Could not add foreign key constraints.
|
Warning 1088 failed to load FOREIGN KEY constraints
|
||||||
drop table parent;
|
drop table parent;
|
||||||
drop database bug;
|
drop database bug;
|
||||||
|
@ -457,3 +457,12 @@ t1 CREATE TABLE `t1` (
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP PROCEDURE get_index_id;
|
DROP PROCEDURE get_index_id;
|
||||||
DROP PROCEDURE get_table_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;
|
||||||
|
@ -10,7 +10,7 @@ ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint
|
|||||||
create table t2 (f1 int primary key,
|
create table t2 (f1 int primary key,
|
||||||
constraint c1 foreign key (f1) references t1(f1)) engine=innodb;
|
constraint c1 foreign key (f1) references t1(f1)) engine=innodb;
|
||||||
alter table t2 add constraint c1 foreign key (f1) references t1(f1);
|
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;
|
set foreign_key_checks = 0;
|
||||||
alter table t2 add constraint c1 foreign key (f1) references t1(f1);
|
alter table t2 add constraint c1 foreign key (f1) references t1(f1);
|
||||||
ERROR HY000: Duplicate FOREIGN KEY constraint name 'test/c1'
|
ERROR HY000: Duplicate FOREIGN KEY constraint name 'test/c1'
|
||||||
@ -206,6 +206,61 @@ connection default;
|
|||||||
ERROR 70100: Query execution was interrupted
|
ERROR 70100: Query execution was interrupted
|
||||||
disconnect fk;
|
disconnect fk;
|
||||||
DROP TABLE t3,t1;
|
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 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;
|
||||||
|
CREATE TABLE t1 (f VARCHAR(256), FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY)
|
||||||
|
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 1088 failed to load FOREIGN KEY constraints
|
||||||
|
ALTER TABLE t1 ADD FULLTEXT INDEX ft2 (f);
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-18630 Conditional jump or move depends on uninitialised value
|
||||||
|
# in ib_push_warning / dict_create_foreign_constraints_low
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
|
ALTER IGNORE TABLE t1 ADD FOREIGN KEY (a) REFERENCES t2 (b);
|
||||||
|
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/#sql-temporary with foreign key constraint failed. Referenced table `test`.`t2` not found in the data dictionary near 'FOREIGN KEY (a) REFERENCES t2 (b)'.
|
||||||
|
Error 1005 Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||||
|
Warning 1215 Cannot add foreign key constraint for `t1`
|
||||||
|
DROP TABLE t1;
|
||||||
# Start of 10.2 tests
|
# Start of 10.2 tests
|
||||||
#
|
#
|
||||||
# MDEV-13246 Stale rows despite ON DELETE CASCADE constraint
|
# MDEV-13246 Stale rows despite ON DELETE CASCADE constraint
|
||||||
|
@ -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`
|
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;
|
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);
|
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;
|
show warnings;
|
||||||
Level Code Message
|
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)'.
|
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")
|
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||||
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
|
Warning 1215 Cannot add foreign key constraint for `t2`
|
||||||
drop table t2, t1;
|
drop table t2, t1;
|
||||||
create table t1 (f1 integer primary key) engine=innodb;
|
create table t1 (f1 integer primary key) engine=innodb;
|
||||||
alter table t1 add constraint c1 foreign key (f1) references t11(f1);
|
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;
|
show warnings;
|
||||||
Level Code Message
|
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)'.
|
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")
|
Error 1005 Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||||
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
|
Warning 1215 Cannot add foreign key constraint for `t1`
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create temporary table t1(a int not null primary key, b int, key(b)) engine=innodb;
|
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;
|
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")
|
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`
|
Warning 1215 Cannot add foreign key constraint for `t2`
|
||||||
alter table t1 add foreign key(b) references t1(a);
|
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;
|
show warnings;
|
||||||
Level Code Message
|
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)'.
|
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")
|
Error 1005 Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||||
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
|
Warning 1215 Cannot add foreign key constraint for `t1`
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1(a int not null primary key, b int, key(b)) engine=innodb;
|
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);
|
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;
|
drop table t1;
|
||||||
create table t1 (f1 integer not null primary key) engine=innodb;
|
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;
|
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;
|
show warnings;
|
||||||
Level Code Message
|
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'.
|
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")
|
Error 1005 Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||||
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
|
Warning 1215 Cannot add foreign key constraint for `t1`
|
||||||
create table t2(a int not null, foreign key(a) references t1(f1) on delete set null) engine=innodb;
|
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")
|
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||||
show warnings;
|
show warnings;
|
||||||
|
@ -62,12 +62,12 @@ PRIMARY KEY (`id`),
|
|||||||
CONSTRAINT fk2 FOREIGN KEY (f2) REFERENCES t1 (`id`) ON DELETE CASCADE
|
CONSTRAINT fk2 FOREIGN KEY (f2) REFERENCES t1 (`id`) ON DELETE CASCADE
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
ALTER TABLE t2 ADD CONSTRAINT fk3 FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE;
|
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;
|
show warnings;
|
||||||
Level Code Message
|
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'.
|
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")
|
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||||
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
|
Warning 1215 Cannot add foreign key constraint for `t2`
|
||||||
drop table t2;
|
drop table t2;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
CREATE DATABASE kg_test1;
|
CREATE DATABASE kg_test1;
|
||||||
|
@ -513,7 +513,7 @@ SET DEBUG_SYNC = 'RESET';
|
|||||||
disconnect con1;
|
disconnect con1;
|
||||||
CREATE TABLE t2 (c VARCHAR(64)) ENGINE=InnoDB;
|
CREATE TABLE t2 (c VARCHAR(64)) ENGINE=InnoDB;
|
||||||
ALTER TABLE t2 ADD FOREIGN KEY (c) REFERENCES t1 (c);
|
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;
|
DROP TABLE t2,t1;
|
||||||
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
|
SET GLOBAL innodb_file_per_table = @global_innodb_file_per_table_orig;
|
||||||
SET GLOBAL innodb_monitor_enable = default;
|
SET GLOBAL innodb_monitor_enable = default;
|
||||||
|
@ -506,7 +506,7 @@ t4 CREATE TABLE `t4` (
|
|||||||
CONSTRAINT `dc` FOREIGN KEY (`a`) REFERENCES `t1` (`a`)
|
CONSTRAINT `dc` FOREIGN KEY (`a`) REFERENCES `t1` (`a`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
alter table t3 add constraint dc foreign key (a) references t1(a);
|
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;
|
SET FOREIGN_KEY_CHECKS=0;
|
||||||
alter table t3 add constraint dc foreign key (a) references t1(a);
|
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
|
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;
|
SET FOREIGN_KEY_CHECKS=0;
|
||||||
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
||||||
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1), ALGORITHM=COPY;
|
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
|
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
||||||
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1);
|
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'
|
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
|
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
||||||
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2), ALGORITHM=COPY;
|
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
|
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
||||||
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
|
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'
|
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'
|
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
|
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
||||||
FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1), ALGORITHM=COPY;
|
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;
|
ALTER TABLE t1 MODIFY COLUMN c2 BIGINT(12) NOT NULL;
|
||||||
affected rows: 0
|
affected rows: 0
|
||||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||||
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
||||||
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2), ALGORITHM=COPY;
|
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
|
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
||||||
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
|
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'
|
ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
|
||||||
|
@ -10,11 +10,11 @@ f1 f2
|
|||||||
insert into t1 values(2, 3);
|
insert into t1 values(2, 3);
|
||||||
ERROR HY000: Running in read-only mode
|
ERROR HY000: Running in read-only mode
|
||||||
alter table t1 add f3 int not null, algorithm=copy;
|
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;
|
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
|
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY
|
||||||
drop index idx on t1;
|
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;
|
alter table t1 drop index idx, algorithm=inplace;
|
||||||
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY
|
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY
|
||||||
update t1 set f1=3 where f2=2;
|
update t1 set f1=3 where f2=2;
|
||||||
@ -38,11 +38,11 @@ f1 f2
|
|||||||
insert into t2 values(2, 3);
|
insert into t2 values(2, 3);
|
||||||
ERROR HY000: Running in read-only mode
|
ERROR HY000: Running in read-only mode
|
||||||
alter table t2 add f3 int not null, algorithm=copy;
|
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;
|
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
|
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY
|
||||||
drop index idx on t2;
|
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;
|
update t2 set f1=3 where f2=2;
|
||||||
ERROR HY000: Running in read-only mode
|
ERROR HY000: Running in read-only mode
|
||||||
create table t1(f1 int not null)engine=innodb;
|
create table t1(f1 int not null)engine=innodb;
|
||||||
|
@ -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;
|
|
@ -9,6 +9,7 @@ update t1 set c = 'MariaDB';
|
|||||||
update t1 set c = 'InnoDB';
|
update t1 set c = 'InnoDB';
|
||||||
set global debug_dbug = '+d,ib_undo_trunc';
|
set global debug_dbug = '+d,ib_undo_trunc';
|
||||||
commit;
|
commit;
|
||||||
|
call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
|
||||||
call mtr.add_suppression("InnoDB: The redo log transaction size ");
|
call mtr.add_suppression("InnoDB: The redo log transaction size ");
|
||||||
SET GLOBAL innodb_fast_shutdown=0;
|
SET GLOBAL innodb_fast_shutdown=0;
|
||||||
FOUND 1 /ib_undo_trunc/ in mysqld.1.err
|
FOUND 1 /ib_undo_trunc/ in mysqld.1.err
|
||||||
|
@ -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 t2 add constraint b foreign key (b) references t1(a);
|
||||||
alter table t1 add constraint b1 foreign key (b) references t2(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
|
--error ER_CANT_CREATE_TABLE
|
||||||
alter table t2 add constraint b1 foreign key (b) references t1(a);
|
alter table t2 add constraint b1 foreign key (b) references t1(a);
|
||||||
|
|
||||||
|
@ -334,3 +334,10 @@ DROP TABLE t1;
|
|||||||
|
|
||||||
DROP PROCEDURE get_index_id;
|
DROP PROCEDURE get_index_id;
|
||||||
DROP PROCEDURE get_table_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;
|
||||||
|
@ -14,7 +14,6 @@ constraint c1 foreign key (f1) references t1(f1)) engine=InnoDB;
|
|||||||
create table t2 (f1 int primary key,
|
create table t2 (f1 int primary key,
|
||||||
constraint c1 foreign key (f1) references t1(f1)) engine=innodb;
|
constraint c1 foreign key (f1) references t1(f1)) engine=innodb;
|
||||||
|
|
||||||
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
--error ER_CANT_CREATE_TABLE
|
||||||
alter table t2 add constraint c1 foreign key (f1) references t1(f1);
|
alter table t2 add constraint c1 foreign key (f1) references t1(f1);
|
||||||
|
|
||||||
@ -191,6 +190,57 @@ disconnect fk;
|
|||||||
|
|
||||||
DROP TABLE t3,t1;
|
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;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (f VARCHAR(256), FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY)
|
||||||
|
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 #
|
||||||
|
--echo # MDEV-18630 Conditional jump or move depends on uninitialised value
|
||||||
|
--echo # in ib_push_warning / dict_create_foreign_constraints_low
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
|
--error ER_CANT_CREATE_TABLE
|
||||||
|
ALTER IGNORE TABLE t1 ADD FOREIGN KEY (a) REFERENCES t2 (b);
|
||||||
|
--replace_regex /#sql-[0-9_a-f-]*/#sql-temporary/
|
||||||
|
SHOW WARNINGS;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo # Start of 10.2 tests
|
--echo # Start of 10.2 tests
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -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;
|
constraint a foreign key a (a) references t1(b)) engine=innodb;
|
||||||
show warnings;
|
show warnings;
|
||||||
create table t2(a int, b int, constraint a foreign key a (a) references t1(a)) engine=innodb;
|
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
|
--error 1005
|
||||||
alter table t2 add constraint b foreign key (b) references t2(b);
|
alter table t2 add constraint b foreign key (b) references t2(b);
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
show warnings;
|
show warnings;
|
||||||
drop table t2, t1;
|
drop table t2, t1;
|
||||||
|
|
||||||
@ -60,10 +58,8 @@ drop table t2, t1;
|
|||||||
#
|
#
|
||||||
|
|
||||||
create table t1 (f1 integer primary key) engine=innodb;
|
create table t1 (f1 integer primary key) engine=innodb;
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
--error 1005
|
--error 1005
|
||||||
alter table t1 add constraint c1 foreign key (f1) references t11(f1);
|
alter table t1 add constraint c1 foreign key (f1) references t11(f1);
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
show warnings;
|
show warnings;
|
||||||
drop table t1;
|
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 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 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
|
--echo Warning 1215 Cannot add foreign key constraint
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
--error 1005
|
--error 1005
|
||||||
create temporary table t2(a int, foreign key(a) references t1(a)) engine=innodb;
|
create temporary table t2(a int, foreign key(a) references t1(a)) engine=innodb;
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
show warnings;
|
show warnings;
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
--error 1005
|
--error 1005
|
||||||
alter table t1 add foreign key(b) references t1(a);
|
alter table t1 add foreign key(b) references t1(a);
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
show warnings;
|
show warnings;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
@ -103,17 +95,13 @@ drop table t1;
|
|||||||
# Column numbers do not match
|
# Column numbers do not match
|
||||||
#
|
#
|
||||||
create table t1(a int not null primary key, b int, key(b)) engine=innodb;
|
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
|
--error 1239
|
||||||
alter table t1 add foreign key(a,b) references t1(a);
|
alter table t1 add foreign key(a,b) references t1(a);
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
show warnings;
|
show warnings;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1(a int not null primary key, b int, key(b)) engine=innodb;
|
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
|
--error 1239
|
||||||
alter table t1 add foreign key(a) references t1(a,b);
|
alter table t1 add foreign key(a) references t1(a,b);
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
show warnings;
|
show warnings;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
@ -121,15 +109,11 @@ drop table t1;
|
|||||||
# ON UPDATE/DELETE SET NULL on NOT NULL column
|
# ON UPDATE/DELETE SET NULL on NOT NULL column
|
||||||
#
|
#
|
||||||
create table t1 (f1 integer not null primary key) engine=innodb;
|
create table t1 (f1 integer not null primary key) engine=innodb;
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
--error 1005
|
--error 1005
|
||||||
alter table t1 add constraint c1 foreign key (f1) references t1(f1) on update set null;
|
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;
|
show warnings;
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
--error 1005
|
--error 1005
|
||||||
create table t2(a int not null, foreign key(a) references t1(f1) on delete set null) engine=innodb;
|
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;
|
show warnings;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
@ -137,9 +121,7 @@ drop table t1;
|
|||||||
# Incorrect types
|
# Incorrect types
|
||||||
#
|
#
|
||||||
create table t1 (id int not null primary key, f1 int, f2 int, key(f1)) engine=innodb;
|
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
|
--error 1005
|
||||||
create table t2(a char(20), key(a), foreign key(a) references t1(f1)) engine=innodb;
|
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;
|
show warnings;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -115,11 +115,9 @@ CREATE TABLE t2 (
|
|||||||
CONSTRAINT fk2 FOREIGN KEY (f2) REFERENCES t1 (`id`) ON DELETE CASCADE
|
CONSTRAINT fk2 FOREIGN KEY (f2) REFERENCES t1 (`id`) ON DELETE CASCADE
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
--replace_regex /#sql-[0-9_a-f-]*/#sql-temporary/
|
|
||||||
--error 1005
|
--error 1005
|
||||||
ALTER TABLE t2 ADD CONSTRAINT fk3 FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE;
|
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;
|
show warnings;
|
||||||
|
|
||||||
drop table t2;
|
drop table t2;
|
||||||
|
@ -492,7 +492,6 @@ reap;
|
|||||||
SET DEBUG_SYNC = 'RESET';
|
SET DEBUG_SYNC = 'RESET';
|
||||||
disconnect con1;
|
disconnect con1;
|
||||||
CREATE TABLE t2 (c VARCHAR(64)) ENGINE=InnoDB;
|
CREATE TABLE t2 (c VARCHAR(64)) ENGINE=InnoDB;
|
||||||
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
--error ER_CANT_CREATE_TABLE
|
||||||
ALTER TABLE t2 ADD FOREIGN KEY (c) REFERENCES t1 (c);
|
ALTER TABLE t2 ADD FOREIGN KEY (c) REFERENCES t1 (c);
|
||||||
DROP TABLE t2,t1;
|
DROP TABLE t2,t1;
|
||||||
|
@ -218,7 +218,6 @@ alter table t4 add constraint dc foreign key (a) references t1(a);
|
|||||||
--disable_info
|
--disable_info
|
||||||
show create table t4;
|
show create table t4;
|
||||||
# mysqltest first does replace_regex, then replace_result
|
# mysqltest first does replace_regex, then replace_result
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
# Embedded server doesn't chdir to data directory
|
# Embedded server doesn't chdir to data directory
|
||||||
--replace_result $MYSQLD_DATADIR ./ master-data/ ''
|
--replace_result $MYSQLD_DATADIR ./ master-data/ ''
|
||||||
# a foreign key 'test/dc' already exists
|
# a foreign key 'test/dc' already exists
|
||||||
@ -416,7 +415,6 @@ SET FOREIGN_KEY_CHECKS=0;
|
|||||||
--enable_info
|
--enable_info
|
||||||
|
|
||||||
# mysqltest first does replace_regex, then replace_result
|
# mysqltest first does replace_regex, then replace_result
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
# Embedded server doesn't chdir to data directory
|
# Embedded server doesn't chdir to data directory
|
||||||
--replace_result $MYSQLD_DATADIR ./ master-data/ ''
|
--replace_result $MYSQLD_DATADIR ./ master-data/ ''
|
||||||
--error ER_CANT_CREATE_TABLE
|
--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
|
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
|
||||||
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1);
|
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1);
|
||||||
# mysqltest first does replace_regex, then replace_result
|
# mysqltest first does replace_regex, then replace_result
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
# Embedded server doesn't chdir to data directory
|
# Embedded server doesn't chdir to data directory
|
||||||
--replace_result $MYSQLD_DATADIR ./ master-data/ ''
|
--replace_result $MYSQLD_DATADIR ./ master-data/ ''
|
||||||
--error ER_CANT_CREATE_TABLE
|
--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;
|
FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1), ALGORITHM=INPLACE;
|
||||||
|
|
||||||
# mysqltest first does replace_regex, then replace_result
|
# mysqltest first does replace_regex, then replace_result
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
# Embedded server doesn't chdir to data directory
|
# Embedded server doesn't chdir to data directory
|
||||||
--replace_result $MYSQLD_DATADIR ./ master-data/ ''
|
--replace_result $MYSQLD_DATADIR ./ master-data/ ''
|
||||||
--error ER_CANT_CREATE_TABLE
|
--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;
|
ALTER TABLE t1 MODIFY COLUMN c2 BIGINT(12) NOT NULL;
|
||||||
# mysqltest first does replace_regex, then replace_result
|
# mysqltest first does replace_regex, then replace_result
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
# Embedded server doesn't chdir to data directory
|
# Embedded server doesn't chdir to data directory
|
||||||
--replace_result $MYSQLD_DATADIR ./ master-data/ ''
|
--replace_result $MYSQLD_DATADIR ./ master-data/ ''
|
||||||
--error ER_CANT_CREATE_TABLE
|
--error ER_CANT_CREATE_TABLE
|
||||||
|
@ -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_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_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;
|
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
|
--error 1005
|
||||||
create table innodb_compressed(c1 bigint not null, b char(200)) engine=innodb row_format=compressed page_compressed=1;
|
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 warnings;
|
||||||
show create table innodb_compact;
|
show create table innodb_compact;
|
||||||
show create table innodb_dynamic;
|
show create table innodb_dynamic;
|
||||||
|
|
||||||
# MDEV-7133: InnoDB: Assertion failure in thread 140737091569408 in file dict0mem.cc line 74
|
# MDEV-7133: InnoDB: Assertion failure in thread 140737091569408 in file dict0mem.cc line 74
|
||||||
# InnoDB: Failing assertion: dict_tf_is_valid(flags)
|
# InnoDB: Failing assertion: dict_tf_is_valid(flags)
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
--error 1005
|
--error 1005
|
||||||
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant page_compressed=1;
|
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;
|
show warnings;
|
||||||
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant;
|
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant;
|
||||||
show create table innodb_redundant;
|
show create table innodb_redundant;
|
||||||
|
@ -26,14 +26,12 @@ select * from t1;
|
|||||||
--error ER_READ_ONLY_MODE
|
--error ER_READ_ONLY_MODE
|
||||||
insert into t1 values(2, 3);
|
insert into t1 values(2, 3);
|
||||||
|
|
||||||
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
--error ER_CANT_CREATE_TABLE
|
||||||
alter table t1 add f3 int not null, algorithm=copy;
|
alter table t1 add f3 int not null, algorithm=copy;
|
||||||
|
|
||||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||||
alter table t1 add f3 int not null, algorithm=inplace;
|
alter table t1 add f3 int not null, algorithm=inplace;
|
||||||
|
|
||||||
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
--error ER_CANT_CREATE_TABLE
|
||||||
drop index idx on t1;
|
drop index idx on t1;
|
||||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||||
@ -66,14 +64,12 @@ select * from t2;
|
|||||||
--error ER_READ_ONLY_MODE
|
--error ER_READ_ONLY_MODE
|
||||||
insert into t2 values(2, 3);
|
insert into t2 values(2, 3);
|
||||||
|
|
||||||
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
--error ER_CANT_CREATE_TABLE
|
||||||
alter table t2 add f3 int not null, algorithm=copy;
|
alter table t2 add f3 int not null, algorithm=copy;
|
||||||
|
|
||||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||||
alter table t2 add f3 int not null, algorithm=inplace;
|
alter table t2 add f3 int not null, algorithm=inplace;
|
||||||
|
|
||||||
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
--error ER_CANT_CREATE_TABLE
|
||||||
drop index idx on t2;
|
drop index idx on t2;
|
||||||
|
|
||||||
|
@ -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;
|
|
@ -38,13 +38,14 @@ update t1 set c = 'MariaDB';
|
|||||||
update t1 set c = 'InnoDB';
|
update t1 set c = 'InnoDB';
|
||||||
eval set global debug_dbug = '+d,$SEARCH_PATTERN';
|
eval set global debug_dbug = '+d,$SEARCH_PATTERN';
|
||||||
commit;
|
commit;
|
||||||
|
call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
|
||||||
# FIXME: remove this work-around, and generate less log!
|
# FIXME: remove this work-around, and generate less log!
|
||||||
call mtr.add_suppression("InnoDB: The redo log transaction size ");
|
call mtr.add_suppression("InnoDB: The redo log transaction size ");
|
||||||
SET GLOBAL innodb_fast_shutdown=0;
|
SET GLOBAL innodb_fast_shutdown=0;
|
||||||
--source include/shutdown_mysqld.inc
|
--source include/shutdown_mysqld.inc
|
||||||
--source include/search_pattern_in_file.inc
|
--source include/search_pattern_in_file.inc
|
||||||
# FIXME: remove this work-around, and generate less log!
|
# FIXME: remove this work-around, and generate less log!
|
||||||
--let $restart_parameters= --innodb-buffer-pool-size=16m
|
--let $restart_parameters= --innodb-buffer-pool-size=16m --innodb-undo-tablespaces=1
|
||||||
--source include/start_mysqld.inc
|
--source include/start_mysqld.inc
|
||||||
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -795,7 +795,7 @@ SET timestamp=default;
|
|||||||
create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1)))) ENGINE=innodb;
|
create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1)))) ENGINE=innodb;
|
||||||
set timestamp=10;
|
set timestamp=10;
|
||||||
alter table t1 add column i int;
|
alter table t1 add column i int;
|
||||||
ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column `test`.`(temporary)`.`p` at row 1
|
ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column `test`.`t1`.`p` at row 1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
SET timestamp=default;
|
SET timestamp=default;
|
||||||
CREATE OR REPLACE TABLE t1 (a INT) ENGINE=InnoDB;
|
CREATE OR REPLACE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
|
@ -1521,28 +1521,28 @@ child CREATE TABLE `child` (
|
|||||||
SPATIAL KEY `idx2` (`p`)
|
SPATIAL KEY `idx2` (`p`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
|
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;
|
show warnings;
|
||||||
Level Code Message
|
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)'.
|
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")
|
Error 1005 Can't create table `test`.`child` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||||
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
|
Warning 1215 Cannot add foreign key constraint for `child`
|
||||||
ALTER TABLE parent DROP INDEX idx1;
|
ALTER TABLE parent DROP INDEX idx1;
|
||||||
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
|
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
show warnings;
|
show warnings;
|
||||||
Level Code Message
|
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)'.
|
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")
|
Error 1005 Can't create table `test`.`child` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||||
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
|
Warning 1215 Cannot add foreign key constraint for `child`
|
||||||
ALTER TABLE child DROP INDEX idx2;
|
ALTER TABLE child DROP INDEX idx2;
|
||||||
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
|
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
show warnings;
|
show warnings;
|
||||||
Level Code Message
|
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)'.
|
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")
|
Error 1005 Can't create table `test`.`child` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||||
Warning 1215 Cannot add foreign key constraint for `#sql-temporary`
|
Warning 1215 Cannot add foreign key constraint for `child`
|
||||||
DROP TABLE child, parent;
|
DROP TABLE child, parent;
|
||||||
#
|
#
|
||||||
# Bug#28763: Selecting geometry fields in UNION caused server crash.
|
# Bug#28763: Selecting geometry fields in UNION caused server crash.
|
||||||
|
@ -772,24 +772,18 @@ ALTER TABLE child ADD SPATIAL INDEX idx2(p ASC);
|
|||||||
SHOW CREATE TABLE parent;
|
SHOW CREATE TABLE parent;
|
||||||
SHOW CREATE TABLE child;
|
SHOW CREATE TABLE child;
|
||||||
|
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
--error ER_CANT_CREATE_TABLE
|
--error ER_CANT_CREATE_TABLE
|
||||||
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
|
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
show warnings;
|
show warnings;
|
||||||
|
|
||||||
ALTER TABLE parent DROP INDEX idx1;
|
ALTER TABLE parent DROP INDEX idx1;
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
--error ER_CANNOT_ADD_FOREIGN,ER_CANT_CREATE_TABLE
|
--error ER_CANNOT_ADD_FOREIGN,ER_CANT_CREATE_TABLE
|
||||||
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
|
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
show warnings;
|
show warnings;
|
||||||
|
|
||||||
ALTER TABLE child DROP INDEX idx2;
|
ALTER TABLE child DROP INDEX idx2;
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
--error ER_CANNOT_ADD_FOREIGN,ER_CANT_CREATE_TABLE
|
--error ER_CANNOT_ADD_FOREIGN,ER_CANT_CREATE_TABLE
|
||||||
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
|
ALTER TABLE child ADD FOREIGN KEY(p) REFERENCES parent(p);
|
||||||
--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
|
|
||||||
show warnings;
|
show warnings;
|
||||||
|
|
||||||
DROP TABLE child, parent;
|
DROP TABLE child, parent;
|
||||||
|
1
mysql-test/suite/mariabackup/incremental_rocksdb.opt
Normal file
1
mysql-test/suite/mariabackup/incremental_rocksdb.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--plugin-load=$HA_ROCKSDB_SO
|
19
mysql-test/suite/mariabackup/incremental_rocksdb.result
Normal file
19
mysql-test/suite/mariabackup/incremental_rocksdb.result
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
call mtr.add_suppression("InnoDB: New log files created");
|
||||||
|
CREATE TABLE t(i INT PRIMARY KEY) ENGINE ROCKSDB;
|
||||||
|
INSERT INTO t VALUES(1);
|
||||||
|
# Create full backup , modify table, then create incremental/differential backup
|
||||||
|
DROP TABLE t;
|
||||||
|
CREATE TABLE t2(i INT PRIMARY KEY) ENGINE ROCKSDB;
|
||||||
|
INSERT INTO t2 VALUES(2);
|
||||||
|
# Prepare full backup, apply incremental one
|
||||||
|
# Restore and check results
|
||||||
|
# shutdown server
|
||||||
|
# remove datadir
|
||||||
|
# xtrabackup move back
|
||||||
|
# restart server
|
||||||
|
SELECT * FROM t2;
|
||||||
|
i
|
||||||
|
2
|
||||||
|
DROP TABLE t2;
|
||||||
|
DROP TABLE t;
|
||||||
|
ERROR 42S02: Unknown table 'test.t'
|
38
mysql-test/suite/mariabackup/incremental_rocksdb.test
Normal file
38
mysql-test/suite/mariabackup/incremental_rocksdb.test
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
--source include/have_rocksdb.inc
|
||||||
|
call mtr.add_suppression("InnoDB: New log files created");
|
||||||
|
|
||||||
|
let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
|
||||||
|
let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
|
||||||
|
|
||||||
|
CREATE TABLE t(i INT PRIMARY KEY) ENGINE ROCKSDB;
|
||||||
|
INSERT INTO t VALUES(1);
|
||||||
|
|
||||||
|
echo # Create full backup , modify table, then create incremental/differential backup;
|
||||||
|
--disable_result_log
|
||||||
|
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
|
||||||
|
--enable_result_log
|
||||||
|
DROP TABLE t;
|
||||||
|
CREATE TABLE t2(i INT PRIMARY KEY) ENGINE ROCKSDB;
|
||||||
|
INSERT INTO t2 VALUES(2);
|
||||||
|
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir;
|
||||||
|
|
||||||
|
--disable_result_log
|
||||||
|
echo # Prepare full backup, apply incremental one;
|
||||||
|
exec $XTRABACKUP --prepare --target-dir=$basedir;
|
||||||
|
|
||||||
|
exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir ;
|
||||||
|
|
||||||
|
echo # Restore and check results;
|
||||||
|
let $targetdir=$basedir;
|
||||||
|
-- source include/restart_and_restore.inc
|
||||||
|
--enable_result_log
|
||||||
|
|
||||||
|
SELECT * FROM t2;
|
||||||
|
DROP TABLE t2;
|
||||||
|
--error ER_BAD_TABLE_ERROR
|
||||||
|
DROP TABLE t;
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
rmdir $basedir;
|
||||||
|
rmdir $incremental_dir;
|
||||||
|
|
@ -16,7 +16,9 @@ wait/synch/mutex/sql/LOCK_after_binlog_sync YES YES
|
|||||||
wait/synch/mutex/sql/LOCK_audit_mask YES YES
|
wait/synch/mutex/sql/LOCK_audit_mask YES YES
|
||||||
select * from performance_schema.setup_instruments
|
select * from performance_schema.setup_instruments
|
||||||
where name like 'Wait/Synch/Rwlock/sql/%'
|
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;
|
order by name limit 10;
|
||||||
NAME ENABLED TIMED
|
NAME ENABLED TIMED
|
||||||
wait/synch/rwlock/sql/LOCK_dboptions YES YES
|
wait/synch/rwlock/sql/LOCK_dboptions YES YES
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user