mirror of
https://github.com/MariaDB/server.git
synced 2025-08-05 13:16:09 +03:00
Merge 10.6 into 10.11
This commit is contained in:
@@ -657,7 +657,6 @@ error:
|
|||||||
pthread_cond_signal(&count_threshhold);
|
pthread_cond_signal(&count_threshhold);
|
||||||
pthread_mutex_unlock(&counter_mutex);
|
pthread_mutex_unlock(&counter_mutex);
|
||||||
mysql_thread_end();
|
mysql_thread_end();
|
||||||
pthread_exit(0);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -990,7 +990,6 @@ end_thread:
|
|||||||
cn->mysql= 0;
|
cn->mysql= 0;
|
||||||
cn->query_done= 1;
|
cn->query_done= 1;
|
||||||
mysql_thread_end();
|
mysql_thread_end();
|
||||||
pthread_exit(0);
|
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -915,13 +915,15 @@ datafiles_iter_next(datafiles_iter_t *it)
|
|||||||
fil_system.space_list.begin() :
|
fil_system.space_list.begin() :
|
||||||
std::next(it->space);
|
std::next(it->space);
|
||||||
|
|
||||||
while (it->space != fil_system.space_list.end() &&
|
while (it->space != fil_system.space_list.end()
|
||||||
(it->space->purpose != FIL_TYPE_TABLESPACE ||
|
&& UT_LIST_GET_LEN(it->space->chain) == 0)
|
||||||
UT_LIST_GET_LEN(it->space->chain) == 0))
|
|
||||||
++it->space;
|
++it->space;
|
||||||
if (it->space == fil_system.space_list.end())
|
if (it->space == fil_system.space_list.end())
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
|
ut_ad(!it->space->is_temporary());
|
||||||
|
ut_ad(!it->space->is_being_imported());
|
||||||
|
|
||||||
it->node = UT_LIST_GET_FIRST(it->space->chain);
|
it->node = UT_LIST_GET_FIRST(it->space->chain);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
@@ -1113,7 +1115,8 @@ static void backup_file_op(uint32_t space_id, int type,
|
|||||||
std::string space_name = filename_to_spacename(name, len);
|
std::string space_name = filename_to_spacename(name, len);
|
||||||
ddl_tracker.id_to_name[space_id] = space_name;
|
ddl_tracker.id_to_name[space_id] = space_name;
|
||||||
ddl_tracker.delete_defer(space_id, space_name);
|
ddl_tracker.delete_defer(space_id, space_name);
|
||||||
msg("DDL tracking : create %u \"%.*s\"", space_id, int(len), name);
|
msg("DDL tracking : create %" PRIu32 " \"%.*s\"",
|
||||||
|
space_id, int(len), name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FILE_MODIFY:
|
case FILE_MODIFY:
|
||||||
@@ -1129,7 +1132,7 @@ static void backup_file_op(uint32_t space_id, int type,
|
|||||||
ddl_tracker.id_to_name[space_id] = new_space_name;
|
ddl_tracker.id_to_name[space_id] = new_space_name;
|
||||||
ddl_tracker.rename_defer(space_id, old_space_name,
|
ddl_tracker.rename_defer(space_id, old_space_name,
|
||||||
new_space_name);
|
new_space_name);
|
||||||
msg("DDL tracking : rename %u \"%.*s\",\"%.*s\"",
|
msg("DDL tracking : rename %" PRIu32 " \"%.*s\",\"%.*s\"",
|
||||||
space_id, int(len), name, int(new_len), new_name);
|
space_id, int(len), name, int(new_len), new_name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1137,7 +1140,8 @@ static void backup_file_op(uint32_t space_id, int type,
|
|||||||
ddl_tracker.drops.insert(space_id);
|
ddl_tracker.drops.insert(space_id);
|
||||||
ddl_tracker.delete_defer(
|
ddl_tracker.delete_defer(
|
||||||
space_id, filename_to_spacename(name, len));
|
space_id, filename_to_spacename(name, len));
|
||||||
msg("DDL tracking : delete %u \"%.*s\"", space_id, int(len), name);
|
msg("DDL tracking : delete %" PRIu32 " \"%.*s\"",
|
||||||
|
space_id, int(len), name);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ut_ad(0);
|
ut_ad(0);
|
||||||
@@ -1188,13 +1192,14 @@ static void backup_file_op_fail(uint32_t space_id, int type,
|
|||||||
const std::string spacename{filename_to_spacename(name, len)};
|
const std::string spacename{filename_to_spacename(name, len)};
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case FILE_CREATE:
|
case FILE_CREATE:
|
||||||
msg("DDL tracking : create %u \"%.*s\"", space_id, int(len), name);
|
msg("DDL tracking : create %" PRIu32 " \"%.*s\"",
|
||||||
|
space_id, int(len), name);
|
||||||
fail = !check_if_skip_table(spacename.c_str());
|
fail = !check_if_skip_table(spacename.c_str());
|
||||||
break;
|
break;
|
||||||
case FILE_MODIFY:
|
case FILE_MODIFY:
|
||||||
break;
|
break;
|
||||||
case FILE_RENAME:
|
case FILE_RENAME:
|
||||||
msg("DDL tracking : rename %u \"%.*s\",\"%.*s\"",
|
msg("DDL tracking : rename %" PRIu32 " \"%.*s\",\"%.*s\"",
|
||||||
space_id, int(len), name, int(new_len), new_name);
|
space_id, int(len), name, int(new_len), new_name);
|
||||||
fail = !check_if_skip_table(spacename.c_str())
|
fail = !check_if_skip_table(spacename.c_str())
|
||||||
|| !check_if_skip_table(
|
|| !check_if_skip_table(
|
||||||
@@ -1203,7 +1208,8 @@ static void backup_file_op_fail(uint32_t space_id, int type,
|
|||||||
case FILE_DELETE:
|
case FILE_DELETE:
|
||||||
fail = !check_if_skip_table(spacename.c_str())
|
fail = !check_if_skip_table(spacename.c_str())
|
||||||
&& !check_if_fts_table(spacename.c_str());
|
&& !check_if_fts_table(spacename.c_str());
|
||||||
msg("DDL tracking : delete %u \"%.*s\"", space_id, int(len), name);
|
msg("DDL tracking : delete %" PRIu32 " \"%.*s\"",
|
||||||
|
space_id, int(len), name);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ut_ad(0);
|
ut_ad(0);
|
||||||
@@ -1224,7 +1230,7 @@ static void backup_undo_trunc(uint32_t space_id)
|
|||||||
|
|
||||||
/* Function to store the space id of page0 INIT_PAGE
|
/* Function to store the space id of page0 INIT_PAGE
|
||||||
@param space_id space id which has page0 init page */
|
@param space_id space id which has page0 init page */
|
||||||
static void backup_first_page_op(space_id_t space_id)
|
static void backup_first_page_op(uint32_t space_id)
|
||||||
{
|
{
|
||||||
first_page_init_ids.insert(space_id);
|
first_page_init_ids.insert(space_id);
|
||||||
}
|
}
|
||||||
@@ -3934,8 +3940,8 @@ static void xb_load_single_table_tablespace(const char *dirname,
|
|||||||
if (err == DB_SUCCESS && file->space_id() != SRV_TMP_SPACE_ID) {
|
if (err == DB_SUCCESS && file->space_id() != SRV_TMP_SPACE_ID) {
|
||||||
mysql_mutex_lock(&fil_system.mutex);
|
mysql_mutex_lock(&fil_system.mutex);
|
||||||
space = fil_space_t::create(
|
space = fil_space_t::create(
|
||||||
file->space_id(), file->flags(),
|
uint32_t(file->space_id()), file->flags(), false,
|
||||||
FIL_TYPE_TABLESPACE, nullptr/* TODO: crypt_data */,
|
nullptr/* TODO: crypt_data */,
|
||||||
FIL_ENCRYPTION_DEFAULT,
|
FIL_ENCRYPTION_DEFAULT,
|
||||||
file->handle() != OS_FILE_CLOSED);
|
file->handle() != OS_FILE_CLOSED);
|
||||||
ut_ad(space);
|
ut_ad(space);
|
||||||
@@ -5670,8 +5676,8 @@ void CorruptedPages::backup_fix_ddl(ds_ctxt *ds_data, ds_ctxt *ds_meta)
|
|||||||
iter != ddl_tracker.tables_in_backup.end();
|
iter != ddl_tracker.tables_in_backup.end();
|
||||||
iter++) {
|
iter++) {
|
||||||
|
|
||||||
const std::string name = iter->second;
|
|
||||||
uint32_t id = iter->first;
|
uint32_t id = iter->first;
|
||||||
|
const std::string &name = iter->second;
|
||||||
|
|
||||||
if (ddl_tracker.drops.find(id) != ddl_tracker.drops.end()) {
|
if (ddl_tracker.drops.find(id) != ddl_tracker.drops.end()) {
|
||||||
dropped_tables.insert(name);
|
dropped_tables.insert(name);
|
||||||
@@ -5698,7 +5704,7 @@ void CorruptedPages::backup_fix_ddl(ds_ctxt *ds_data, ds_ctxt *ds_meta)
|
|||||||
iter++) {
|
iter++) {
|
||||||
|
|
||||||
uint32_t id = iter->first;
|
uint32_t id = iter->first;
|
||||||
std::string name = iter->second;
|
const std::string &name = iter->second;
|
||||||
|
|
||||||
if (ddl_tracker.tables_in_backup.find(id) != ddl_tracker.tables_in_backup.end()) {
|
if (ddl_tracker.tables_in_backup.find(id) != ddl_tracker.tables_in_backup.end()) {
|
||||||
/* already processed above */
|
/* already processed above */
|
||||||
@@ -5995,8 +6001,8 @@ exit:
|
|||||||
|
|
||||||
char tmpname[FN_REFLEN];
|
char tmpname[FN_REFLEN];
|
||||||
|
|
||||||
snprintf(tmpname, FN_REFLEN, "%s/xtrabackup_tmp_#%u",
|
snprintf(tmpname, FN_REFLEN, "%s/xtrabackup_tmp_#%"
|
||||||
dbname, fil_space->id);
|
PRIu32, dbname, fil_space->id);
|
||||||
|
|
||||||
msg("mariabackup: Renaming %s to %s.ibd",
|
msg("mariabackup: Renaming %s to %s.ibd",
|
||||||
fil_space->chain.start->name, tmpname);
|
fil_space->chain.start->name, tmpname);
|
||||||
@@ -6051,8 +6057,8 @@ exit:
|
|||||||
ut_ad(fil_space_t::physical_size(flags) == info.page_size);
|
ut_ad(fil_space_t::physical_size(flags) == info.page_size);
|
||||||
|
|
||||||
mysql_mutex_lock(&fil_system.mutex);
|
mysql_mutex_lock(&fil_system.mutex);
|
||||||
fil_space_t* space = fil_space_t::create(info.space_id, flags,
|
fil_space_t* space = fil_space_t::create(uint32_t(info.space_id),
|
||||||
FIL_TYPE_TABLESPACE, 0,
|
flags, false, 0,
|
||||||
FIL_ENCRYPTION_DEFAULT, true);
|
FIL_ENCRYPTION_DEFAULT, true);
|
||||||
mysql_mutex_unlock(&fil_system.mutex);
|
mysql_mutex_unlock(&fil_system.mutex);
|
||||||
if (space) {
|
if (space) {
|
||||||
|
@@ -78,5 +78,7 @@
|
|||||||
{ "HA_ERR_ABORTED_BY_USER", HA_ERR_ABORTED_BY_USER, "" },
|
{ "HA_ERR_ABORTED_BY_USER", HA_ERR_ABORTED_BY_USER, "" },
|
||||||
{ "HA_ERR_DISK_FULL", HA_ERR_DISK_FULL, "" },
|
{ "HA_ERR_DISK_FULL", HA_ERR_DISK_FULL, "" },
|
||||||
{ "HA_ERR_INCOMPATIBLE_DEFINITION", HA_ERR_INCOMPATIBLE_DEFINITION, "" },
|
{ "HA_ERR_INCOMPATIBLE_DEFINITION", HA_ERR_INCOMPATIBLE_DEFINITION, "" },
|
||||||
{ "HA_ERR_NO_ENCRYPTION", HA_ERR_NO_ENCRYPTION, "" },
|
|
||||||
{ "HA_ERR_COMMIT_ERROR", HA_ERR_COMMIT_ERROR, "" },
|
{ "HA_ERR_COMMIT_ERROR", HA_ERR_COMMIT_ERROR, "" },
|
||||||
|
{ "HA_ERR_PARTITION_LIST", HA_ERR_PARTITION_LIST, ""},
|
||||||
|
{ "HA_ERR_NO_ENCRYPTION", HA_ERR_NO_ENCRYPTION, ""},
|
||||||
|
{ "HA_ERR_ROLLBACK", HA_ERR_ROLLBACK, "" },
|
||||||
|
@@ -535,7 +535,8 @@ enum ha_base_keytype {
|
|||||||
#define HA_ERR_COMMIT_ERROR 197
|
#define HA_ERR_COMMIT_ERROR 197
|
||||||
#define HA_ERR_PARTITION_LIST 198
|
#define HA_ERR_PARTITION_LIST 198
|
||||||
#define HA_ERR_NO_ENCRYPTION 199
|
#define HA_ERR_NO_ENCRYPTION 199
|
||||||
#define HA_ERR_LAST 199 /* Copy of last error nr * */
|
#define HA_ERR_ROLLBACK 200 /* Automatic rollback done */
|
||||||
|
#define HA_ERR_LAST 200 /* Copy of last error nr * */
|
||||||
|
|
||||||
/* Number of different errors */
|
/* Number of different errors */
|
||||||
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
|
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
|
||||||
|
@@ -110,7 +110,8 @@ static const char *handler_error_messages[]=
|
|||||||
"Sequence values are conflicting",
|
"Sequence values are conflicting",
|
||||||
"Error during commit",
|
"Error during commit",
|
||||||
"Cannot select partitions",
|
"Cannot select partitions",
|
||||||
"Cannot initialize encryption. Check that all encryption parameters have been set"
|
"Cannot initialize encryption. Check that all encryption parameters have been set",
|
||||||
|
"Transaction was aborted",
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* MYSYS_MY_HANDLER_ERRORS_INCLUDED */
|
#endif /* MYSYS_MY_HANDLER_ERRORS_INCLUDED */
|
||||||
|
@@ -257,9 +257,9 @@ extern void (*my_sigtstp_cleanup)(void),
|
|||||||
/* Executed before jump to shell */
|
/* Executed before jump to shell */
|
||||||
(*my_sigtstp_restart)(void);
|
(*my_sigtstp_restart)(void);
|
||||||
/* Executed when coming from shell */
|
/* Executed when coming from shell */
|
||||||
extern MYSQL_PLUGIN_IMPORT int my_umask; /* Default creation mask */
|
extern MYSQL_PLUGIN_IMPORT mode_t my_umask; /* Default creation mask */
|
||||||
extern int my_umask_dir,
|
extern mode_t my_umask_dir;
|
||||||
my_recived_signals, /* Signals we have got */
|
extern int my_recived_signals, /* Signals we have got */
|
||||||
my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
|
my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
|
||||||
my_dont_interrupt; /* call remember_intr when set */
|
my_dont_interrupt; /* call remember_intr when set */
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@@ -625,7 +625,7 @@ extern File my_open(const char *FileName,int Flags,myf MyFlags);
|
|||||||
extern File my_register_filename(File fd, const char *FileName,
|
extern File my_register_filename(File fd, const char *FileName,
|
||||||
enum file_type type_of_file,
|
enum file_type type_of_file,
|
||||||
uint error_message_number, myf MyFlags);
|
uint error_message_number, myf MyFlags);
|
||||||
extern File my_create(const char *FileName,int CreateFlags,
|
extern File my_create(const char *FileName, mode_t CreateFlags,
|
||||||
int AccessFlags, myf MyFlags);
|
int AccessFlags, myf MyFlags);
|
||||||
extern int my_close(File Filedes,myf MyFlags);
|
extern int my_close(File Filedes,myf MyFlags);
|
||||||
extern int my_mkdir(const char *dir, int Flags, myf MyFlags);
|
extern int my_mkdir(const char *dir, int Flags, myf MyFlags);
|
||||||
@@ -633,7 +633,7 @@ extern int my_readlink(char *to, const char *filename, myf MyFlags);
|
|||||||
extern int my_is_symlink(const char *filename);
|
extern int my_is_symlink(const char *filename);
|
||||||
extern int my_realpath(char *to, const char *filename, myf MyFlags);
|
extern int my_realpath(char *to, const char *filename, myf MyFlags);
|
||||||
extern File my_create_with_symlink(const char *linkname, const char *filename,
|
extern File my_create_with_symlink(const char *linkname, const char *filename,
|
||||||
int createflags, int access_flags,
|
mode_t createflags, int access_flags,
|
||||||
myf MyFlags);
|
myf MyFlags);
|
||||||
extern int my_rename_with_symlink(const char *from,const char *to,myf MyFlags);
|
extern int my_rename_with_symlink(const char *from,const char *to,myf MyFlags);
|
||||||
extern int my_symlink(const char *content, const char *linkname, myf MyFlags);
|
extern int my_symlink(const char *content, const char *linkname, myf MyFlags);
|
||||||
|
@@ -2,6 +2,10 @@
|
|||||||
# Bug #24200: Provide backwards compatibility mode for 4.x "rollback on
|
# Bug #24200: Provide backwards compatibility mode for 4.x "rollback on
|
||||||
# transaction timeout"
|
# transaction timeout"
|
||||||
#
|
#
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
@@ -2,6 +2,10 @@
|
|||||||
-- source include/have_innodb.inc
|
-- source include/have_innodb.inc
|
||||||
-- source include/not_binlog_format_row.inc
|
-- source include/not_binlog_format_row.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Bug #39022: Mysql randomly crashing in lock_sec_rec_cons_read_sees
|
--echo # Bug #39022: Mysql randomly crashing in lock_sec_rec_cons_read_sees
|
||||||
--echo #
|
--echo #
|
||||||
|
@@ -1,6 +1,10 @@
|
|||||||
--source include/have_metadata_lock_info.inc
|
--source include/have_metadata_lock_info.inc
|
||||||
-- source include/have_innodb.inc
|
-- source include/have_innodb.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
# Save the initial number of concurrent sessions.
|
# Save the initial number of concurrent sessions.
|
||||||
--source include/count_sessions.inc
|
--source include/count_sessions.inc
|
||||||
|
|
||||||
|
@@ -212,6 +212,23 @@ use `a
|
|||||||
b`;
|
b`;
|
||||||
SET timestamp=1234567890;
|
SET timestamp=1234567890;
|
||||||
select count(*) from mysql.global_priv where length(priv)>2
|
select count(*) from mysql.global_priv where length(priv)>2
|
||||||
|
#
|
||||||
|
# MDEV-31366 Assertion `thd->start_time' failed in bool LOGGER::slow_log_print(THD*, const char*, size_t, ulonglong)
|
||||||
|
#
|
||||||
|
TRUNCATE mysql.slow_log;
|
||||||
|
SET global log_output='TABLE';
|
||||||
|
SET timestamp=0.99;
|
||||||
|
SET long_query_time=0.00001;
|
||||||
|
SELECT SLEEP(0.1);
|
||||||
|
SLEEP(0.1)
|
||||||
|
0
|
||||||
|
SELECT COUNT(*)>0 AS c1 FROM mysql.slow_log;
|
||||||
|
c1
|
||||||
|
1
|
||||||
|
SET global log_output=default;
|
||||||
|
SET timestamp=default;
|
||||||
|
SET long_query_time=default;
|
||||||
|
TRUNCATE mysql.slow_log;
|
||||||
# End of 10.5 tests
|
# End of 10.5 tests
|
||||||
#
|
#
|
||||||
# MDEV-34251 Conditional jump or move depends on uninitialised value in
|
# MDEV-34251 Conditional jump or move depends on uninitialised value in
|
||||||
|
@@ -225,6 +225,21 @@ let SEARCH_PATTERN= use \`a\n.*2;
|
|||||||
let SEARCH_OUTPUT=matches;
|
let SEARCH_OUTPUT=matches;
|
||||||
source include/search_pattern_in_file.inc;
|
source include/search_pattern_in_file.inc;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-31366 Assertion `thd->start_time' failed in bool LOGGER::slow_log_print(THD*, const char*, size_t, ulonglong)
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
TRUNCATE mysql.slow_log;
|
||||||
|
SET global log_output='TABLE';
|
||||||
|
SET timestamp=0.99;
|
||||||
|
SET long_query_time=0.00001;
|
||||||
|
SELECT SLEEP(0.1);
|
||||||
|
SELECT COUNT(*)>0 AS c1 FROM mysql.slow_log;
|
||||||
|
SET global log_output=default;
|
||||||
|
SET timestamp=default;
|
||||||
|
SET long_query_time=default;
|
||||||
|
TRUNCATE mysql.slow_log;
|
||||||
|
|
||||||
--echo # End of 10.5 tests
|
--echo # End of 10.5 tests
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
|
@@ -2,6 +2,10 @@
|
|||||||
--source include/have_partition.inc
|
--source include/have_partition.inc
|
||||||
--source include/have_sequence.inc
|
--source include/have_sequence.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-18707 Server crash in my_hash_sort_bin, ASAN heap-use-after-free in Field::is_null, server hang, corrupted double-linked list
|
--echo # MDEV-18707 Server crash in my_hash_sort_bin, ASAN heap-use-after-free in Field::is_null, server hang, corrupted double-linked list
|
||||||
--echo #
|
--echo #
|
||||||
|
@@ -5,6 +5,9 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
|||||||
|
|
||||||
call mtr.add_suppression("InnoDB: Table .* does not exist in the InnoDB internal data dictionary .*");
|
call mtr.add_suppression("InnoDB: Table .* does not exist in the InnoDB internal data dictionary .*");
|
||||||
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
|
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Bug#11766879/Bug#60106: DIFF BETWEEN # OF INDEXES IN MYSQL VS INNODB,
|
--echo # Bug#11766879/Bug#60106: DIFF BETWEEN # OF INDEXES IN MYSQL VS INNODB,
|
||||||
|
@@ -2037,7 +2037,7 @@ SUCCESS
|
|||||||
execute stmt;
|
execute stmt;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1050 Table 't2' already exists
|
Note 1050 Table 't2' already exists
|
||||||
call p_verify_reprepare_count(1);
|
call p_verify_reprepare_count(0);
|
||||||
SUCCESS
|
SUCCESS
|
||||||
|
|
||||||
select * from t2;
|
select * from t2;
|
||||||
|
@@ -1686,7 +1686,7 @@ drop table t2;
|
|||||||
execute stmt;
|
execute stmt;
|
||||||
call p_verify_reprepare_count(0);
|
call p_verify_reprepare_count(0);
|
||||||
execute stmt;
|
execute stmt;
|
||||||
call p_verify_reprepare_count(1);
|
call p_verify_reprepare_count(0);
|
||||||
select * from t2;
|
select * from t2;
|
||||||
execute stmt;
|
execute stmt;
|
||||||
call p_verify_reprepare_count(0);
|
call p_verify_reprepare_count(0);
|
||||||
|
@@ -4,6 +4,10 @@
|
|||||||
--source include/have_sequence.inc
|
--source include/have_sequence.inc
|
||||||
--source include/innodb_stable_estimates.inc
|
--source include/innodb_stable_estimates.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
|
SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
|
||||||
|
|
||||||
SET @save_stats_persistent=@@GLOBAL.innodb_stats_persistent;
|
SET @save_stats_persistent=@@GLOBAL.innodb_stats_persistent;
|
||||||
|
@@ -2,13 +2,16 @@
|
|||||||
# WL#1756
|
# WL#1756
|
||||||
#
|
#
|
||||||
-- source include/have_innodb.inc
|
-- source include/have_innodb.inc
|
||||||
|
|
||||||
--source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
|
|
||||||
# Save the initial number of concurrent sessions
|
# Save the initial number of concurrent sessions
|
||||||
--source include/count_sessions.inc
|
--source include/count_sessions.inc
|
||||||
|
|
||||||
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
|
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
drop table if exists t1, t2;
|
drop table if exists t1, t2;
|
||||||
|
@@ -10,6 +10,5 @@
|
|||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
galera_sequences : MDEV-32561 WSREP FSM failure: no such a transition REPLICATING -> COMMITTED
|
|
||||||
galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
|
galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
|
||||||
galera_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
|
galera_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
|
||||||
|
@@ -1,10 +1,12 @@
|
|||||||
connection node_2;
|
connection node_2;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
CREATE TABLE t1(a int not null primary key auto_increment,b int) engine=InnoDB;
|
CREATE TABLE t1(a int not null primary key auto_increment,b int) engine=InnoDB;
|
||||||
insert into t1 values (NULL,1);
|
insert into t1 values (NULL,1);
|
||||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||||
connection node_2a;
|
connection node_2a;
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
begin;
|
begin;
|
||||||
update t1 set a = 5;
|
update t1 set a = 5;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
|
@@ -1,8 +1,10 @@
|
|||||||
connection node_2;
|
connection node_2;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
call mtr.add_suppression("WSREP: Trying to continue unpaused monitor");
|
call mtr.add_suppression("WSREP: Trying to continue unpaused monitor");
|
||||||
connection node_1;
|
connection node_1;
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
call mtr.add_suppression("WSREP: Trying to continue unpaused monitor");
|
call mtr.add_suppression("WSREP: Trying to continue unpaused monitor");
|
||||||
CREATE TABLE t1 ENGINE=InnoDB select 1 as a, 1 as b union select 2, 2;
|
CREATE TABLE t1 ENGINE=InnoDB select 1 as a, 1 as b union select 2, 2;
|
||||||
ALTER TABLE t1 add primary key(a);
|
ALTER TABLE t1 add primary key(a);
|
||||||
|
@@ -314,3 +314,14 @@ NEXTVAL(t)
|
|||||||
connection node_1;
|
connection node_1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP SEQUENCE t;
|
DROP SEQUENCE t;
|
||||||
|
|
||||||
|
MDEV-33245 SIGSEGV in wsrep_check_sequence | Sql_cmd_alter_sequence::execute
|
||||||
|
|
||||||
|
CREATE TABLE t (a INT) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t VALUES (0);
|
||||||
|
CREATE TABLE t1 (c VARCHAR) ENGINE=InnoDB;
|
||||||
|
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 ') ENGINE=InnoDB' at line 1
|
||||||
|
ALTER SEQUENCE IF EXISTS t MINVALUE=1;
|
||||||
|
ERROR 42000: This version of MariaDB doesn't yet support 'CACHE without INCREMENT BY 0 in Galera cluster'
|
||||||
|
DROP TABLE t;
|
||||||
|
End of 10.5 tests
|
||||||
|
@@ -7,11 +7,13 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
CREATE TABLE t1(a int not null primary key auto_increment,b int) engine=InnoDB;
|
CREATE TABLE t1(a int not null primary key auto_increment,b int) engine=InnoDB;
|
||||||
insert into t1 values (NULL,1);
|
insert into t1 values (NULL,1);
|
||||||
|
|
||||||
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
||||||
--connection node_2a
|
--connection node_2a
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
begin;
|
begin;
|
||||||
update t1 set a = 5;
|
update t1 set a = 5;
|
||||||
|
|
||||||
|
@@ -3,9 +3,11 @@
|
|||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
call mtr.add_suppression("WSREP: Trying to continue unpaused monitor");
|
call mtr.add_suppression("WSREP: Trying to continue unpaused monitor");
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
call mtr.add_suppression("WSREP: Trying to continue unpaused monitor");
|
call mtr.add_suppression("WSREP: Trying to continue unpaused monitor");
|
||||||
|
|
||||||
CREATE TABLE t1 ENGINE=InnoDB select 1 as a, 1 as b union select 2, 2;
|
CREATE TABLE t1 ENGINE=InnoDB select 1 as a, 1 as b union select 2, 2;
|
||||||
|
@@ -341,3 +341,18 @@ SELECT NEXTVAL(t);
|
|||||||
--connection node_1
|
--connection node_1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP SEQUENCE t;
|
DROP SEQUENCE t;
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo MDEV-33245 SIGSEGV in wsrep_check_sequence | Sql_cmd_alter_sequence::execute
|
||||||
|
--echo
|
||||||
|
|
||||||
|
CREATE TABLE t (a INT) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t VALUES (0);
|
||||||
|
|
||||||
|
--error ER_PARSE_ERROR
|
||||||
|
CREATE TABLE t1 (c VARCHAR) ENGINE=InnoDB;
|
||||||
|
--error ER_NOT_SUPPORTED_YET
|
||||||
|
ALTER SEQUENCE IF EXISTS t MINVALUE=1;
|
||||||
|
|
||||||
|
DROP TABLE t;
|
||||||
|
--echo End of 10.5 tests
|
||||||
|
@@ -456,7 +456,7 @@ restore: t1 .ibd and .cfg files
|
|||||||
SET SESSION debug_dbug=@saved_debug_dbug;
|
SET SESSION debug_dbug=@saved_debug_dbug;
|
||||||
SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
|
SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
|
||||||
ALTER TABLE t1 IMPORT TABLESPACE;
|
ALTER TABLE t1 IMPORT TABLESPACE;
|
||||||
ERROR HY000: Got error 42 'Tablespace not found' from ./test/t1.ibd
|
ERROR HY000: Got error 41 'Tablespace not found' from ./test/t1.ibd
|
||||||
SET SESSION debug_dbug=@saved_debug_dbug;
|
SET SESSION debug_dbug=@saved_debug_dbug;
|
||||||
restore: t1 .ibd and .cfg files
|
restore: t1 .ibd and .cfg files
|
||||||
SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure";
|
SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure";
|
||||||
|
@@ -3,6 +3,10 @@
|
|||||||
--source include/have_debug_sync.inc
|
--source include/have_debug_sync.inc
|
||||||
--source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
# Two parallel connection with autoinc column after restart.
|
# Two parallel connection with autoinc column after restart.
|
||||||
|
|
||||||
CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY)ENGINE=INNODB;
|
CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY)ENGINE=INNODB;
|
||||||
|
@@ -5,6 +5,10 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/count_sessions.inc
|
--source include/count_sessions.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
let $have_deadlock=`select @@GLOBAL.innodb_deadlock_detect`;
|
let $have_deadlock=`select @@GLOBAL.innodb_deadlock_detect`;
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
|
@@ -1,6 +1,10 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/count_sessions.inc
|
--source include/count_sessions.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
pkey int NOT NULL PRIMARY KEY,
|
pkey int NOT NULL PRIMARY KEY,
|
||||||
c int
|
c int
|
||||||
|
@@ -2,6 +2,10 @@
|
|||||||
--source include/have_debug_sync.inc
|
--source include/have_debug_sync.inc
|
||||||
--source include/count_sessions.inc
|
--source include/count_sessions.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--connect(cancel_purge,localhost,root,,)
|
--connect(cancel_purge,localhost,root,,)
|
||||||
# Purge can cause deadlock in the test, requesting page's RW_X_LATCH for trx
|
# Purge can cause deadlock in the test, requesting page's RW_X_LATCH for trx
|
||||||
# ids reseting, after trx 2 acqured RW_S_LATCH and suspended in debug sync point
|
# ids reseting, after trx 2 acqured RW_S_LATCH and suspended in debug sync point
|
||||||
|
@@ -2,6 +2,10 @@
|
|||||||
--source include/have_debug_sync.inc
|
--source include/have_debug_sync.inc
|
||||||
--source include/count_sessions.inc
|
--source include/count_sessions.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
# Purge can cause deadlock in the test, requesting page's RW_X_LATCH for trx
|
# Purge can cause deadlock in the test, requesting page's RW_X_LATCH for trx
|
||||||
# ids reseting, after trx 2 acqured RW_S_LATCH and suspended in debug sync point
|
# ids reseting, after trx 2 acqured RW_S_LATCH and suspended in debug sync point
|
||||||
# lock_trx_handle_wait_enter, waiting for upd_cont signal, which must be
|
# lock_trx_handle_wait_enter, waiting for upd_cont signal, which must be
|
||||||
|
@@ -2,6 +2,10 @@
|
|||||||
--source include/have_debug_sync.inc
|
--source include/have_debug_sync.inc
|
||||||
--source include/count_sessions.inc
|
--source include/count_sessions.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
# Purge can cause deadlock in the test, requesting page's RW_X_LATCH for trx
|
# Purge can cause deadlock in the test, requesting page's RW_X_LATCH for trx
|
||||||
# ids reseting, after trx 2 acqured RW_S_LATCH and suspended in debug sync point
|
# ids reseting, after trx 2 acqured RW_S_LATCH and suspended in debug sync point
|
||||||
# lock_trx_handle_wait_enter, waiting for upd_cont signal, which must be
|
# lock_trx_handle_wait_enter, waiting for upd_cont signal, which must be
|
||||||
|
@@ -2,6 +2,10 @@
|
|||||||
--source include/count_sessions.inc
|
--source include/count_sessions.inc
|
||||||
--source include/default_charset.inc
|
--source include/default_charset.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
SET GLOBAL innodb_stats_persistent = 0;
|
SET GLOBAL innodb_stats_persistent = 0;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
|
@@ -1,6 +1,10 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/have_partition.inc
|
--source include/have_partition.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check and select innodb lock type
|
# Check and select innodb lock type
|
||||||
#
|
#
|
||||||
|
@@ -4,6 +4,10 @@
|
|||||||
# Bug#42419 Server crash with "Pure virtual method called" on two concurrent connections
|
# Bug#42419 Server crash with "Pure virtual method called" on two concurrent connections
|
||||||
#
|
#
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
|
|
||||||
let $innodb_lock_wait_timeout= query_get_value(SHOW VARIABLES LIKE 'innodb_lock_wait_timeout%', Value, 1);
|
let $innodb_lock_wait_timeout= query_get_value(SHOW VARIABLES LIKE 'innodb_lock_wait_timeout%', Value, 1);
|
||||||
|
@@ -1,5 +1,9 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #41453: Assertion `m_status == DA_ERROR' failed in
|
# Bug #41453: Assertion `m_status == DA_ERROR' failed in
|
||||||
# Diagnostics_area::sql_errno
|
# Diagnostics_area::sql_errno
|
||||||
|
@@ -6,6 +6,10 @@
|
|||||||
# be heavier than ones that had not.
|
# be heavier than ones that had not.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
-- source include/have_innodb.inc
|
-- source include/have_innodb.inc
|
||||||
|
|
||||||
SET default_storage_engine=InnoDB;
|
SET default_storage_engine=InnoDB;
|
||||||
|
@@ -3,6 +3,10 @@
|
|||||||
--source include/have_debug_sync.inc
|
--source include/have_debug_sync.inc
|
||||||
--source include/count_sessions.inc
|
--source include/count_sessions.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--connect (pause_purge,localhost,root)
|
--connect (pause_purge,localhost,root)
|
||||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||||
|
|
||||||
|
@@ -3,6 +3,10 @@
|
|||||||
--source include/have_debug.inc
|
--source include/have_debug.inc
|
||||||
--source include/have_debug_sync.inc
|
--source include/have_debug_sync.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
INSERT INTO t VALUES (3);
|
INSERT INTO t VALUES (3);
|
||||||
|
|
||||||
|
@@ -1,5 +1,9 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-26642 Weird SELECT view when a record is
|
--echo # MDEV-26642 Weird SELECT view when a record is
|
||||||
--echo # modified to the same value by two transactions
|
--echo # modified to the same value by two transactions
|
||||||
|
@@ -6,6 +6,9 @@
|
|||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
call mtr.add_suppression("\\[Warning\\] InnoDB: Over 67 percent of the buffer pool");
|
call mtr.add_suppression("\\[Warning\\] InnoDB: Over 67 percent of the buffer pool");
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
CREATE TABLE t1 (col1 INT) ENGINE=InnoDB;
|
CREATE TABLE t1 (col1 INT) ENGINE=InnoDB;
|
||||||
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
|
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
|
||||||
|
@@ -4,6 +4,10 @@
|
|||||||
|
|
||||||
--source include/innodb_stable_estimates.inc
|
--source include/innodb_stable_estimates.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
pk INT,
|
pk INT,
|
||||||
f1 VARCHAR(10) NOT NULL,
|
f1 VARCHAR(10) NOT NULL,
|
||||||
|
@@ -4,6 +4,10 @@
|
|||||||
# concurrent CREATE OR REPLACE and transactional UPDATE
|
# concurrent CREATE OR REPLACE and transactional UPDATE
|
||||||
#
|
#
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB;
|
CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB;
|
||||||
|
@@ -1,5 +1,9 @@
|
|||||||
source include/have_innodb.inc;
|
source include/have_innodb.inc;
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
#
|
#
|
||||||
# MDEV-20354 All but last insert ignored in InnoDB tables when table locked
|
# MDEV-20354 All but last insert ignored in InnoDB tables when table locked
|
||||||
#
|
#
|
||||||
|
@@ -249,9 +249,33 @@ id title
|
|||||||
7 mysql
|
7 mysql
|
||||||
TRUNCATE TABLE articles;
|
TRUNCATE TABLE articles;
|
||||||
INSERT INTO articles(id, title) VALUES(1, 'mysql');
|
INSERT INTO articles(id, title) VALUES(1, 'mysql');
|
||||||
|
CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
INSERT INTO t SET a=1;
|
||||||
|
SAVEPOINT t;
|
||||||
|
INSERT INTO articles(id, title) VALUES(2, 'mysql');
|
||||||
|
SELECT * FROM articles WHERE MATCH(title) AGAINST('mysql');
|
||||||
|
id title
|
||||||
|
1 mysql
|
||||||
|
ROLLBACK TO SAVEPOINT t;
|
||||||
|
SELECT * FROM articles WHERE MATCH(title) AGAINST('mysql');
|
||||||
|
id title
|
||||||
|
1 mysql
|
||||||
|
SELECT * FROM t;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
COMMIT;
|
||||||
|
SELECT * FROM articles WHERE MATCH(title) AGAINST('mysql');
|
||||||
|
id title
|
||||||
|
1 mysql
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t SET a=2;
|
||||||
INSERT INTO articles(id, title) VALUES(2, 'mysql');
|
INSERT INTO articles(id, title) VALUES(2, 'mysql');
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
|
SELECT * FROM t;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
DROP TABLE t;
|
||||||
INSERT INTO articles(id, title) VALUES(3, 'mysql');
|
INSERT INTO articles(id, title) VALUES(3, 'mysql');
|
||||||
SELECT * FROM articles WHERE MATCH(title) AGAINST('mysql');
|
SELECT * FROM articles WHERE MATCH(title) AGAINST('mysql');
|
||||||
id title
|
id title
|
||||||
|
@@ -366,12 +366,28 @@ TRUNCATE TABLE articles;
|
|||||||
|
|
||||||
INSERT INTO articles(id, title) VALUES(1, 'mysql');
|
INSERT INTO articles(id, title) VALUES(1, 'mysql');
|
||||||
|
|
||||||
|
CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
INSERT INTO t SET a=1;
|
||||||
|
SAVEPOINT t;
|
||||||
|
INSERT INTO articles(id, title) VALUES(2, 'mysql');
|
||||||
|
SELECT * FROM articles WHERE MATCH(title) AGAINST('mysql');
|
||||||
|
ROLLBACK TO SAVEPOINT t;
|
||||||
|
SELECT * FROM articles WHERE MATCH(title) AGAINST('mysql');
|
||||||
|
SELECT * FROM t;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
SELECT * FROM articles WHERE MATCH(title) AGAINST('mysql');
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t SET a=2;
|
||||||
INSERT INTO articles(id, title) VALUES(2, 'mysql');
|
INSERT INTO articles(id, title) VALUES(2, 'mysql');
|
||||||
|
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
|
|
||||||
|
SELECT * FROM t;
|
||||||
|
DROP TABLE t;
|
||||||
|
|
||||||
INSERT INTO articles(id, title) VALUES(3, 'mysql');
|
INSERT INTO articles(id, title) VALUES(3, 'mysql');
|
||||||
|
|
||||||
SELECT * FROM articles WHERE MATCH(title) AGAINST('mysql');
|
SELECT * FROM articles WHERE MATCH(title) AGAINST('mysql');
|
||||||
|
@@ -91,7 +91,7 @@ restore: t1 .ibd and .cfg files
|
|||||||
SET SESSION debug_dbug=@saved_debug_dbug;
|
SET SESSION debug_dbug=@saved_debug_dbug;
|
||||||
SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
|
SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
|
||||||
ALTER TABLE t1 IMPORT TABLESPACE;
|
ALTER TABLE t1 IMPORT TABLESPACE;
|
||||||
ERROR HY000: Got error 42 'Tablespace not found' from ./test/t1.ibd
|
ERROR HY000: Got error 41 'Tablespace not found' from ./test/t1.ibd
|
||||||
SET SESSION debug_dbug=@saved_debug_dbug;
|
SET SESSION debug_dbug=@saved_debug_dbug;
|
||||||
restore: t1 .ibd and .cfg files
|
restore: t1 .ibd and .cfg files
|
||||||
SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure";
|
SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure";
|
||||||
|
@@ -2,6 +2,9 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/have_debug.inc
|
--source include/have_debug.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--echo *** Test all-to-all replication with --gtid-ignore-duplicates ***
|
--echo *** Test all-to-all replication with --gtid-ignore-duplicates ***
|
||||||
|
|
||||||
|
@@ -30,4 +30,13 @@ DROP USER u2;
|
|||||||
set global server_audit_logging=off;
|
set global server_audit_logging=off;
|
||||||
UNINSTALL PLUGIN ed25519;
|
UNINSTALL PLUGIN ed25519;
|
||||||
UNINSTALL PLUGIN server_audit;
|
UNINSTALL PLUGIN server_audit;
|
||||||
|
#
|
||||||
|
# MDEV-35604: SIGSEGV in filter_query_type | log_statement_ex / auditing
|
||||||
|
#
|
||||||
|
INSTALL PLUGIN server_audit SONAME 'server_audit';
|
||||||
|
SET GLOBAL server_audit_logging=ON;
|
||||||
|
SET STATEMENT max_error_count=1 SELECT 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 near 'SELECT 1' at line 1
|
||||||
|
SET GLOBAL server_audit_logging=OFF;
|
||||||
|
UNINSTALL SONAME 'server_audit';
|
||||||
# end of 10.5 tests
|
# end of 10.5 tests
|
||||||
|
@@ -56,4 +56,20 @@ UNINSTALL PLUGIN ed25519;
|
|||||||
UNINSTALL PLUGIN server_audit;
|
UNINSTALL PLUGIN server_audit;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-35604: SIGSEGV in filter_query_type | log_statement_ex / auditing
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
INSTALL PLUGIN server_audit SONAME 'server_audit';
|
||||||
|
SET GLOBAL server_audit_logging=ON;
|
||||||
|
|
||||||
|
--ERROR ER_PARSE_ERROR
|
||||||
|
SET STATEMENT max_error_count=1 SELECT 1;
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
SET GLOBAL server_audit_logging=OFF;
|
||||||
|
--disable_warnings
|
||||||
|
UNINSTALL SONAME 'server_audit';
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
--echo # end of 10.5 tests
|
--echo # end of 10.5 tests
|
||||||
|
@@ -36,9 +36,9 @@ Table Op Msg_type Msg_text
|
|||||||
test.t1 analyze status Engine-independent statistics collected
|
test.t1 analyze status Engine-independent statistics collected
|
||||||
test.t1 analyze status OK
|
test.t1 analyze status OK
|
||||||
FLUSH LOGS;
|
FLUSH LOGS;
|
||||||
FOUND 1 /GTID 0-1-8 ddl/ in mysqlbinlog.out
|
|
||||||
FOUND 1 /GTID 0-1-9 ddl/ in mysqlbinlog.out
|
FOUND 1 /GTID 0-1-9 ddl/ in mysqlbinlog.out
|
||||||
FOUND 1 /GTID 0-1-10 ddl/ in mysqlbinlog.out
|
FOUND 1 /GTID 0-1-10 ddl/ in mysqlbinlog.out
|
||||||
|
FOUND 1 /GTID 0-1-11 ddl/ in mysqlbinlog.out
|
||||||
#
|
#
|
||||||
# Clean up
|
# Clean up
|
||||||
#
|
#
|
||||||
@@ -63,9 +63,9 @@ ALTER TABLE t1 REPAIR PARTITION p0;
|
|||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 repair status OK
|
test.t1 repair status OK
|
||||||
FLUSH LOGS;
|
FLUSH LOGS;
|
||||||
FOUND 1 /GTID 0-1-14 ddl/ in mysqlbinlog.out
|
|
||||||
FOUND 1 /GTID 0-1-15 ddl/ in mysqlbinlog.out
|
FOUND 1 /GTID 0-1-15 ddl/ in mysqlbinlog.out
|
||||||
FOUND 1 /GTID 0-1-16 ddl/ in mysqlbinlog.out
|
FOUND 1 /GTID 0-1-16 ddl/ in mysqlbinlog.out
|
||||||
|
FOUND 1 /GTID 0-1-17 ddl/ in mysqlbinlog.out
|
||||||
#
|
#
|
||||||
# Clean up
|
# Clean up
|
||||||
#
|
#
|
||||||
|
@@ -22,6 +22,10 @@
|
|||||||
--let $rpl_topology=1->2
|
--let $rpl_topology=1->2
|
||||||
--source include/rpl_init.inc
|
--source include/rpl_init.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--connection server_1
|
--connection server_1
|
||||||
FLUSH TABLES;
|
FLUSH TABLES;
|
||||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||||
|
@@ -2,6 +2,9 @@
|
|||||||
--source include/have_debug.inc
|
--source include/have_debug.inc
|
||||||
--source include/master-slave.inc
|
--source include/master-slave.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--echo MDEV-31655: Parallel replication deadlock victim preference code erroneously removed
|
--echo MDEV-31655: Parallel replication deadlock victim preference code erroneously removed
|
||||||
# The problem was that InnoDB would choose the wrong deadlock victim.
|
# The problem was that InnoDB would choose the wrong deadlock victim.
|
||||||
|
@@ -3,6 +3,10 @@
|
|||||||
--source include/have_debug.inc
|
--source include/have_debug.inc
|
||||||
--source include/have_binlog_format_statement.inc
|
--source include/have_binlog_format_statement.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--connection master
|
--connection master
|
||||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||||
CREATE TABLE t1(a INT) ENGINE=INNODB;
|
CREATE TABLE t1(a INT) ENGINE=INNODB;
|
||||||
|
@@ -5,6 +5,10 @@
|
|||||||
--source include/have_debug_sync.inc
|
--source include/have_debug_sync.inc
|
||||||
--source include/master-slave.inc
|
--source include/master-slave.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--connection server_2
|
--connection server_2
|
||||||
SET sql_log_bin=0;
|
SET sql_log_bin=0;
|
||||||
CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
|
CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends");
|
||||||
|
@@ -7,6 +7,9 @@
|
|||||||
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
|
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
|
||||||
call mtr.add_suppression("Can't find record in 't1'");
|
call mtr.add_suppression("Can't find record in 't1'");
|
||||||
call mtr.add_suppression("Can't find record in 't2'");
|
call mtr.add_suppression("Can't find record in 't2'");
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--connection server_1
|
--connection server_1
|
||||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||||
|
@@ -3,6 +3,10 @@
|
|||||||
--let $rpl_topology=1->2
|
--let $rpl_topology=1->2
|
||||||
--source include/rpl_init.inc
|
--source include/rpl_init.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--connection server_1
|
--connection server_1
|
||||||
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||||
CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
|
CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
|
||||||
|
@@ -9,6 +9,10 @@
|
|||||||
--source include/have_perfschema.inc
|
--source include/have_perfschema.inc
|
||||||
--source include/master-slave.inc
|
--source include/master-slave.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--let $xid_num = 19
|
--let $xid_num = 19
|
||||||
--let $repeat = 17
|
--let $repeat = 17
|
||||||
--let $workers = 7
|
--let $workers = 7
|
||||||
|
@@ -2,6 +2,9 @@
|
|||||||
--source include/master-slave.inc
|
--source include/master-slave.inc
|
||||||
|
|
||||||
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
|
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
--echo *** Provoke a deadlock on the slave, check that transaction retry succeeds. ***
|
--echo *** Provoke a deadlock on the slave, check that transaction retry succeeds. ***
|
||||||
--connection master
|
--connection master
|
||||||
|
@@ -1,6 +1,10 @@
|
|||||||
source suite/versioning/engines.inc;
|
source suite/versioning/engines.inc;
|
||||||
source suite/versioning/common.inc;
|
source suite/versioning/common.inc;
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
call mtr.add_suppression("InnoDB: Transaction was aborted due to ");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
replace_result $sys_datatype_expl SYS_DATATYPE;
|
replace_result $sys_datatype_expl SYS_DATATYPE;
|
||||||
eval create table t1(
|
eval create table t1(
|
||||||
x int unsigned,
|
x int unsigned,
|
||||||
|
@@ -251,7 +251,7 @@ my_bool allocate_dynamic(DYNAMIC_ARRAY *array, size_t max_elements)
|
|||||||
if (!(new_ptr= (uchar *) my_malloc(array->m_psi_key, size *
|
if (!(new_ptr= (uchar *) my_malloc(array->m_psi_key, size *
|
||||||
array->size_of_element,
|
array->size_of_element,
|
||||||
MYF(array->malloc_flags | MY_WME))))
|
MYF(array->malloc_flags | MY_WME))))
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(TRUE);
|
||||||
memcpy(new_ptr, array->buffer,
|
memcpy(new_ptr, array->buffer,
|
||||||
array->elements * array->size_of_element);
|
array->elements * array->size_of_element);
|
||||||
array->malloc_flags&= ~MY_INIT_BUFFER_USED;
|
array->malloc_flags&= ~MY_INIT_BUFFER_USED;
|
||||||
|
@@ -33,12 +33,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
File my_create(const char *FileName, int CreateFlags, int access_flags,
|
File my_create(const char *FileName, mode_t CreateFlags, int access_flags,
|
||||||
myf MyFlags)
|
myf MyFlags)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
DBUG_ENTER("my_create");
|
DBUG_ENTER("my_create");
|
||||||
DBUG_PRINT("my",("Name: '%s' CreateFlags: %d AccessFlags: %d MyFlags: %lu",
|
DBUG_PRINT("my",("Name: '%s' CreateFlags: %u AccessFlags: %d MyFlags: %lu",
|
||||||
FileName, CreateFlags, access_flags, MyFlags));
|
FileName, CreateFlags, access_flags, MyFlags));
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
fd= my_win_open(FileName, access_flags | O_CREAT);
|
fd= my_win_open(FileName, access_flags | O_CREAT);
|
||||||
|
@@ -54,7 +54,7 @@ size_t my_system_page_size= 8192; /* Default if no sysconf() */
|
|||||||
|
|
||||||
ulonglong my_thread_stack_size= (sizeof(void*) <= 4)? 65536: ((256-16)*1024);
|
ulonglong my_thread_stack_size= (sizeof(void*) <= 4)? 65536: ((256-16)*1024);
|
||||||
|
|
||||||
static ulong atoi_octal(const char *str)
|
static mode_t atoi_octal(const char *str)
|
||||||
{
|
{
|
||||||
long int tmp;
|
long int tmp;
|
||||||
while (*str && my_isspace(&my_charset_latin1, *str))
|
while (*str && my_isspace(&my_charset_latin1, *str))
|
||||||
@@ -62,7 +62,7 @@ static ulong atoi_octal(const char *str)
|
|||||||
str2int(str,
|
str2int(str,
|
||||||
(*str == '0' ? 8 : 10), /* Octalt or decimalt */
|
(*str == '0' ? 8 : 10), /* Octalt or decimalt */
|
||||||
0, INT_MAX, &tmp);
|
0, INT_MAX, &tmp);
|
||||||
return (ulong) tmp;
|
return (mode_t) tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
MYSQL_FILE *mysql_stdin= NULL;
|
MYSQL_FILE *mysql_stdin= NULL;
|
||||||
@@ -155,10 +155,10 @@ my_bool my_init(void)
|
|||||||
|
|
||||||
/* Default creation of new files */
|
/* Default creation of new files */
|
||||||
if ((str= getenv("UMASK")) != 0)
|
if ((str= getenv("UMASK")) != 0)
|
||||||
my_umask= (int) (atoi_octal(str) | 0600);
|
my_umask= atoi_octal(str) | 0600;
|
||||||
/* Default creation of new dir's */
|
/* Default creation of new dir's */
|
||||||
if ((str= getenv("UMASK_DIR")) != 0)
|
if ((str= getenv("UMASK_DIR")) != 0)
|
||||||
my_umask_dir= (int) (atoi_octal(str) | 0700);
|
my_umask_dir= atoi_octal(str) | 0700;
|
||||||
|
|
||||||
init_glob_errs();
|
init_glob_errs();
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#include "my_atomic.h"
|
#include "my_atomic.h"
|
||||||
|
|
||||||
CREATE_NOSYMLINK_FUNCTION(
|
CREATE_NOSYMLINK_FUNCTION(
|
||||||
open_nosymlinks(const char *pathname, int flags, int mode),
|
open_nosymlinks(const char *pathname, int flags, mode_t mode),
|
||||||
openat(dfd, filename, O_NOFOLLOW | flags, mode),
|
openat(dfd, filename, O_NOFOLLOW | flags, mode),
|
||||||
open(pathname, O_NOFOLLOW | flags, mode)
|
open(pathname, O_NOFOLLOW | flags, mode)
|
||||||
);
|
);
|
||||||
|
@@ -64,7 +64,7 @@ char curr_dir[FN_REFLEN]= {0},
|
|||||||
home_dir_buff[FN_REFLEN]= {0};
|
home_dir_buff[FN_REFLEN]= {0};
|
||||||
ulong my_stream_opened=0,my_tmp_file_created=0;
|
ulong my_stream_opened=0,my_tmp_file_created=0;
|
||||||
ulong my_file_total_opened= 0;
|
ulong my_file_total_opened= 0;
|
||||||
int my_umask=0664, my_umask_dir=0777;
|
mode_t my_umask=0664, my_umask_dir=0777;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
SECURITY_ATTRIBUTES my_dir_security_attributes= {sizeof(SECURITY_ATTRIBUTES),NULL,FALSE};
|
SECURITY_ATTRIBUTES my_dir_security_attributes= {sizeof(SECURITY_ATTRIBUTES),NULL,FALSE};
|
||||||
#endif
|
#endif
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
#include <m_string.h>
|
#include <m_string.h>
|
||||||
|
|
||||||
File my_create_with_symlink(const char *linkname, const char *filename,
|
File my_create_with_symlink(const char *linkname, const char *filename,
|
||||||
int createflags, int access_flags, myf MyFlags)
|
mode_t createflags, int access_flags, myf MyFlags)
|
||||||
{
|
{
|
||||||
File file;
|
File file;
|
||||||
int tmp_errno;
|
int tmp_errno;
|
||||||
|
@@ -566,8 +566,7 @@ static void *alarm_handler(void *arg __attribute__((unused)))
|
|||||||
alarm_thread_running= 0;
|
alarm_thread_running= 0;
|
||||||
mysql_cond_signal(&COND_alarm);
|
mysql_cond_signal(&COND_alarm);
|
||||||
mysql_mutex_unlock(&LOCK_alarm);
|
mysql_mutex_unlock(&LOCK_alarm);
|
||||||
pthread_exit(0);
|
return 0;
|
||||||
return 0; /* Impossible */
|
|
||||||
}
|
}
|
||||||
#endif /* USE_ALARM_THREAD */
|
#endif /* USE_ALARM_THREAD */
|
||||||
#endif
|
#endif
|
||||||
|
@@ -330,8 +330,7 @@ static void *timer_handler(void *arg __attribute__((unused)))
|
|||||||
}
|
}
|
||||||
mysql_mutex_unlock(&LOCK_timer);
|
mysql_mutex_unlock(&LOCK_timer);
|
||||||
my_thread_end();
|
my_thread_end();
|
||||||
pthread_exit(0);
|
return 0;
|
||||||
return 0; /* Impossible */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -290,7 +290,6 @@ pthread_handler_t background_thread(void *arg __attribute__((unused)))
|
|||||||
}
|
}
|
||||||
|
|
||||||
my_thread_end();
|
my_thread_end();
|
||||||
pthread_exit(0);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -6,8 +6,6 @@ IF(WIN32 OR WITHOUT_SERVER)
|
|||||||
RETURN()
|
RETURN()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-deprecated-declarations")
|
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(libhsclient)
|
INCLUDE_DIRECTORIES(libhsclient)
|
||||||
|
|
||||||
# Handlersocket client library. We do not distribute it,
|
# Handlersocket client library. We do not distribute it,
|
||||||
|
@@ -9,6 +9,11 @@
|
|||||||
#ifndef DENA_DATABASE_HPP
|
#ifndef DENA_DATABASE_HPP
|
||||||
#define DENA_DATABASE_HPP
|
#define DENA_DATABASE_HPP
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
/* auto_ptr is deprecated */
|
||||||
|
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@@ -19,6 +19,11 @@
|
|||||||
#include "string_ref.hpp"
|
#include "string_ref.hpp"
|
||||||
#include "string_buffer.hpp"
|
#include "string_buffer.hpp"
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
/* auto_ptr is deprecated */
|
||||||
|
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace dena {
|
namespace dena {
|
||||||
|
|
||||||
struct hstcpcli_filter {
|
struct hstcpcli_filter {
|
||||||
|
@@ -1782,6 +1782,8 @@ static int filter_query_type(const char *query, struct sa_keyword *kwd)
|
|||||||
char fword[MAX_KEYWORD + 1], nword[MAX_KEYWORD + 1];
|
char fword[MAX_KEYWORD + 1], nword[MAX_KEYWORD + 1];
|
||||||
int len, nlen= 0;
|
int len, nlen= 0;
|
||||||
const struct sa_keyword *l_keywords;
|
const struct sa_keyword *l_keywords;
|
||||||
|
if (!query)
|
||||||
|
return SQLCOM_NOTHING;
|
||||||
|
|
||||||
while (*query && (is_space(*query) || *query == '(' || *query == '/'))
|
while (*query && (is_space(*query) || *query == '(' || *query == '/'))
|
||||||
{
|
{
|
||||||
|
@@ -1117,7 +1117,7 @@ get_openssl()
|
|||||||
{
|
{
|
||||||
# If the OPENSSL_BINARY variable is already defined, just return:
|
# If the OPENSSL_BINARY variable is already defined, just return:
|
||||||
if [ -n "${OPENSSL_BINARY+x}" ]; then
|
if [ -n "${OPENSSL_BINARY+x}" ]; then
|
||||||
return
|
return 0
|
||||||
fi
|
fi
|
||||||
# Let's look for openssl:
|
# Let's look for openssl:
|
||||||
OPENSSL_BINARY=$(commandex 'openssl')
|
OPENSSL_BINARY=$(commandex 'openssl')
|
||||||
@@ -1556,7 +1556,7 @@ cleanup_pid()
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
elif ps -p $pid >/dev/null 2>&1; then
|
elif ps -p $pid >/dev/null 2>&1; then
|
||||||
wsrep_log_warning "Unable to kill PID=$pid ($pid_file)"
|
wsrep_log_warning "Unable to kill PID=$pid${pid_file:+ ($pid_file)}"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -1863,6 +1863,8 @@ create_dirs()
|
|||||||
cd "$OLD_PWD"
|
cd "$OLD_PWD"
|
||||||
[ $simplify -ne 0 -a "$ar_log_dir" = "$DATA_DIR" ] && ar_log_dir=""
|
[ $simplify -ne 0 -a "$ar_log_dir" = "$DATA_DIR" ] && ar_log_dir=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
wait_previous_sst()
|
wait_previous_sst()
|
||||||
|
@@ -439,17 +439,30 @@ get_transfer()
|
|||||||
get_footprint()
|
get_footprint()
|
||||||
{
|
{
|
||||||
cd "$DATA_DIR"
|
cd "$DATA_DIR"
|
||||||
local payload_data=$(find $findopt . \
|
local payload_data
|
||||||
|
if [ "$OS" = 'Linux' ]; then
|
||||||
|
payload_data=$(find $findopt . \
|
||||||
-regex '.*undo[0-9]+$\|.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' \
|
-regex '.*undo[0-9]+$\|.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' \
|
||||||
-type f -print0 | du --files0-from=- --block-size=1 -c -s | \
|
-type f -print0 | du --files0-from=- --bytes -c -s | \
|
||||||
awk 'END { print $1 }')
|
awk 'END { print $1 }')
|
||||||
|
else
|
||||||
|
payload_data=$(find $findopt . \
|
||||||
|
-regex '.*undo[0-9]+$|.*\.ibd$|.*\.MYI$\.*\.MYD$|.*ibdata1$' \
|
||||||
|
-type f -print0 | xargs -0 stat -f '%z' | \
|
||||||
|
awk '{ sum += $1 } END { print sum }')
|
||||||
|
fi
|
||||||
local payload_undo=0
|
local payload_undo=0
|
||||||
if [ -n "$ib_undo_dir" -a "$ib_undo_dir" != '.' -a \
|
if [ -n "$ib_undo_dir" -a "$ib_undo_dir" != '.' -a \
|
||||||
"$ib_undo_dir" != "$DATA_DIR" -a -d "$ib_undo_dir" ]
|
"$ib_undo_dir" != "$DATA_DIR" -a -d "$ib_undo_dir" ]
|
||||||
then
|
then
|
||||||
cd "$ib_undo_dir"
|
cd "$ib_undo_dir"
|
||||||
|
if [ "$OS" = 'Linux' ]; then
|
||||||
payload_undo=$(find . -regex '.*undo[0-9]+$' -type f -print0 | \
|
payload_undo=$(find . -regex '.*undo[0-9]+$' -type f -print0 | \
|
||||||
du --files0-from=- --block-size=1 -c -s | awk 'END { print $1 }')
|
du --files0-from=- --bytes -c -s | awk 'END { print $1 }')
|
||||||
|
else
|
||||||
|
payload_undo=$(find . -regex '.*undo[0-9]+$' -type f -print0 | \
|
||||||
|
xargs -0 stat -f '%z' | awk '{ sum += $1 } END { print sum }')
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
cd "$OLD_PWD"
|
cd "$OLD_PWD"
|
||||||
|
|
||||||
@@ -676,24 +689,25 @@ cleanup_at_exit()
|
|||||||
|
|
||||||
[ "$(pwd)" != "$OLD_PWD" ] && cd "$OLD_PWD"
|
[ "$(pwd)" != "$OLD_PWD" ] && cd "$OLD_PWD"
|
||||||
|
|
||||||
|
if [ "$WSREP_SST_OPT_ROLE" = 'donor' -o $estatus -ne 0 ]; then
|
||||||
if [ $estatus -ne 0 ]; then
|
if [ $estatus -ne 0 ]; then
|
||||||
wsrep_log_error "Removing $MAGIC_FILE file due to signal"
|
wsrep_log_error "Removing $MAGIC_FILE file due to signal"
|
||||||
|
fi
|
||||||
[ -f "$MAGIC_FILE" ] && rm -f "$MAGIC_FILE" || :
|
[ -f "$MAGIC_FILE" ] && rm -f "$MAGIC_FILE" || :
|
||||||
[ -f "$DONOR_MAGIC_FILE" ] && rm -f "$DONOR_MAGIC_FILE" || :
|
[ -f "$DONOR_MAGIC_FILE" ] && rm -f "$DONOR_MAGIC_FILE" || :
|
||||||
|
[ -f "$DATA/$IST_FILE" ] && rm -f "$DATA/$IST_FILE" || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]; then
|
if [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]; then
|
||||||
if [ -n "$BACKUP_PID" ]; then
|
if [ -n "$BACKUP_PID" ]; then
|
||||||
if ps -p $BACKUP_PID >/dev/null 2>&1; then
|
if ps -p $BACKUP_PID >/dev/null 2>&1; then
|
||||||
wsrep_log_error \
|
wsrep_log_error \
|
||||||
"mariadb-backup process is still running. Killing..."
|
"SST streaming process is still running. Killing..."
|
||||||
cleanup_pid $CHECK_PID
|
cleanup_pid $BACKUP_PID
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
wsrep_log_info "Removing the sst_in_progress file"
|
wsrep_log_info "Removing the sst_in_progress file"
|
||||||
wsrep_cleanup_progress_file
|
wsrep_cleanup_progress_file
|
||||||
else
|
|
||||||
[ -f "$DATA/$IST_FILE" ] && rm -f "$DATA/$IST_FILE" || :
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$progress" -a -p "$progress" ]; then
|
if [ -n "$progress" -a -p "$progress" ]; then
|
||||||
@@ -1340,6 +1354,7 @@ else # joiner
|
|||||||
[ -f "$DATA/xtrabackup_checkpoints" ] && rm -f "$DATA/xtrabackup_checkpoints"
|
[ -f "$DATA/xtrabackup_checkpoints" ] && rm -f "$DATA/xtrabackup_checkpoints"
|
||||||
[ -f "$DATA/xtrabackup_info" ] && rm -f "$DATA/xtrabackup_info"
|
[ -f "$DATA/xtrabackup_info" ] && rm -f "$DATA/xtrabackup_info"
|
||||||
[ -f "$DATA/xtrabackup_slave_info" ] && rm -f "$DATA/xtrabackup_slave_info"
|
[ -f "$DATA/xtrabackup_slave_info" ] && rm -f "$DATA/xtrabackup_slave_info"
|
||||||
|
[ -f "$DATA/xtrabackup_binlog_info" ] && rm -f "$DATA/xtrabackup_binlog_info"
|
||||||
[ -f "$DATA/xtrabackup_binlog_pos_innodb" ] && rm -f "$DATA/xtrabackup_binlog_pos_innodb"
|
[ -f "$DATA/xtrabackup_binlog_pos_innodb" ] && rm -f "$DATA/xtrabackup_binlog_pos_innodb"
|
||||||
|
|
||||||
TDATA="$DATA"
|
TDATA="$DATA"
|
||||||
|
@@ -4678,6 +4678,12 @@ void handler::print_error(int error, myf errflag)
|
|||||||
case HA_ERR_PARTITION_LIST:
|
case HA_ERR_PARTITION_LIST:
|
||||||
my_error(ER_VERS_NOT_ALLOWED, errflag, table->s->db.str, table->s->table_name.str);
|
my_error(ER_VERS_NOT_ALLOWED, errflag, table->s->db.str, table->s->table_name.str);
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
|
case HA_ERR_ROLLBACK:
|
||||||
|
/* Crash if we run with --debug-assert-on-error */
|
||||||
|
DBUG_ASSERT(!debug_assert_if_crashed_table);
|
||||||
|
SET_FATAL_ERROR;
|
||||||
|
textno= ER_ROLLBACK_ONLY;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
/* The error was "unknown" to this function.
|
/* The error was "unknown" to this function.
|
||||||
|
@@ -1454,7 +1454,7 @@ bool LOGGER::slow_log_print(THD *thd, const char *query, size_t query_length,
|
|||||||
user_host_buff);
|
user_host_buff);
|
||||||
|
|
||||||
DBUG_ASSERT(thd->start_utime);
|
DBUG_ASSERT(thd->start_utime);
|
||||||
DBUG_ASSERT(thd->start_time);
|
DBUG_ASSERT(thd->start_time || thd->start_time_sec_part);
|
||||||
query_utime= (current_utime - thd->start_utime);
|
query_utime= (current_utime - thd->start_utime);
|
||||||
lock_utime= (thd->utime_after_lock - thd->start_utime);
|
lock_utime= (thd->utime_after_lock - thd->start_utime);
|
||||||
my_hrtime_t current_time= { hrtime_from_time(thd->start_time) +
|
my_hrtime_t current_time= { hrtime_from_time(thd->start_time) +
|
||||||
|
@@ -3212,7 +3212,6 @@ pthread_handler_t signal_hand(void *)
|
|||||||
sigset_t set;
|
sigset_t set;
|
||||||
int sig;
|
int sig;
|
||||||
my_thread_init(); // Init new thread
|
my_thread_init(); // Init new thread
|
||||||
DBUG_ENTER("signal_hand");
|
|
||||||
signal_thread_in_use= 1;
|
signal_thread_in_use= 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -3278,7 +3277,6 @@ pthread_handler_t signal_hand(void *)
|
|||||||
/* switch to the old log message processing */
|
/* switch to the old log message processing */
|
||||||
logger.set_handlers(global_system_variables.sql_log_slow ? LOG_FILE:LOG_NONE,
|
logger.set_handlers(global_system_variables.sql_log_slow ? LOG_FILE:LOG_NONE,
|
||||||
opt_log ? LOG_FILE:LOG_NONE);
|
opt_log ? LOG_FILE:LOG_NONE);
|
||||||
DBUG_PRINT("info",("Got signal: %d abort_loop: %d",sig,abort_loop));
|
|
||||||
|
|
||||||
break_connect_loop();
|
break_connect_loop();
|
||||||
DBUG_ASSERT(abort_loop);
|
DBUG_ASSERT(abort_loop);
|
||||||
@@ -3314,12 +3312,9 @@ pthread_handler_t signal_hand(void *)
|
|||||||
break; /* purecov: tested */
|
break; /* purecov: tested */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DBUG_PRINT("quit", ("signal_handler: calling my_thread_end()"));
|
|
||||||
my_thread_end();
|
my_thread_end();
|
||||||
DBUG_LEAVE; // Must match DBUG_ENTER()
|
|
||||||
signal_thread_in_use= 0;
|
signal_thread_in_use= 0;
|
||||||
pthread_exit(0); // Safety
|
return nullptr;
|
||||||
return(0); /* purecov: deadcode */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void check_data_home(const char *path)
|
static void check_data_home(const char *path)
|
||||||
|
@@ -76,12 +76,32 @@ static inline void output_core_info()
|
|||||||
if ((fd= open("/proc/self/limits", O_RDONLY)) >= 0)
|
if ((fd= open("/proc/self/limits", O_RDONLY)) >= 0)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
my_safe_printf_stderr("Resource Limits:\n");
|
char *endline= buff;
|
||||||
while ((len= read(fd, (uchar*)buff, sizeof(buff))) > 0)
|
ssize_t remain_len= len= read(fd, buff, sizeof(buff));
|
||||||
{
|
|
||||||
my_write_stderr(buff, len);
|
|
||||||
}
|
|
||||||
close(fd);
|
close(fd);
|
||||||
|
my_safe_printf_stderr("Resource Limits (excludes unlimited resources):\n");
|
||||||
|
/* first line, header */
|
||||||
|
endline= (char *) memchr(buff, '\n', remain_len);
|
||||||
|
if (endline)
|
||||||
|
{
|
||||||
|
endline++;
|
||||||
|
remain_len= buff + len - endline;
|
||||||
|
my_safe_printf_stderr("%.*s", (int) (endline - buff), buff);
|
||||||
|
|
||||||
|
while (remain_len > 27)
|
||||||
|
{
|
||||||
|
char *newendline= (char *) memchr(endline, '\n', remain_len);
|
||||||
|
if (!newendline)
|
||||||
|
break;
|
||||||
|
*newendline= '\0';
|
||||||
|
newendline++;
|
||||||
|
if (endline[26] != 'u') /* skip unlimited limits */
|
||||||
|
my_safe_printf_stderr("%s\n", endline);
|
||||||
|
|
||||||
|
remain_len-= newendline - endline;
|
||||||
|
endline= newendline;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
if ((fd= open("/proc/sys/kernel/core_pattern", O_RDONLY)) >= 0)
|
if ((fd= open("/proc/sys/kernel/core_pattern", O_RDONLY)) >= 0)
|
||||||
@@ -144,7 +164,6 @@ extern "C" sig_handler handle_fatal_signal(int sig)
|
|||||||
We will try and print the query at the end of the signal handler, in case
|
We will try and print the query at the end of the signal handler, in case
|
||||||
we're wrong.
|
we're wrong.
|
||||||
*/
|
*/
|
||||||
bool print_invalid_query_pointer= false;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (segfaulted)
|
if (segfaulted)
|
||||||
@@ -174,58 +193,20 @@ extern "C" sig_handler handle_fatal_signal(int sig)
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
my_safe_printf_stderr("[ERROR] mysqld got " SIGNAL_FMT " ;\n",sig);
|
my_safe_printf_stderr("[ERROR] %s got " SIGNAL_FMT " ;\n", my_progname, sig);
|
||||||
|
|
||||||
my_safe_printf_stderr("%s",
|
my_safe_printf_stderr("%s",
|
||||||
"Sorry, we probably made a mistake, and this is a bug.\n\n"
|
"Sorry, we probably made a mistake, and this is a bug.\n\n"
|
||||||
"Your assistance in bug reporting will enable us to fix this for the next release.\n"
|
"Your assistance in bug reporting will enable us to fix this for the next release.\n"
|
||||||
"To report this bug, see https://mariadb.com/kb/en/reporting-bugs\n\n");
|
"To report this bug, see https://mariadb.com/kb/en/reporting-bugs about how to report\n"
|
||||||
|
"a bug on https://jira.mariadb.org/.\n\n"
|
||||||
my_safe_printf_stderr("%s",
|
"Please include the information from the server start above, to the end of the\n"
|
||||||
"We will try our best to scrape up some info that will hopefully help\n"
|
"information below.\n\n");
|
||||||
"diagnose the problem, but since we have already crashed, \n"
|
|
||||||
"something is definitely wrong and this may fail.\n\n");
|
|
||||||
|
|
||||||
set_server_version(server_version, sizeof(server_version));
|
set_server_version(server_version, sizeof(server_version));
|
||||||
my_safe_printf_stderr("Server version: %s source revision: %s\n",
|
my_safe_printf_stderr("Server version: %s source revision: %s\n\n",
|
||||||
server_version, SOURCE_REVISION);
|
server_version, SOURCE_REVISION);
|
||||||
|
|
||||||
if (dflt_key_cache)
|
|
||||||
my_safe_printf_stderr("key_buffer_size=%zu\n",
|
|
||||||
dflt_key_cache->key_cache_mem_size);
|
|
||||||
|
|
||||||
my_safe_printf_stderr("read_buffer_size=%lu\n",
|
|
||||||
global_system_variables.read_buff_size);
|
|
||||||
|
|
||||||
my_safe_printf_stderr("max_used_connections=%lu\n",
|
|
||||||
max_used_connections);
|
|
||||||
|
|
||||||
if (thread_scheduler)
|
|
||||||
my_safe_printf_stderr("max_threads=%lu\n",
|
|
||||||
thread_scheduler->max_threads +
|
|
||||||
extra_max_connections);
|
|
||||||
|
|
||||||
my_safe_printf_stderr("thread_count=%u\n", THD_count::value());
|
|
||||||
|
|
||||||
if (dflt_key_cache && thread_scheduler)
|
|
||||||
{
|
|
||||||
size_t used_mem=
|
|
||||||
(dflt_key_cache->key_cache_mem_size +
|
|
||||||
(global_system_variables.read_buff_size +
|
|
||||||
(size_t) global_system_variables.sortbuff_size) *
|
|
||||||
(thread_scheduler->max_threads + extra_max_connections) +
|
|
||||||
(max_connections + extra_max_connections) * sizeof(THD)) / 1024;
|
|
||||||
|
|
||||||
my_safe_printf_stderr("It is possible that mysqld could use up to \n"
|
|
||||||
"key_buffer_size + "
|
|
||||||
"(read_buffer_size + sort_buffer_size)*max_threads = "
|
|
||||||
"%zu K bytes of memory\n", used_mem);
|
|
||||||
|
|
||||||
my_safe_printf_stderr("%s",
|
|
||||||
"Hope that's ok; if not, decrease some variables in "
|
|
||||||
"the equation.\n\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef WITH_WSREP
|
#ifdef WITH_WSREP
|
||||||
Wsrep_server_state::handle_fatal_signal();
|
Wsrep_server_state::handle_fatal_signal();
|
||||||
#endif /* WITH_WSREP */
|
#endif /* WITH_WSREP */
|
||||||
@@ -235,12 +216,14 @@ extern "C" sig_handler handle_fatal_signal(int sig)
|
|||||||
|
|
||||||
if (opt_stack_trace)
|
if (opt_stack_trace)
|
||||||
{
|
{
|
||||||
my_safe_printf_stderr("Thread pointer: %p\n", thd);
|
|
||||||
my_safe_printf_stderr("%s",
|
my_safe_printf_stderr("%s",
|
||||||
"Attempting backtrace. You can use the following "
|
"The information page at "
|
||||||
"information to find out\n"
|
"https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mariadbd/\n"
|
||||||
"where mysqld died. If you see no messages after this, something went\n"
|
"contains instructions to obtain a better version of the backtrace below.\n"
|
||||||
"terribly wrong...\n");
|
"Following these instructions will help MariaDB developers provide a fix quicker.\n\n"
|
||||||
|
"Attempting backtrace. Include this in the bug report.\n"
|
||||||
|
"(note: Retrieving this information may fail)\n\n");
|
||||||
|
my_safe_printf_stderr("Thread pointer: %p\n", thd);
|
||||||
my_print_stacktrace(thd ? (uchar*) thd->thread_stack : NULL,
|
my_print_stacktrace(thd ? (uchar*) thd->thread_stack : NULL,
|
||||||
(ulong)my_thread_stack_size, 0);
|
(ulong)my_thread_stack_size, 0);
|
||||||
}
|
}
|
||||||
@@ -288,20 +271,12 @@ extern "C" sig_handler handle_fatal_signal(int sig)
|
|||||||
kreason= "KILL_WAIT_TIMEOUT";
|
kreason= "KILL_WAIT_TIMEOUT";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
my_safe_printf_stderr("%s", "\n"
|
|
||||||
"Trying to get some variables.\n"
|
|
||||||
"Some pointers may be invalid and cause the dump to abort.\n");
|
|
||||||
|
|
||||||
my_safe_printf_stderr("Query (%p): ", thd->query());
|
|
||||||
if (my_safe_print_str(thd->query(), MY_MIN(65536U, thd->query_length())))
|
|
||||||
{
|
|
||||||
// Query was found invalid. We will try to print it at the end.
|
|
||||||
print_invalid_query_pointer= true;
|
|
||||||
}
|
|
||||||
|
|
||||||
my_safe_printf_stderr("\nConnection ID (thread ID): %lu\n",
|
my_safe_printf_stderr("\nConnection ID (thread ID): %lu\n",
|
||||||
(ulong) thd->thread_id);
|
(ulong) thd->thread_id);
|
||||||
my_safe_printf_stderr("Status: %s\n\n", kreason);
|
my_safe_printf_stderr("Status: %s\n", kreason);
|
||||||
|
my_safe_printf_stderr("Query (%p): ", thd->query());
|
||||||
|
my_safe_print_str(thd->query(), MY_MIN(65536U, thd->query_length()));
|
||||||
my_safe_printf_stderr("%s", "Optimizer switch: ");
|
my_safe_printf_stderr("%s", "Optimizer switch: ");
|
||||||
ulonglong optsw= thd->variables.optimizer_switch;
|
ulonglong optsw= thd->variables.optimizer_switch;
|
||||||
for (uint i= 0; optimizer_switch_names[i+1]; i++, optsw >>= 1)
|
for (uint i= 0; optimizer_switch_names[i+1]; i++, optsw >>= 1)
|
||||||
@@ -313,52 +288,9 @@ extern "C" sig_handler handle_fatal_signal(int sig)
|
|||||||
}
|
}
|
||||||
my_safe_printf_stderr("%s", "\n\n");
|
my_safe_printf_stderr("%s", "\n\n");
|
||||||
}
|
}
|
||||||
my_safe_printf_stderr("%s",
|
|
||||||
"The manual page at "
|
|
||||||
"https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mariadbd/ contains\n"
|
|
||||||
"information that should help you find out what is causing the crash.\n");
|
|
||||||
|
|
||||||
#endif /* HAVE_STACKTRACE */
|
#endif /* HAVE_STACKTRACE */
|
||||||
|
|
||||||
#ifdef HAVE_INITGROUPS
|
|
||||||
if (calling_initgroups)
|
|
||||||
{
|
|
||||||
my_safe_printf_stderr("%s", "\n"
|
|
||||||
"This crash occurred while the server was calling initgroups(). This is\n"
|
|
||||||
"often due to the use of a mysqld that is statically linked against \n"
|
|
||||||
"glibc and configured to use LDAP in /etc/nsswitch.conf.\n"
|
|
||||||
"You will need to either upgrade to a version of glibc that does not\n"
|
|
||||||
"have this problem (2.3.4 or later when used with nscd),\n"
|
|
||||||
"disable LDAP in your nsswitch.conf, or use a "
|
|
||||||
"mysqld that is not statically linked.\n");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (locked_in_memory)
|
|
||||||
{
|
|
||||||
my_safe_printf_stderr("%s", "\n"
|
|
||||||
"The \"--memlock\" argument, which was enabled, "
|
|
||||||
"uses system calls that are\n"
|
|
||||||
"unreliable and unstable on some operating systems and "
|
|
||||||
"operating-system versions (notably, some versions of Linux).\n"
|
|
||||||
"This crash could be due to use of those buggy OS calls.\n"
|
|
||||||
"You should consider whether you really need the "
|
|
||||||
"\"--memlock\" parameter and/or consult the OS distributer about "
|
|
||||||
"\"mlockall\" bugs.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_STACKTRACE
|
|
||||||
if (print_invalid_query_pointer)
|
|
||||||
{
|
|
||||||
my_safe_printf_stderr(
|
|
||||||
"\nWe think the query pointer is invalid, but we will try "
|
|
||||||
"to print it anyway. \n"
|
|
||||||
"Query: ");
|
|
||||||
my_write_stderr(thd->query(), MY_MIN(65536U, thd->query_length()));
|
|
||||||
my_safe_printf_stderr("\n\n");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
output_core_info();
|
output_core_info();
|
||||||
#ifdef HAVE_WRITE_CORE
|
#ifdef HAVE_WRITE_CORE
|
||||||
if (test_flags & TEST_CORE_ON_SIGNAL)
|
if (test_flags & TEST_CORE_ON_SIGNAL)
|
||||||
|
@@ -7227,6 +7227,7 @@ alter:
|
|||||||
{
|
{
|
||||||
LEX *lex= Lex;
|
LEX *lex= Lex;
|
||||||
lex->sql_command= SQLCOM_ALTER_SEQUENCE;
|
lex->sql_command= SQLCOM_ALTER_SEQUENCE;
|
||||||
|
lex->create_info.init();
|
||||||
DBUG_ASSERT(!lex->m_sql_cmd);
|
DBUG_ASSERT(!lex->m_sql_cmd);
|
||||||
if (Lex->main_select_push())
|
if (Lex->main_select_push())
|
||||||
MYSQL_YYABORT;
|
MYSQL_YYABORT;
|
||||||
|
@@ -10102,7 +10102,14 @@ bool TABLE_LIST::is_the_same_definition(THD* thd, TABLE_SHARE *s)
|
|||||||
tabledef_version.length= 0;
|
tabledef_version.length= 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
set_tabledef_version(s);
|
set_tabledef_version(s);
|
||||||
|
if (m_table_ref_type == TABLE_REF_NULL)
|
||||||
|
{
|
||||||
|
set_table_ref_id(s);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1737,7 +1737,7 @@ struct find_interesting_trx
|
|||||||
{
|
{
|
||||||
void operator()(const trx_t &trx)
|
void operator()(const trx_t &trx)
|
||||||
{
|
{
|
||||||
if (trx.state == TRX_STATE_NOT_STARTED)
|
if (!trx.is_started())
|
||||||
return;
|
return;
|
||||||
if (trx.mysql_thd == nullptr)
|
if (trx.mysql_thd == nullptr)
|
||||||
return;
|
return;
|
||||||
@@ -1746,12 +1746,12 @@ struct find_interesting_trx
|
|||||||
|
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
ib::warn() << "The following trx might hold "
|
sql_print_warning("InnoDB: The following trx might hold "
|
||||||
"the blocks in buffer pool to "
|
"the blocks in buffer pool to "
|
||||||
"be withdrawn. Buffer pool "
|
"be withdrawn. Buffer pool "
|
||||||
"resizing can complete only "
|
"resizing can complete only "
|
||||||
"after all the transactions "
|
"after all the transactions "
|
||||||
"below release the blocks.";
|
"below release the blocks.");
|
||||||
found= true;
|
found= true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3620,6 +3620,8 @@ retry:
|
|||||||
ut_ad(!bpage->is_io_fixed(state));
|
ut_ad(!bpage->is_io_fixed(state));
|
||||||
ut_ad(bpage->buf_fix_count(state));
|
ut_ad(bpage->buf_fix_count(state));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
state= bpage->state();
|
||||||
|
|
||||||
ut_ad(state >= buf_page_t::FREED);
|
ut_ad(state >= buf_page_t::FREED);
|
||||||
ut_ad(state < buf_page_t::READ_FIX);
|
ut_ad(state < buf_page_t::READ_FIX);
|
||||||
@@ -3941,8 +3943,7 @@ static dberr_t buf_page_check_corrupt(buf_page_t *bpage,
|
|||||||
const bool seems_encrypted = !node.space->full_crc32() && key_version
|
const bool seems_encrypted = !node.space->full_crc32() && key_version
|
||||||
&& node.space->crypt_data
|
&& node.space->crypt_data
|
||||||
&& node.space->crypt_data->type != CRYPT_SCHEME_UNENCRYPTED;
|
&& node.space->crypt_data->type != CRYPT_SCHEME_UNENCRYPTED;
|
||||||
ut_ad(node.space->purpose != FIL_TYPE_TEMPORARY ||
|
ut_ad(!node.space->is_temporary() || node.space->full_crc32());
|
||||||
node.space->full_crc32());
|
|
||||||
|
|
||||||
/* If traditional checksums match, we assume that page is
|
/* If traditional checksums match, we assume that page is
|
||||||
not anymore encrypted. */
|
not anymore encrypted. */
|
||||||
@@ -3950,7 +3951,7 @@ static dberr_t buf_page_check_corrupt(buf_page_t *bpage,
|
|||||||
&& !buf_is_zeroes(span<const byte>(dst_frame,
|
&& !buf_is_zeroes(span<const byte>(dst_frame,
|
||||||
node.space->physical_size()))
|
node.space->physical_size()))
|
||||||
&& (key_version || node.space->is_compressed()
|
&& (key_version || node.space->is_compressed()
|
||||||
|| node.space->purpose == FIL_TYPE_TEMPORARY)) {
|
|| node.space->is_temporary())) {
|
||||||
if (buf_page_full_crc32_is_corrupted(
|
if (buf_page_full_crc32_is_corrupted(
|
||||||
bpage->id().space(), dst_frame,
|
bpage->id().space(), dst_frame,
|
||||||
node.space->is_compressed())) {
|
node.space->is_compressed())) {
|
||||||
|
@@ -745,7 +745,8 @@ void buf_dblwr_t::add_to_batch(const IORequest &request, size_t size)
|
|||||||
ut_ad(request.bpage);
|
ut_ad(request.bpage);
|
||||||
ut_ad(request.bpage->in_file());
|
ut_ad(request.bpage->in_file());
|
||||||
ut_ad(request.node);
|
ut_ad(request.node);
|
||||||
ut_ad(request.node->space->purpose == FIL_TYPE_TABLESPACE);
|
ut_ad(!request.node->space->is_temporary());
|
||||||
|
ut_ad(!request.node->space->is_being_imported());
|
||||||
ut_ad(request.node->space->id == request.bpage->id().space());
|
ut_ad(request.node->space->id == request.bpage->id().space());
|
||||||
ut_ad(request.node->space->referenced());
|
ut_ad(request.node->space->referenced());
|
||||||
ut_ad(!srv_read_only_mode);
|
ut_ad(!srv_read_only_mode);
|
||||||
|
@@ -601,7 +601,7 @@ static byte *buf_page_encrypt(fil_space_t* space, buf_page_t* bpage, byte* s,
|
|||||||
|
|
||||||
fil_space_crypt_t *crypt_data= space->crypt_data;
|
fil_space_crypt_t *crypt_data= space->crypt_data;
|
||||||
bool encrypted, page_compressed;
|
bool encrypted, page_compressed;
|
||||||
if (space->purpose == FIL_TYPE_TEMPORARY)
|
if (space->is_temporary())
|
||||||
{
|
{
|
||||||
ut_ad(!crypt_data);
|
ut_ad(!crypt_data);
|
||||||
encrypted= innodb_encrypt_temporary_tables;
|
encrypted= innodb_encrypt_temporary_tables;
|
||||||
@@ -647,13 +647,13 @@ static byte *buf_page_encrypt(fil_space_t* space, buf_page_t* bpage, byte* s,
|
|||||||
if (!page_compressed)
|
if (!page_compressed)
|
||||||
{
|
{
|
||||||
not_compressed:
|
not_compressed:
|
||||||
d= space->purpose == FIL_TYPE_TEMPORARY
|
d= space->is_temporary()
|
||||||
? buf_tmp_page_encrypt(page_no, s, d)
|
? buf_tmp_page_encrypt(page_no, s, d)
|
||||||
: fil_space_encrypt(space, page_no, s, d);
|
: fil_space_encrypt(space, page_no, s, d);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ut_ad(space->purpose != FIL_TYPE_TEMPORARY);
|
ut_ad(!space->is_temporary());
|
||||||
/* First we compress the page content */
|
/* First we compress the page content */
|
||||||
buf_tmp_reserve_compression_buf(*slot);
|
buf_tmp_reserve_compression_buf(*slot);
|
||||||
byte *tmp= (*slot)->comp_buf;
|
byte *tmp= (*slot)->comp_buf;
|
||||||
@@ -730,8 +730,7 @@ bool buf_page_t::flush(fil_space_t *space)
|
|||||||
mysql_mutex_assert_not_owner(&buf_pool.flush_list_mutex);
|
mysql_mutex_assert_not_owner(&buf_pool.flush_list_mutex);
|
||||||
ut_ad(in_file());
|
ut_ad(in_file());
|
||||||
ut_ad(in_LRU_list);
|
ut_ad(in_LRU_list);
|
||||||
ut_ad((space->purpose == FIL_TYPE_TEMPORARY) ==
|
ut_ad((space->is_temporary()) == (space == fil_system.temp_space));
|
||||||
(space == fil_system.temp_space));
|
|
||||||
ut_ad(space->referenced());
|
ut_ad(space->referenced());
|
||||||
|
|
||||||
const auto s= state();
|
const auto s= state();
|
||||||
@@ -741,12 +740,12 @@ bool buf_page_t::flush(fil_space_t *space)
|
|||||||
(FIL_PAGE_LSN + (zip.data ? zip.data : frame)));
|
(FIL_PAGE_LSN + (zip.data ? zip.data : frame)));
|
||||||
ut_ad(lsn
|
ut_ad(lsn
|
||||||
? lsn >= oldest_modification() || oldest_modification() == 2
|
? lsn >= oldest_modification() || oldest_modification() == 2
|
||||||
: space->purpose != FIL_TYPE_TABLESPACE);
|
: (space->is_temporary() || space->is_being_imported()));
|
||||||
|
|
||||||
if (s < UNFIXED)
|
if (s < UNFIXED)
|
||||||
{
|
{
|
||||||
ut_a(s >= FREED);
|
ut_a(s >= FREED);
|
||||||
if (UNIV_LIKELY(space->purpose == FIL_TYPE_TABLESPACE))
|
if (!space->is_temporary() && !space->is_being_imported())
|
||||||
{
|
{
|
||||||
freed:
|
freed:
|
||||||
if (lsn > log_sys.get_flushed_lsn())
|
if (lsn > log_sys.get_flushed_lsn())
|
||||||
@@ -762,7 +761,8 @@ bool buf_page_t::flush(fil_space_t *space)
|
|||||||
|
|
||||||
if (UNIV_UNLIKELY(lsn < space->get_create_lsn()))
|
if (UNIV_UNLIKELY(lsn < space->get_create_lsn()))
|
||||||
{
|
{
|
||||||
ut_ad(space->purpose == FIL_TYPE_TABLESPACE);
|
ut_ad(!space->is_temporary());
|
||||||
|
ut_ad(!space->is_being_imported());
|
||||||
goto freed;
|
goto freed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -846,7 +846,7 @@ bool buf_page_t::flush(fil_space_t *space)
|
|||||||
|
|
||||||
if ((s & LRU_MASK) == REINIT || !space->use_doublewrite())
|
if ((s & LRU_MASK) == REINIT || !space->use_doublewrite())
|
||||||
{
|
{
|
||||||
if (UNIV_LIKELY(space->purpose == FIL_TYPE_TABLESPACE) &&
|
if (!space->is_temporary() && !space->is_being_imported() &&
|
||||||
lsn > log_sys.get_flushed_lsn())
|
lsn > log_sys.get_flushed_lsn())
|
||||||
log_write_up_to(lsn, true);
|
log_write_up_to(lsn, true);
|
||||||
space->io(IORequest{type, this, slot}, physical_offset(), size,
|
space->io(IORequest{type, this, slot}, physical_offset(), size,
|
||||||
@@ -1697,7 +1697,7 @@ done:
|
|||||||
if (acquired)
|
if (acquired)
|
||||||
space->release();
|
space->release();
|
||||||
|
|
||||||
if (space->purpose == FIL_TYPE_IMPORT)
|
if (space->is_being_imported())
|
||||||
os_aio_wait_until_no_pending_writes(true);
|
os_aio_wait_until_no_pending_writes(true);
|
||||||
else
|
else
|
||||||
buf_dblwr.flush_buffered_writes();
|
buf_dblwr.flush_buffered_writes();
|
||||||
|
@@ -970,8 +970,10 @@ void dict_check_tablespaces_and_store_max_id(const std::set<uint32_t> *spaces)
|
|||||||
const bool not_dropped{!rec_get_deleted_flag(rec, 0)};
|
const bool not_dropped{!rec_get_deleted_flag(rec, 0)};
|
||||||
|
|
||||||
/* Check that the .ibd file exists. */
|
/* Check that the .ibd file exists. */
|
||||||
if (fil_ibd_open(not_dropped, FIL_TYPE_TABLESPACE,
|
if (fil_ibd_open(space_id, dict_tf_to_fsp_flags(flags),
|
||||||
space_id, dict_tf_to_fsp_flags(flags),
|
not_dropped
|
||||||
|
? fil_space_t::VALIDATE_NOTHING
|
||||||
|
: fil_space_t::MAYBE_MISSING,
|
||||||
name, filepath)) {
|
name, filepath)) {
|
||||||
} else if (!not_dropped) {
|
} else if (!not_dropped) {
|
||||||
} else if (srv_operation == SRV_OPERATION_NORMAL
|
} else if (srv_operation == SRV_OPERATION_NORMAL
|
||||||
@@ -2289,8 +2291,8 @@ dict_load_tablespace(
|
|||||||
}
|
}
|
||||||
|
|
||||||
table->space = fil_ibd_open(
|
table->space = fil_ibd_open(
|
||||||
2, FIL_TYPE_TABLESPACE, table->space_id,
|
table->space_id, dict_tf_to_fsp_flags(table->flags),
|
||||||
dict_tf_to_fsp_flags(table->flags),
|
fil_space_t::VALIDATE_SPACE_ID,
|
||||||
{table->name.m_name, strlen(table->name.m_name)}, filepath);
|
{table->name.m_name, strlen(table->name.m_name)}, filepath);
|
||||||
|
|
||||||
if (!table->space) {
|
if (!table->space) {
|
||||||
|
@@ -136,9 +136,6 @@ dict_table_t *dict_table_t::create(const span<const char> &name,
|
|||||||
ulint n_cols, ulint n_v_cols, ulint flags,
|
ulint n_cols, ulint n_v_cols, ulint flags,
|
||||||
ulint flags2)
|
ulint flags2)
|
||||||
{
|
{
|
||||||
ut_ad(!space || space->purpose == FIL_TYPE_TABLESPACE ||
|
|
||||||
space->purpose == FIL_TYPE_TEMPORARY ||
|
|
||||||
space->purpose == FIL_TYPE_IMPORT);
|
|
||||||
ut_a(dict_tf2_is_valid(flags, flags2));
|
ut_a(dict_tf2_is_valid(flags, flags2));
|
||||||
ut_a(!(flags2 & DICT_TF2_UNUSED_BIT_MASK));
|
ut_a(!(flags2 & DICT_TF2_UNUSED_BIT_MASK));
|
||||||
|
|
||||||
|
@@ -1068,7 +1068,8 @@ default_encrypt_list only when
|
|||||||
default encrypt */
|
default encrypt */
|
||||||
static bool fil_crypt_must_remove(const fil_space_t &space)
|
static bool fil_crypt_must_remove(const fil_space_t &space)
|
||||||
{
|
{
|
||||||
ut_ad(space.purpose == FIL_TYPE_TABLESPACE);
|
ut_ad(!space.is_temporary());
|
||||||
|
ut_ad(!space.is_being_imported());
|
||||||
fil_space_crypt_t *crypt_data = space.crypt_data;
|
fil_space_crypt_t *crypt_data = space.crypt_data;
|
||||||
mysql_mutex_assert_owner(&fil_system.mutex);
|
mysql_mutex_assert_owner(&fil_system.mutex);
|
||||||
const ulong encrypt_tables= srv_encrypt_tables;
|
const ulong encrypt_tables= srv_encrypt_tables;
|
||||||
@@ -1104,7 +1105,8 @@ fil_crypt_space_needs_rotation(
|
|||||||
fil_space_t* space = &*state->space;
|
fil_space_t* space = &*state->space;
|
||||||
|
|
||||||
ut_ad(space->referenced());
|
ut_ad(space->referenced());
|
||||||
ut_ad(space->purpose == FIL_TYPE_TABLESPACE);
|
ut_ad(!space->is_temporary());
|
||||||
|
ut_ad(!space->is_being_imported());
|
||||||
|
|
||||||
fil_space_crypt_t *crypt_data = space->crypt_data;
|
fil_space_crypt_t *crypt_data = space->crypt_data;
|
||||||
|
|
||||||
@@ -1456,7 +1458,7 @@ space_list_t::iterator fil_space_t::next(space_list_t::iterator space,
|
|||||||
|
|
||||||
for (; space != fil_system.space_list.end(); ++space)
|
for (; space != fil_system.space_list.end(); ++space)
|
||||||
{
|
{
|
||||||
if (space->purpose != FIL_TYPE_TABLESPACE)
|
if (space->is_temporary() || space->is_being_imported())
|
||||||
continue;
|
continue;
|
||||||
const uint32_t n= space->acquire_low();
|
const uint32_t n= space->acquire_low();
|
||||||
if (UNIV_LIKELY(!(n & (STOPPING | CLOSING))))
|
if (UNIV_LIKELY(!(n & (STOPPING | CLOSING))))
|
||||||
@@ -2138,9 +2140,9 @@ static void fil_crypt_default_encrypt_tables_fill()
|
|||||||
mysql_mutex_assert_owner(&fil_system.mutex);
|
mysql_mutex_assert_owner(&fil_system.mutex);
|
||||||
|
|
||||||
for (fil_space_t& space : fil_system.space_list) {
|
for (fil_space_t& space : fil_system.space_list) {
|
||||||
if (space.purpose != FIL_TYPE_TABLESPACE
|
if (space.is_in_default_encrypt
|
||||||
|| space.is_in_default_encrypt
|
|
||||||
|| UT_LIST_GET_LEN(space.chain) == 0
|
|| UT_LIST_GET_LEN(space.chain) == 0
|
||||||
|
|| space.is_temporary() || space.is_being_imported()
|
||||||
|| !space.acquire_if_not_stopped()) {
|
|| !space.acquire_if_not_stopped()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@@ -78,17 +78,11 @@ bool fil_space_t::try_to_close(fil_space_t *ignore_space, bool print_info)
|
|||||||
mysql_mutex_assert_owner(&fil_system.mutex);
|
mysql_mutex_assert_owner(&fil_system.mutex);
|
||||||
for (fil_space_t &space : fil_system.space_list)
|
for (fil_space_t &space : fil_system.space_list)
|
||||||
{
|
{
|
||||||
if (&space == ignore_space)
|
if (&space == ignore_space || space.is_being_imported() ||
|
||||||
|
space.id == TRX_SYS_SPACE || space.id == SRV_TMP_SPACE_ID ||
|
||||||
|
srv_is_undo_tablespace(space.id))
|
||||||
continue;
|
continue;
|
||||||
switch (space.purpose) {
|
ut_ad(!space.is_temporary());
|
||||||
case FIL_TYPE_TEMPORARY:
|
|
||||||
continue;
|
|
||||||
case FIL_TYPE_IMPORT:
|
|
||||||
break;
|
|
||||||
case FIL_TYPE_TABLESPACE:
|
|
||||||
if (space.id == TRX_SYS_SPACE || srv_is_undo_tablespace(space.id))
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We are using an approximation of LRU replacement policy. In
|
/* We are using an approximation of LRU replacement policy. In
|
||||||
fil_node_open_file_low(), newly opened files are moved to the end
|
fil_node_open_file_low(), newly opened files are moved to the end
|
||||||
@@ -435,7 +429,7 @@ static bool fil_node_open_file(fil_node_t *node, const byte *page, bool no_lsn)
|
|||||||
srv_operation == SRV_OPERATION_BACKUP ||
|
srv_operation == SRV_OPERATION_BACKUP ||
|
||||||
srv_operation == SRV_OPERATION_RESTORE ||
|
srv_operation == SRV_OPERATION_RESTORE ||
|
||||||
srv_operation == SRV_OPERATION_RESTORE_DELTA);
|
srv_operation == SRV_OPERATION_RESTORE_DELTA);
|
||||||
ut_ad(node->space->purpose != FIL_TYPE_TEMPORARY);
|
ut_ad(!node->space->is_temporary());
|
||||||
ut_ad(node->space->referenced());
|
ut_ad(node->space->referenced());
|
||||||
|
|
||||||
const auto old_time= fil_system.n_open_exceeded_time;
|
const auto old_time= fil_system.n_open_exceeded_time;
|
||||||
@@ -496,7 +490,7 @@ void fil_node_t::prepare_to_close_or_detach()
|
|||||||
srv_operation == SRV_OPERATION_RESTORE_DELTA);
|
srv_operation == SRV_OPERATION_RESTORE_DELTA);
|
||||||
ut_a(is_open());
|
ut_a(is_open());
|
||||||
ut_a(!being_extended);
|
ut_a(!being_extended);
|
||||||
ut_a(space->is_ready_to_close() || space->purpose == FIL_TYPE_TEMPORARY ||
|
ut_a(space->is_ready_to_close() || space->is_temporary() ||
|
||||||
srv_fast_shutdown == 2 || !srv_was_started);
|
srv_fast_shutdown == 2 || !srv_was_started);
|
||||||
|
|
||||||
ut_a(fil_system.n_open > 0);
|
ut_a(fil_system.n_open > 0);
|
||||||
@@ -653,14 +647,13 @@ fil_space_extend_must_retry(
|
|||||||
mysql_mutex_lock(&fil_system.mutex);
|
mysql_mutex_lock(&fil_system.mutex);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ut_ad(space->purpose == FIL_TYPE_TABLESPACE
|
ut_ad(!space->is_temporary());
|
||||||
|| space->purpose == FIL_TYPE_IMPORT);
|
if (!space->is_being_imported()) {
|
||||||
if (space->purpose == FIL_TYPE_TABLESPACE) {
|
|
||||||
goto do_flush;
|
goto do_flush;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SRV_TMP_SPACE_ID:
|
case SRV_TMP_SPACE_ID:
|
||||||
ut_ad(space->purpose == FIL_TYPE_TEMPORARY);
|
ut_ad(space->is_temporary());
|
||||||
srv_tmp_space.set_last_file_size(pages_in_MiB);
|
srv_tmp_space.set_last_file_size(pages_in_MiB);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -674,8 +667,7 @@ ATTRIBUTE_COLD bool fil_space_t::prepare_acquired()
|
|||||||
ut_ad(referenced());
|
ut_ad(referenced());
|
||||||
mysql_mutex_assert_owner(&fil_system.mutex);
|
mysql_mutex_assert_owner(&fil_system.mutex);
|
||||||
fil_node_t *node= UT_LIST_GET_LAST(chain);
|
fil_node_t *node= UT_LIST_GET_LAST(chain);
|
||||||
ut_ad(!id || purpose == FIL_TYPE_TEMPORARY ||
|
ut_ad(!id || is_temporary() || node == UT_LIST_GET_FIRST(chain));
|
||||||
node == UT_LIST_GET_FIRST(chain));
|
|
||||||
|
|
||||||
const bool is_open= node &&
|
const bool is_open= node &&
|
||||||
(node->is_open() || fil_node_open_file(node, nullptr, false));
|
(node->is_open() || fil_node_open_file(node, nullptr, false));
|
||||||
@@ -737,7 +729,7 @@ ATTRIBUTE_COLD bool fil_space_t::acquire_and_prepare()
|
|||||||
@return whether the tablespace is at least as big as requested */
|
@return whether the tablespace is at least as big as requested */
|
||||||
bool fil_space_extend(fil_space_t *space, uint32_t size)
|
bool fil_space_extend(fil_space_t *space, uint32_t size)
|
||||||
{
|
{
|
||||||
ut_ad(!srv_read_only_mode || space->purpose == FIL_TYPE_TEMPORARY);
|
ut_ad(!srv_read_only_mode || space->is_temporary());
|
||||||
bool success= false;
|
bool success= false;
|
||||||
const bool acquired= space->acquire();
|
const bool acquired= space->acquire();
|
||||||
mysql_mutex_lock(&fil_system.mutex);
|
mysql_mutex_lock(&fil_system.mutex);
|
||||||
@@ -944,62 +936,42 @@ bool fil_space_free(uint32_t id, bool x_latched)
|
|||||||
return(space != NULL);
|
return(space != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Create a tablespace in fil_system.
|
fil_space_t::fil_space_t(uint32_t id, uint32_t flags, bool being_imported,
|
||||||
@param name tablespace name
|
fil_space_crypt_t *crypt_data) noexcept :
|
||||||
@param id tablespace identifier
|
id(id), crypt_data(crypt_data), being_imported(being_imported), flags(flags)
|
||||||
@param flags tablespace flags
|
{
|
||||||
@param purpose tablespace purpose
|
UT_LIST_INIT(chain, &fil_node_t::chain);
|
||||||
@param crypt_data encryption information
|
memset((void*) &latch, 0, sizeof latch);
|
||||||
@param mode encryption mode
|
latch.SRW_LOCK_INIT(fil_space_latch_key);
|
||||||
@param opened true if space files are opened
|
}
|
||||||
@return pointer to created tablespace, to be filled in with add()
|
|
||||||
@retval nullptr on failure (such as when the same tablespace exists) */
|
|
||||||
fil_space_t *fil_space_t::create(uint32_t id, uint32_t flags,
|
fil_space_t *fil_space_t::create(uint32_t id, uint32_t flags,
|
||||||
fil_type_t purpose,
|
bool being_imported,
|
||||||
fil_space_crypt_t *crypt_data,
|
fil_space_crypt_t *crypt_data,
|
||||||
fil_encryption_t mode,
|
fil_encryption_t mode,
|
||||||
bool opened)
|
bool opened) noexcept
|
||||||
{
|
{
|
||||||
fil_space_t* space;
|
|
||||||
|
|
||||||
mysql_mutex_assert_owner(&fil_system.mutex);
|
mysql_mutex_assert_owner(&fil_system.mutex);
|
||||||
ut_ad(fil_system.is_initialised());
|
ut_ad(fil_system.is_initialised());
|
||||||
ut_ad(fil_space_t::is_valid_flags(flags & ~FSP_FLAGS_MEM_MASK, id));
|
ut_ad(fil_space_t::is_valid_flags(flags & ~FSP_FLAGS_MEM_MASK, id));
|
||||||
ut_ad(srv_page_size == UNIV_PAGE_SIZE_ORIG || flags != 0);
|
ut_ad(srv_page_size == UNIV_PAGE_SIZE_ORIG || flags != 0);
|
||||||
|
|
||||||
DBUG_EXECUTE_IF("fil_space_create_failure", return(NULL););
|
DBUG_EXECUTE_IF("fil_space_create_failure", return nullptr;);
|
||||||
|
|
||||||
fil_space_t** after = reinterpret_cast<fil_space_t**>(
|
fil_space_t** after= fil_system.spaces.cell_get(id)->search
|
||||||
&fil_system.spaces.cell_get(id)->node);
|
(&fil_space_t::hash, [id](const fil_space_t *space)
|
||||||
for (; *after; after = &(*after)->hash) {
|
{ return !space || space->id == id; });
|
||||||
ut_a((*after)->id != id);
|
ut_a(!*after);
|
||||||
}
|
fil_space_t *space= new (ut_malloc_nokey(sizeof(*space)))
|
||||||
|
fil_space_t(id, flags, being_imported, crypt_data);
|
||||||
|
*after= space;
|
||||||
|
|
||||||
/* FIXME: if calloc() is defined as an inline function that calls
|
if (crypt_data)
|
||||||
memset() or bzero(), then GCC 6 -flifetime-dse can optimize it away */
|
DBUG_PRINT("crypt", ("Tablespace %" PRIu32 " encryption %d key id %" PRIu32
|
||||||
*after = space = new (ut_zalloc_nokey(sizeof(*space))) fil_space_t;
|
":%s %s",
|
||||||
|
id, crypt_data->encryption, crypt_data->key_id,
|
||||||
space->id = id;
|
fil_crypt_get_mode(crypt_data),
|
||||||
|
fil_crypt_get_type(crypt_data)));
|
||||||
UT_LIST_INIT(space->chain, &fil_node_t::chain);
|
|
||||||
|
|
||||||
space->purpose = purpose;
|
|
||||||
space->flags = flags;
|
|
||||||
|
|
||||||
space->crypt_data = crypt_data;
|
|
||||||
space->n_pending.store(CLOSING, std::memory_order_relaxed);
|
|
||||||
|
|
||||||
DBUG_LOG("tablespace", "Created metadata for " << id);
|
|
||||||
if (crypt_data) {
|
|
||||||
DBUG_LOG("crypt",
|
|
||||||
"Tablespace " << id
|
|
||||||
<< " encryption " << crypt_data->encryption
|
|
||||||
<< " key id " << crypt_data->key_id
|
|
||||||
<< ":" << fil_crypt_get_mode(crypt_data)
|
|
||||||
<< " " << fil_crypt_get_type(crypt_data));
|
|
||||||
}
|
|
||||||
|
|
||||||
space->latch.SRW_LOCK_INIT(fil_space_latch_key);
|
|
||||||
|
|
||||||
if (opened)
|
if (opened)
|
||||||
fil_system.add_opened_last_to_space_list(space);
|
fil_system.add_opened_last_to_space_list(space);
|
||||||
@@ -1009,46 +981,40 @@ fil_space_t *fil_space_t::create(uint32_t id, uint32_t flags,
|
|||||||
switch (id) {
|
switch (id) {
|
||||||
case 0:
|
case 0:
|
||||||
ut_ad(!fil_system.sys_space);
|
ut_ad(!fil_system.sys_space);
|
||||||
fil_system.sys_space = space;
|
fil_system.sys_space= space;
|
||||||
break;
|
break;
|
||||||
case SRV_TMP_SPACE_ID:
|
case SRV_TMP_SPACE_ID:
|
||||||
ut_ad(!fil_system.temp_space);
|
ut_ad(!fil_system.temp_space);
|
||||||
fil_system.temp_space = space;
|
fil_system.temp_space= space;
|
||||||
break;
|
return space;
|
||||||
default:
|
default:
|
||||||
ut_ad(purpose != FIL_TYPE_TEMPORARY);
|
if (UNIV_LIKELY(id <= fil_system.max_assigned_id))
|
||||||
if (UNIV_LIKELY(id <= fil_system.max_assigned_id)) {
|
|
||||||
break;
|
break;
|
||||||
}
|
if (UNIV_UNLIKELY(srv_operation == SRV_OPERATION_BACKUP))
|
||||||
if (UNIV_UNLIKELY(srv_operation == SRV_OPERATION_BACKUP)) {
|
|
||||||
break;
|
break;
|
||||||
}
|
if (!fil_system.space_id_reuse_warned)
|
||||||
if (!fil_system.space_id_reuse_warned) {
|
sql_print_warning("InnoDB: Allocated tablespace ID %" PRIu32
|
||||||
ib::warn() << "Allocated tablespace ID " << id
|
", old maximum was %" PRIu32,
|
||||||
<< ", old maximum was "
|
id, fil_system.max_assigned_id);
|
||||||
<< fil_system.max_assigned_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
fil_system.max_assigned_id = id;
|
fil_system.max_assigned_id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool rotate = purpose == FIL_TYPE_TABLESPACE
|
if ((mode == FIL_ENCRYPTION_ON ||
|
||||||
&& (mode == FIL_ENCRYPTION_ON || mode == FIL_ENCRYPTION_OFF
|
(mode == FIL_ENCRYPTION_OFF || srv_encrypt_tables)) &&
|
||||||
|| srv_encrypt_tables)
|
!space->is_being_imported() && fil_crypt_must_default_encrypt())
|
||||||
&& fil_crypt_must_default_encrypt();
|
{
|
||||||
|
|
||||||
if (rotate) {
|
|
||||||
fil_system.default_encrypt_tables.push_back(*space);
|
fil_system.default_encrypt_tables.push_back(*space);
|
||||||
space->is_in_default_encrypt = true;
|
space->is_in_default_encrypt= true;
|
||||||
|
|
||||||
if (srv_n_fil_crypt_threads_started) {
|
if (srv_n_fil_crypt_threads_started)
|
||||||
|
{
|
||||||
mysql_mutex_unlock(&fil_system.mutex);
|
mysql_mutex_unlock(&fil_system.mutex);
|
||||||
fil_crypt_threads_signal();
|
fil_crypt_threads_signal();
|
||||||
mysql_mutex_lock(&fil_system.mutex);
|
mysql_mutex_lock(&fil_system.mutex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return(space);
|
return space;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************//**
|
/*******************************************************************//**
|
||||||
@@ -1531,6 +1497,7 @@ static void fil_name_write(uint32_t space_id, const char *name,
|
|||||||
fil_space_t *fil_space_t::drop(uint32_t id, pfs_os_file_t *detached_handle)
|
fil_space_t *fil_space_t::drop(uint32_t id, pfs_os_file_t *detached_handle)
|
||||||
{
|
{
|
||||||
ut_a(!is_system_tablespace(id));
|
ut_a(!is_system_tablespace(id));
|
||||||
|
ut_ad(id != SRV_TMP_SPACE_ID);
|
||||||
mysql_mutex_lock(&fil_system.mutex);
|
mysql_mutex_lock(&fil_system.mutex);
|
||||||
fil_space_t *space= fil_space_get_by_id(id);
|
fil_space_t *space= fil_space_get_by_id(id);
|
||||||
|
|
||||||
@@ -1573,7 +1540,7 @@ fil_space_t *fil_space_t::drop(uint32_t id, pfs_os_file_t *detached_handle)
|
|||||||
if (space->crypt_data)
|
if (space->crypt_data)
|
||||||
fil_space_crypt_close_tablespace(space);
|
fil_space_crypt_close_tablespace(space);
|
||||||
|
|
||||||
if (space->purpose == FIL_TYPE_TABLESPACE)
|
if (!space->is_being_imported())
|
||||||
{
|
{
|
||||||
if (id >= srv_undo_space_id_start &&
|
if (id >= srv_undo_space_id_start &&
|
||||||
id < srv_undo_space_id_start + srv_undo_tablespaces_open)
|
id < srv_undo_space_id_start + srv_undo_tablespaces_open)
|
||||||
@@ -1593,8 +1560,6 @@ fil_space_t *fil_space_t::drop(uint32_t id, pfs_os_file_t *detached_handle)
|
|||||||
|
|
||||||
os_file_delete(innodb_data_file_key, space->chain.start->name);
|
os_file_delete(innodb_data_file_key, space->chain.start->name);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
ut_ad(space->purpose == FIL_TYPE_IMPORT);
|
|
||||||
|
|
||||||
if (char *cfg_name= fil_make_filepath(space->chain.start->name,
|
if (char *cfg_name= fil_make_filepath(space->chain.start->name,
|
||||||
fil_space_t::name_type{}, CFG, false))
|
fil_space_t::name_type{}, CFG, false))
|
||||||
@@ -1894,7 +1859,7 @@ fil_ibd_create(
|
|||||||
uint32_t size,
|
uint32_t size,
|
||||||
fil_encryption_t mode,
|
fil_encryption_t mode,
|
||||||
uint32_t key_id,
|
uint32_t key_id,
|
||||||
dberr_t* err)
|
dberr_t* err) noexcept
|
||||||
{
|
{
|
||||||
pfs_os_file_t file;
|
pfs_os_file_t file;
|
||||||
bool success;
|
bool success;
|
||||||
@@ -2017,8 +1982,8 @@ err_exit:
|
|||||||
log_make_checkpoint(););
|
log_make_checkpoint(););
|
||||||
|
|
||||||
mysql_mutex_lock(&fil_system.mutex);
|
mysql_mutex_lock(&fil_system.mutex);
|
||||||
if (fil_space_t* space = fil_space_t::create(space_id, flags,
|
if (fil_space_t* space = fil_space_t::create(space_id,
|
||||||
FIL_TYPE_TABLESPACE,
|
flags, false,
|
||||||
crypt_data, mode, true)) {
|
crypt_data, mode, true)) {
|
||||||
fil_node_t* node = space->add(path, file, size, false, true);
|
fil_node_t* node = space->add(path, file, size, false, true);
|
||||||
node->find_metadata(IF_WIN(,true));
|
node->find_metadata(IF_WIN(,true));
|
||||||
@@ -2040,51 +2005,17 @@ err_exit:
|
|||||||
goto err_exit;
|
goto err_exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Try to open a single-table tablespace and optionally check that the
|
fil_space_t *fil_ibd_open(uint32_t id, uint32_t flags,
|
||||||
space id in it is correct. If this does not succeed, print an error message
|
fil_space_t::validate validate,
|
||||||
to the .err log. This function is used to open a tablespace when we start
|
|
||||||
mysqld after the dictionary has been booted, and also in IMPORT TABLESPACE.
|
|
||||||
|
|
||||||
NOTE that we assume this operation is used either at the database startup
|
|
||||||
or under the protection of dict_sys.latch, so that two users cannot
|
|
||||||
race here. This operation does not leave the file associated with the
|
|
||||||
tablespace open, but closes it after we have looked at the space id in it.
|
|
||||||
|
|
||||||
If the validate boolean is set, we read the first page of the file and
|
|
||||||
check that the space id in the file is what we expect. We assume that
|
|
||||||
this function runs much faster if no check is made, since accessing the
|
|
||||||
file inode probably is much faster (the OS caches them) than accessing
|
|
||||||
the first page of the file. This boolean may be initially false, but if
|
|
||||||
a remote tablespace is found it will be changed to true.
|
|
||||||
|
|
||||||
If the fix_dict boolean is set, then it is safe to use an internal SQL
|
|
||||||
statement to update the dictionary tables if they are incorrect.
|
|
||||||
|
|
||||||
@param[in] validate 0=maybe missing, 1=do not validate, 2=validate
|
|
||||||
@param[in] purpose FIL_TYPE_TABLESPACE or FIL_TYPE_TEMPORARY
|
|
||||||
@param[in] id tablespace ID
|
|
||||||
@param[in] flags expected FSP_SPACE_FLAGS
|
|
||||||
@param[in] name table name
|
|
||||||
If file-per-table, it is the table name in the databasename/tablename format
|
|
||||||
@param[in] path_in expected filepath, usually read from dictionary
|
|
||||||
@param[out] err DB_SUCCESS or error code
|
|
||||||
@return tablespace
|
|
||||||
@retval NULL if the tablespace could not be opened */
|
|
||||||
fil_space_t*
|
|
||||||
fil_ibd_open(
|
|
||||||
unsigned validate,
|
|
||||||
fil_type_t purpose,
|
|
||||||
uint32_t id,
|
|
||||||
uint32_t flags,
|
|
||||||
fil_space_t::name_type name,
|
fil_space_t::name_type name,
|
||||||
const char* path_in,
|
const char *path_in, dberr_t *err) noexcept
|
||||||
dberr_t* err)
|
|
||||||
{
|
{
|
||||||
mysql_mutex_lock(&fil_system.mutex);
|
mysql_mutex_lock(&fil_system.mutex);
|
||||||
fil_space_t* space = fil_space_get_by_id(id);
|
fil_space_t* space = fil_space_get_by_id(id);
|
||||||
mysql_mutex_unlock(&fil_system.mutex);
|
mysql_mutex_unlock(&fil_system.mutex);
|
||||||
if (space) {
|
if (space) {
|
||||||
if (validate > 1 && !srv_read_only_mode) {
|
if (validate == fil_space_t::VALIDATE_SPACE_ID
|
||||||
|
&& !srv_read_only_mode) {
|
||||||
fsp_flags_try_adjust(space,
|
fsp_flags_try_adjust(space,
|
||||||
flags & ~FSP_FLAGS_MEM_MASK);
|
flags & ~FSP_FLAGS_MEM_MASK);
|
||||||
}
|
}
|
||||||
@@ -2140,7 +2071,7 @@ func_exit:
|
|||||||
/* Dict path is not the default path. Always validate
|
/* Dict path is not the default path. Always validate
|
||||||
remote files. If default is opened, it was moved. */
|
remote files. If default is opened, it was moved. */
|
||||||
must_validate = true;
|
must_validate = true;
|
||||||
} else if (validate > 1) {
|
} else if (validate >= fil_space_t::VALIDATE_SPACE_ID) {
|
||||||
must_validate = true;
|
must_validate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2157,7 +2088,8 @@ func_exit:
|
|||||||
the first server startup. The tables ought to be dropped by
|
the first server startup. The tables ought to be dropped by
|
||||||
drop_garbage_tables_after_restore() a little later. */
|
drop_garbage_tables_after_restore() a little later. */
|
||||||
|
|
||||||
const bool strict = validate && !tablespaces_found
|
const bool strict = (validate != fil_space_t::MAYBE_MISSING)
|
||||||
|
&& !tablespaces_found
|
||||||
&& operation_not_for_export
|
&& operation_not_for_export
|
||||||
&& !(srv_operation == SRV_OPERATION_NORMAL
|
&& !(srv_operation == SRV_OPERATION_NORMAL
|
||||||
&& srv_start_after_restore
|
&& srv_start_after_restore
|
||||||
@@ -2288,7 +2220,9 @@ skip_validate:
|
|||||||
: NULL;
|
: NULL;
|
||||||
|
|
||||||
mysql_mutex_lock(&fil_system.mutex);
|
mysql_mutex_lock(&fil_system.mutex);
|
||||||
space = fil_space_t::create(id, flags, purpose, crypt_data);
|
space = fil_space_t::create(id, flags,
|
||||||
|
validate == fil_space_t::VALIDATE_IMPORT,
|
||||||
|
crypt_data);
|
||||||
if (!space) {
|
if (!space) {
|
||||||
mysql_mutex_unlock(&fil_system.mutex);
|
mysql_mutex_unlock(&fil_system.mutex);
|
||||||
goto error;
|
goto error;
|
||||||
@@ -2306,7 +2240,7 @@ skip_validate:
|
|||||||
df_remote.close();
|
df_remote.close();
|
||||||
df_default.close();
|
df_default.close();
|
||||||
if (space->acquire()) {
|
if (space->acquire()) {
|
||||||
if (purpose != FIL_TYPE_IMPORT) {
|
if (validate < fil_space_t::VALIDATE_IMPORT) {
|
||||||
fsp_flags_try_adjust(space, flags
|
fsp_flags_try_adjust(space, flags
|
||||||
& ~FSP_FLAGS_MEM_MASK);
|
& ~FSP_FLAGS_MEM_MASK);
|
||||||
}
|
}
|
||||||
@@ -2591,8 +2525,8 @@ tablespace_check:
|
|||||||
|
|
||||||
mysql_mutex_lock(&fil_system.mutex);
|
mysql_mutex_lock(&fil_system.mutex);
|
||||||
|
|
||||||
space = fil_space_t::create(
|
space = fil_space_t::create(uint32_t(space_id), flags, false,
|
||||||
space_id, flags, FIL_TYPE_TABLESPACE, crypt_data);
|
crypt_data);
|
||||||
|
|
||||||
if (space == NULL) {
|
if (space == NULL) {
|
||||||
mysql_mutex_unlock(&fil_system.mutex);
|
mysql_mutex_unlock(&fil_system.mutex);
|
||||||
@@ -2620,16 +2554,14 @@ void fsp_flags_try_adjust(fil_space_t *space, uint32_t flags)
|
|||||||
{
|
{
|
||||||
ut_ad(!srv_read_only_mode);
|
ut_ad(!srv_read_only_mode);
|
||||||
ut_ad(fil_space_t::is_valid_flags(flags, space->id));
|
ut_ad(fil_space_t::is_valid_flags(flags, space->id));
|
||||||
|
ut_ad(!space->is_being_imported());
|
||||||
|
ut_ad(!space->is_temporary());
|
||||||
if (space->full_crc32() || fil_space_t::full_crc32(flags)) {
|
if (space->full_crc32() || fil_space_t::full_crc32(flags)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!space->size && (space->purpose != FIL_TYPE_TABLESPACE
|
if (!space->size || !space->get_size()) {
|
||||||
|| !space->get_size())) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* This code is executed during server startup while no
|
|
||||||
connections are allowed. We do not need to protect against
|
|
||||||
DROP TABLE by fil_space_acquire(). */
|
|
||||||
mtr_t mtr;
|
mtr_t mtr;
|
||||||
mtr.start();
|
mtr.start();
|
||||||
if (buf_block_t* b = buf_page_get(
|
if (buf_block_t* b = buf_page_get(
|
||||||
@@ -2720,7 +2652,7 @@ inline void fil_node_t::complete_write()
|
|||||||
{
|
{
|
||||||
mysql_mutex_assert_not_owner(&fil_system.mutex);
|
mysql_mutex_assert_not_owner(&fil_system.mutex);
|
||||||
|
|
||||||
if (space->purpose != FIL_TYPE_TEMPORARY &&
|
if (!space->is_temporary() &&
|
||||||
srv_file_flush_method != SRV_O_DIRECT_NO_FSYNC &&
|
srv_file_flush_method != SRV_O_DIRECT_NO_FSYNC &&
|
||||||
space->set_needs_flush())
|
space->set_needs_flush())
|
||||||
{
|
{
|
||||||
@@ -3034,8 +2966,8 @@ fil_space_validate_for_mtr_commit(
|
|||||||
{
|
{
|
||||||
mysql_mutex_assert_not_owner(&fil_system.mutex);
|
mysql_mutex_assert_not_owner(&fil_system.mutex);
|
||||||
ut_ad(space != NULL);
|
ut_ad(space != NULL);
|
||||||
ut_ad(space->purpose == FIL_TYPE_TABLESPACE);
|
|
||||||
ut_ad(!is_predefined_tablespace(space->id));
|
ut_ad(!is_predefined_tablespace(space->id));
|
||||||
|
ut_ad(!space->is_being_imported());
|
||||||
|
|
||||||
/* We are serving mtr_commit(). While there is an active
|
/* We are serving mtr_commit(). While there is an active
|
||||||
mini-transaction, we should have !space->is_stopping(). This is
|
mini-transaction, we should have !space->is_stopping(). This is
|
||||||
@@ -3218,7 +3150,7 @@ fil_space_t::name_type fil_space_t::name() const
|
|||||||
if (!UT_LIST_GET_FIRST(chain) || srv_is_undo_tablespace(id))
|
if (!UT_LIST_GET_FIRST(chain) || srv_is_undo_tablespace(id))
|
||||||
return name_type{};
|
return name_type{};
|
||||||
|
|
||||||
ut_ad(purpose != FIL_TYPE_TEMPORARY);
|
ut_ad(!is_temporary());
|
||||||
ut_ad(UT_LIST_GET_LEN(chain) == 1);
|
ut_ad(UT_LIST_GET_LEN(chain) == 1);
|
||||||
|
|
||||||
const char *path= UT_LIST_GET_FIRST(chain)->name;
|
const char *path= UT_LIST_GET_FIRST(chain)->name;
|
||||||
|
@@ -350,7 +350,7 @@ xdes_get_descriptor_with_space_hdr(
|
|||||||
ut_ad(limit == space->free_limit
|
ut_ad(limit == space->free_limit
|
||||||
|| (space->free_limit == 0
|
|| (space->free_limit == 0
|
||||||
&& (init_space
|
&& (init_space
|
||||||
|| space->purpose == FIL_TYPE_TEMPORARY
|
|| space->is_temporary()
|
||||||
|| (srv_startup_is_before_trx_rollback_phase
|
|| (srv_startup_is_before_trx_rollback_phase
|
||||||
&& (space->id == TRX_SYS_SPACE
|
&& (space->id == TRX_SYS_SPACE
|
||||||
|| srv_is_undo_tablespace(space->id))))));
|
|| srv_is_undo_tablespace(space->id))))));
|
||||||
@@ -486,14 +486,15 @@ void fil_space_t::modify_check(const mtr_t& mtr) const
|
|||||||
case MTR_LOG_NONE:
|
case MTR_LOG_NONE:
|
||||||
/* These modes are only allowed within a non-bitmap page
|
/* These modes are only allowed within a non-bitmap page
|
||||||
when there is a higher-level redo log record written. */
|
when there is a higher-level redo log record written. */
|
||||||
ut_ad(purpose == FIL_TYPE_TABLESPACE || purpose == FIL_TYPE_TEMPORARY);
|
ut_ad(!is_being_imported());
|
||||||
break;
|
break;
|
||||||
case MTR_LOG_NO_REDO:
|
case MTR_LOG_NO_REDO:
|
||||||
ut_ad(purpose == FIL_TYPE_TEMPORARY || purpose == FIL_TYPE_IMPORT);
|
ut_ad(is_temporary() || is_being_imported());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* We may only write redo log for a persistent tablespace. */
|
/* We may only write redo log for a persistent tablespace. */
|
||||||
ut_ad(purpose == FIL_TYPE_TABLESPACE);
|
ut_ad(!is_temporary());
|
||||||
|
ut_ad(!is_being_imported());
|
||||||
ut_ad(mtr.is_named_space(id));
|
ut_ad(mtr.is_named_space(id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -852,7 +853,7 @@ fsp_fill_free_list(
|
|||||||
FIL_PAGE_TYPE_XDES);
|
FIL_PAGE_TYPE_XDES);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (space->purpose != FIL_TYPE_TEMPORARY)
|
if (!space->is_temporary())
|
||||||
{
|
{
|
||||||
buf_block_t *f= buf_LRU_get_free_block(false);
|
buf_block_t *f= buf_LRU_get_free_block(false);
|
||||||
buf_block_t *block=
|
buf_block_t *block=
|
||||||
|
@@ -132,10 +132,8 @@ Tablespace::open_or_create(bool is_temp)
|
|||||||
|
|
||||||
mysql_mutex_lock(&fil_system.mutex);
|
mysql_mutex_lock(&fil_system.mutex);
|
||||||
space = fil_space_t::create(
|
space = fil_space_t::create(
|
||||||
m_space_id, fsp_flags,
|
uint32_t(m_space_id), fsp_flags,
|
||||||
is_temp
|
false, nullptr);
|
||||||
? FIL_TYPE_TEMPORARY : FIL_TYPE_TABLESPACE,
|
|
||||||
NULL);
|
|
||||||
if (!space) {
|
if (!space) {
|
||||||
mysql_mutex_unlock(&fil_system.mutex);
|
mysql_mutex_unlock(&fil_system.mutex);
|
||||||
return DB_ERROR;
|
return DB_ERROR;
|
||||||
|
@@ -953,8 +953,7 @@ SysTablespace::open_or_create(
|
|||||||
} else if (is_temp) {
|
} else if (is_temp) {
|
||||||
ut_ad(space_id() == SRV_TMP_SPACE_ID);
|
ut_ad(space_id() == SRV_TMP_SPACE_ID);
|
||||||
space = fil_space_t::create(
|
space = fil_space_t::create(
|
||||||
SRV_TMP_SPACE_ID, flags(),
|
SRV_TMP_SPACE_ID, flags(), false, nullptr);
|
||||||
FIL_TYPE_TEMPORARY, NULL);
|
|
||||||
ut_ad(space == fil_system.temp_space);
|
ut_ad(space == fil_system.temp_space);
|
||||||
if (!space) {
|
if (!space) {
|
||||||
err = DB_ERROR;
|
err = DB_ERROR;
|
||||||
@@ -965,8 +964,7 @@ SysTablespace::open_or_create(
|
|||||||
} else {
|
} else {
|
||||||
ut_ad(space_id() == TRX_SYS_SPACE);
|
ut_ad(space_id() == TRX_SYS_SPACE);
|
||||||
space = fil_space_t::create(
|
space = fil_space_t::create(
|
||||||
TRX_SYS_SPACE, it->flags(),
|
TRX_SYS_SPACE, it->flags(), false, nullptr);
|
||||||
FIL_TYPE_TABLESPACE, NULL);
|
|
||||||
ut_ad(space == fil_system.sys_space);
|
ut_ad(space == fil_system.sys_space);
|
||||||
if (!space) {
|
if (!space) {
|
||||||
err = DB_ERROR;
|
err = DB_ERROR;
|
||||||
|
@@ -2211,7 +2211,7 @@ fts_savepoint_t*
|
|||||||
fts_savepoint_create(
|
fts_savepoint_create(
|
||||||
/*=================*/
|
/*=================*/
|
||||||
ib_vector_t* savepoints, /*!< out: InnoDB transaction */
|
ib_vector_t* savepoints, /*!< out: InnoDB transaction */
|
||||||
const char* name, /*!< in: savepoint name */
|
const void* name, /*!< in: savepoint */
|
||||||
mem_heap_t* heap) /*!< in: heap */
|
mem_heap_t* heap) /*!< in: heap */
|
||||||
{
|
{
|
||||||
fts_savepoint_t* savepoint;
|
fts_savepoint_t* savepoint;
|
||||||
@@ -2220,11 +2220,7 @@ fts_savepoint_create(
|
|||||||
ib_vector_push(savepoints, NULL));
|
ib_vector_push(savepoints, NULL));
|
||||||
|
|
||||||
memset(savepoint, 0x0, sizeof(*savepoint));
|
memset(savepoint, 0x0, sizeof(*savepoint));
|
||||||
|
savepoint->name = name;
|
||||||
if (name) {
|
|
||||||
savepoint->name = mem_heap_strdup(heap, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
static_assert(!offsetof(fts_trx_table_t, table), "ABI");
|
static_assert(!offsetof(fts_trx_table_t, table), "ABI");
|
||||||
savepoint->tables = rbt_create(sizeof(fts_trx_table_t*), fts_ptr2_cmp);
|
savepoint->tables = rbt_create(sizeof(fts_trx_table_t*), fts_ptr2_cmp);
|
||||||
|
|
||||||
@@ -2243,7 +2239,6 @@ fts_trx_create(
|
|||||||
fts_trx_t* ftt;
|
fts_trx_t* ftt;
|
||||||
ib_alloc_t* heap_alloc;
|
ib_alloc_t* heap_alloc;
|
||||||
mem_heap_t* heap = mem_heap_create(1024);
|
mem_heap_t* heap = mem_heap_create(1024);
|
||||||
trx_named_savept_t* savep;
|
|
||||||
|
|
||||||
ut_a(trx->fts_trx == NULL);
|
ut_a(trx->fts_trx == NULL);
|
||||||
|
|
||||||
@@ -2263,14 +2258,6 @@ fts_trx_create(
|
|||||||
fts_savepoint_create(ftt->savepoints, NULL, NULL);
|
fts_savepoint_create(ftt->savepoints, NULL, NULL);
|
||||||
fts_savepoint_create(ftt->last_stmt, NULL, NULL);
|
fts_savepoint_create(ftt->last_stmt, NULL, NULL);
|
||||||
|
|
||||||
/* Copy savepoints that already set before. */
|
|
||||||
for (savep = UT_LIST_GET_FIRST(trx->trx_savepoints);
|
|
||||||
savep != NULL;
|
|
||||||
savep = UT_LIST_GET_NEXT(trx_savepoints, savep)) {
|
|
||||||
|
|
||||||
fts_savepoint_take(ftt, savep->name);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(ftt);
|
return(ftt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5410,7 +5397,7 @@ void
|
|||||||
fts_savepoint_take(
|
fts_savepoint_take(
|
||||||
/*===============*/
|
/*===============*/
|
||||||
fts_trx_t* fts_trx, /*!< in: fts transaction */
|
fts_trx_t* fts_trx, /*!< in: fts transaction */
|
||||||
const char* name) /*!< in: savepoint name */
|
const void* name) /*!< in: savepoint */
|
||||||
{
|
{
|
||||||
mem_heap_t* heap;
|
mem_heap_t* heap;
|
||||||
fts_savepoint_t* savepoint;
|
fts_savepoint_t* savepoint;
|
||||||
@@ -5433,31 +5420,21 @@ fts_savepoint_take(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************//**
|
/*********************************************************************//**
|
||||||
Lookup a savepoint instance by name.
|
Lookup a savepoint instance.
|
||||||
@return ULINT_UNDEFINED if not found */
|
@return 0 if not found */
|
||||||
UNIV_INLINE
|
static
|
||||||
ulint
|
ulint
|
||||||
fts_savepoint_lookup(
|
fts_savepoint_lookup(
|
||||||
/*==================*/
|
/*==================*/
|
||||||
ib_vector_t* savepoints, /*!< in: savepoints */
|
ib_vector_t* savepoints, /*!< in: savepoints */
|
||||||
const char* name) /*!< in: savepoint name */
|
const void* name) /*!< in: savepoint */
|
||||||
{
|
{
|
||||||
ulint i;
|
|
||||||
|
|
||||||
ut_a(ib_vector_size(savepoints) > 0);
|
ut_a(ib_vector_size(savepoints) > 0);
|
||||||
|
for (ulint i= 1; i < ib_vector_size(savepoints); ++i)
|
||||||
for (i = 1; i < ib_vector_size(savepoints); ++i) {
|
if (name == static_cast<const fts_savepoint_t*>
|
||||||
fts_savepoint_t* savepoint;
|
(ib_vector_get(savepoints, i))->name)
|
||||||
|
return i;
|
||||||
savepoint = static_cast<fts_savepoint_t*>(
|
return 0;
|
||||||
ib_vector_get(savepoints, i));
|
|
||||||
|
|
||||||
if (strcmp(name, savepoint->name) == 0) {
|
|
||||||
return(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return(ULINT_UNDEFINED);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************//**
|
/*********************************************************************//**
|
||||||
@@ -5468,7 +5445,7 @@ void
|
|||||||
fts_savepoint_release(
|
fts_savepoint_release(
|
||||||
/*==================*/
|
/*==================*/
|
||||||
trx_t* trx, /*!< in: transaction */
|
trx_t* trx, /*!< in: transaction */
|
||||||
const char* name) /*!< in: savepoint name */
|
const void* name) /*!< in: savepoint name */
|
||||||
{
|
{
|
||||||
ut_a(name != NULL);
|
ut_a(name != NULL);
|
||||||
|
|
||||||
@@ -5476,10 +5453,7 @@ fts_savepoint_release(
|
|||||||
|
|
||||||
ut_a(ib_vector_size(savepoints) > 0);
|
ut_a(ib_vector_size(savepoints) > 0);
|
||||||
|
|
||||||
ulint i = fts_savepoint_lookup(savepoints, name);
|
if (ulint i = fts_savepoint_lookup(savepoints, name)) {
|
||||||
if (i != ULINT_UNDEFINED) {
|
|
||||||
ut_a(i >= 1);
|
|
||||||
|
|
||||||
fts_savepoint_t* savepoint;
|
fts_savepoint_t* savepoint;
|
||||||
savepoint = static_cast<fts_savepoint_t*>(
|
savepoint = static_cast<fts_savepoint_t*>(
|
||||||
ib_vector_get(savepoints, i));
|
ib_vector_get(savepoints, i));
|
||||||
@@ -5634,9 +5608,8 @@ void
|
|||||||
fts_savepoint_rollback(
|
fts_savepoint_rollback(
|
||||||
/*===================*/
|
/*===================*/
|
||||||
trx_t* trx, /*!< in: transaction */
|
trx_t* trx, /*!< in: transaction */
|
||||||
const char* name) /*!< in: savepoint name */
|
const void* name) /*!< in: savepoint */
|
||||||
{
|
{
|
||||||
ulint i;
|
|
||||||
ib_vector_t* savepoints;
|
ib_vector_t* savepoints;
|
||||||
|
|
||||||
ut_a(name != NULL);
|
ut_a(name != NULL);
|
||||||
@@ -5645,16 +5618,19 @@ fts_savepoint_rollback(
|
|||||||
|
|
||||||
/* We pop all savepoints from the the top of the stack up to
|
/* We pop all savepoints from the the top of the stack up to
|
||||||
and including the instance that was found. */
|
and including the instance that was found. */
|
||||||
i = fts_savepoint_lookup(savepoints, name);
|
ulint i = fts_savepoint_lookup(savepoints, name);
|
||||||
|
|
||||||
if (i != ULINT_UNDEFINED) {
|
if (i == 0) {
|
||||||
|
/* fts_trx_create() must have been invoked after
|
||||||
|
this savepoint had been created, and we must roll back
|
||||||
|
everything. */
|
||||||
|
i = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
fts_savepoint_t* savepoint;
|
fts_savepoint_t* savepoint;
|
||||||
|
|
||||||
ut_a(i > 0);
|
|
||||||
|
|
||||||
while (ib_vector_size(savepoints) > i) {
|
while (ib_vector_size(savepoints) > i) {
|
||||||
fts_savepoint_t* savepoint;
|
|
||||||
|
|
||||||
savepoint = static_cast<fts_savepoint_t*>(
|
savepoint = static_cast<fts_savepoint_t*>(
|
||||||
ib_vector_pop(savepoints));
|
ib_vector_pop(savepoints));
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -465,8 +465,13 @@ protected:
|
|||||||
@see build_template() */
|
@see build_template() */
|
||||||
void reset_template();
|
void reset_template();
|
||||||
|
|
||||||
/** @return whether the table is read-only */
|
/** Check the transaction is valid.
|
||||||
bool is_read_only(bool altering_to_supported= false) const;
|
@param altering_to_supported whether an ALTER TABLE is being run
|
||||||
|
to something else than ROW_FORMAT=COMPRESSED
|
||||||
|
@retval 0 if the transaction is valid for the current operation
|
||||||
|
@retval HA_ERR_TABLE_READONLY if the table is read-only
|
||||||
|
@retval HA_ERR_ROLLBACK if the transaction has been aborted */
|
||||||
|
int is_valid_trx(bool altering_to_supported= false) const noexcept;
|
||||||
|
|
||||||
inline void update_thd(THD* thd);
|
inline void update_thd(THD* thd);
|
||||||
void update_thd();
|
void update_thd();
|
||||||
@@ -937,12 +942,3 @@ ib_push_frm_error(
|
|||||||
@return true if index column length exceeds limit */
|
@return true if index column length exceeds limit */
|
||||||
MY_ATTRIBUTE((warn_unused_result))
|
MY_ATTRIBUTE((warn_unused_result))
|
||||||
bool too_big_key_part_length(size_t max_field_len, const KEY& key);
|
bool too_big_key_part_length(size_t max_field_len, const KEY& key);
|
||||||
|
|
||||||
/** This function is used to rollback one X/Open XA distributed transaction
|
|
||||||
which is in the prepared state
|
|
||||||
|
|
||||||
@param[in] hton InnoDB handlerton
|
|
||||||
@param[in] xid X/Open XA transaction identification
|
|
||||||
|
|
||||||
@return 0 or error number */
|
|
||||||
int innobase_rollback_by_xid(handlerton* hton, XID* xid);
|
|
||||||
|
@@ -2248,7 +2248,7 @@ ha_innobase::check_if_supported_inplace_alter(
|
|||||||
table->s->table_name.str);
|
table->s->table_name.str);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_read_only(!high_level_read_only
|
if (is_valid_trx(!high_level_read_only
|
||||||
&& (ha_alter_info->handler_flags & ALTER_OPTIONS)
|
&& (ha_alter_info->handler_flags & ALTER_OPTIONS)
|
||||||
&& ha_alter_info->create_info->key_block_size == 0
|
&& ha_alter_info->create_info->key_block_size == 0
|
||||||
&& ha_alter_info->create_info->row_type
|
&& ha_alter_info->create_info->row_type
|
||||||
@@ -9170,7 +9170,7 @@ inline bool rollback_inplace_alter_table(Alter_inplace_info *ha_alter_info,
|
|||||||
/* If we have not started a transaction yet,
|
/* If we have not started a transaction yet,
|
||||||
(almost) nothing has been or needs to be done. */
|
(almost) nothing has been or needs to be done. */
|
||||||
dict_sys.lock(SRW_LOCK_CALL);
|
dict_sys.lock(SRW_LOCK_CALL);
|
||||||
else if (ctx->trx->state == TRX_STATE_NOT_STARTED)
|
else if (!ctx->trx->is_started())
|
||||||
goto free_and_exit;
|
goto free_and_exit;
|
||||||
else if (ctx->new_table)
|
else if (ctx->new_table)
|
||||||
{
|
{
|
||||||
@@ -11402,7 +11402,7 @@ lock_fail:
|
|||||||
to remove the newly created table or
|
to remove the newly created table or
|
||||||
index from data dictionary and table cache
|
index from data dictionary and table cache
|
||||||
in rollback_inplace_alter_table() */
|
in rollback_inplace_alter_table() */
|
||||||
if (trx->state == TRX_STATE_NOT_STARTED) {
|
if (!trx->is_started()) {
|
||||||
trx_start_for_ddl(trx);
|
trx_start_for_ddl(trx);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -11569,7 +11569,7 @@ err_index:
|
|||||||
purge_sys.resume_FTS();
|
purge_sys.resume_FTS();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trx->state == TRX_STATE_NOT_STARTED) {
|
if (!trx->is_started()) {
|
||||||
/* Transaction may have been rolled back
|
/* Transaction may have been rolled back
|
||||||
due to a lock wait timeout, deadlock,
|
due to a lock wait timeout, deadlock,
|
||||||
or a KILL statement. So restart the
|
or a KILL statement. So restart the
|
||||||
|
@@ -6268,7 +6268,8 @@ static int i_s_sys_tablespaces_fill_table(THD *thd, TABLE_LIST *tables, Item*)
|
|||||||
|
|
||||||
for (fil_space_t &space : fil_system.space_list)
|
for (fil_space_t &space : fil_system.space_list)
|
||||||
{
|
{
|
||||||
if (space.purpose == FIL_TYPE_TABLESPACE && !space.is_stopping() &&
|
if (!space.is_temporary() && !space.is_being_imported() &&
|
||||||
|
!space.is_stopping() &&
|
||||||
space.chain.start)
|
space.chain.start)
|
||||||
{
|
{
|
||||||
space.reacquire();
|
space.reacquire();
|
||||||
@@ -6497,7 +6498,7 @@ i_s_tablespaces_encryption_fill_table(
|
|||||||
fil_system.freeze_space_list++;
|
fil_system.freeze_space_list++;
|
||||||
|
|
||||||
for (fil_space_t& space : fil_system.space_list) {
|
for (fil_space_t& space : fil_system.space_list) {
|
||||||
if (space.purpose == FIL_TYPE_TABLESPACE
|
if (!space.is_temporary() && !space.is_being_imported()
|
||||||
&& !space.is_stopping()) {
|
&& !space.is_stopping()) {
|
||||||
space.reacquire();
|
space.reacquire();
|
||||||
mysql_mutex_unlock(&fil_system.mutex);
|
mysql_mutex_unlock(&fil_system.mutex);
|
||||||
|
@@ -738,13 +738,15 @@ ibuf_set_free_bits_func(
|
|||||||
mtr.start();
|
mtr.start();
|
||||||
const page_id_t id(block->page.id());
|
const page_id_t id(block->page.id());
|
||||||
const fil_space_t *space= mtr.set_named_space_id(id.space());
|
const fil_space_t *space= mtr.set_named_space_id(id.space());
|
||||||
|
/* all callers of ibuf_update_free_bits_if_full() or ibuf_reset_free_bits()
|
||||||
|
check this */
|
||||||
|
ut_ad(!space->is_temporary());
|
||||||
|
|
||||||
if (buf_block_t *bitmap_page=
|
if (buf_block_t *bitmap_page=
|
||||||
ibuf_bitmap_get_map_page(id, block->zip_size(), &mtr))
|
ibuf_bitmap_get_map_page(id, block->zip_size(), &mtr))
|
||||||
{
|
{
|
||||||
if (space->purpose != FIL_TYPE_TABLESPACE)
|
if (space->is_being_imported()) /* IndexPurge may invoke this */
|
||||||
mtr.set_log_mode(MTR_LOG_NO_REDO);
|
mtr.set_log_mode(MTR_LOG_NO_REDO);
|
||||||
|
|
||||||
#ifdef UNIV_IBUF_DEBUG
|
#ifdef UNIV_IBUF_DEBUG
|
||||||
if (max_val != ULINT_UNDEFINED)
|
if (max_val != ULINT_UNDEFINED)
|
||||||
{
|
{
|
||||||
@@ -925,8 +927,7 @@ ibuf_page_low(
|
|||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
compile_time_assert(IBUF_SPACE_ID == 0);
|
static_assert(IBUF_SPACE_ID == 0, "compatiblity");
|
||||||
ut_ad(fil_system.sys_space->purpose == FIL_TYPE_TABLESPACE);
|
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
#ifdef UNIV_DEBUG
|
||||||
if (x_latch) {
|
if (x_latch) {
|
||||||
@@ -4505,7 +4506,7 @@ ibuf_print(
|
|||||||
dberr_t ibuf_check_bitmap_on_import(const trx_t* trx, fil_space_t* space)
|
dberr_t ibuf_check_bitmap_on_import(const trx_t* trx, fil_space_t* space)
|
||||||
{
|
{
|
||||||
ut_ad(trx->mysql_thd);
|
ut_ad(trx->mysql_thd);
|
||||||
ut_ad(space->purpose == FIL_TYPE_IMPORT);
|
ut_ad(space->is_being_imported());
|
||||||
|
|
||||||
const unsigned zip_size = space->zip_size();
|
const unsigned zip_size = space->zip_size();
|
||||||
const unsigned physical_size = space->physical_size();
|
const unsigned physical_size = space->physical_size();
|
||||||
|
@@ -68,8 +68,6 @@ enum dberr_t {
|
|||||||
noticed */
|
noticed */
|
||||||
DB_CANNOT_DROP_CONSTRAINT, /*!< dropping a foreign key constraint
|
DB_CANNOT_DROP_CONSTRAINT, /*!< dropping a foreign key constraint
|
||||||
from a table failed */
|
from a table failed */
|
||||||
DB_NO_SAVEPOINT, /*!< no savepoint exists with the given
|
|
||||||
name */
|
|
||||||
DB_TABLESPACE_EXISTS, /*!< we cannot create a new single-table
|
DB_TABLESPACE_EXISTS, /*!< we cannot create a new single-table
|
||||||
tablespace because a file of the same
|
tablespace because a file of the same
|
||||||
name already exists */
|
name already exists */
|
||||||
|
@@ -100,16 +100,6 @@ class page_id_t;
|
|||||||
/** Structure containing encryption specification */
|
/** Structure containing encryption specification */
|
||||||
struct fil_space_crypt_t;
|
struct fil_space_crypt_t;
|
||||||
|
|
||||||
/** File types */
|
|
||||||
enum fil_type_t {
|
|
||||||
/** temporary tablespace (temporary undo log or tables) */
|
|
||||||
FIL_TYPE_TEMPORARY,
|
|
||||||
/** a tablespace that is being imported (no logging until finished) */
|
|
||||||
FIL_TYPE_IMPORT,
|
|
||||||
/** persistent tablespace (for system, undo log or tables) */
|
|
||||||
FIL_TYPE_TABLESPACE,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct fil_node_t;
|
struct fil_node_t;
|
||||||
|
|
||||||
/** Structure to store first and last value of range */
|
/** Structure to store first and last value of range */
|
||||||
@@ -344,39 +334,43 @@ struct fil_space_t final
|
|||||||
{
|
{
|
||||||
#ifndef UNIV_INNOCHECKSUM
|
#ifndef UNIV_INNOCHECKSUM
|
||||||
friend fil_node_t;
|
friend fil_node_t;
|
||||||
|
|
||||||
|
/** Constructor; see @fil_space_t::create() */
|
||||||
|
inline explicit fil_space_t(uint32_t id, uint32_t flags, bool being_imported,
|
||||||
|
fil_space_crypt_t *crypt_data) noexcept;
|
||||||
|
|
||||||
~fil_space_t()
|
~fil_space_t()
|
||||||
{
|
{
|
||||||
ut_ad(!latch_owner);
|
ut_ad(!latch_owner);
|
||||||
latch.destroy();
|
latch.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** fil_system.spaces chain node */
|
|
||||||
fil_space_t *hash;
|
|
||||||
/** LSN of the most recent fil_names_write_if_was_clean().
|
|
||||||
Reset to 0 by fil_names_clear(). Protected by exclusive log_sys.latch.
|
|
||||||
If and only if max_lsn is nonzero, this is in fil_system.named_spaces. */
|
|
||||||
lsn_t max_lsn;
|
|
||||||
/** tablespace identifier */
|
/** tablespace identifier */
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
fil_type_t purpose;/*!< purpose */
|
|
||||||
|
/** fil_system.spaces chain node */
|
||||||
|
fil_space_t *hash= nullptr;
|
||||||
|
/** log_sys.get_lsn() of the most recent fil_names_write_if_was_clean().
|
||||||
|
Reset to 0 by fil_names_clear(). Protected by log_sys.mutex.
|
||||||
|
If and only if this is nonzero, the tablespace will be in named_spaces. */
|
||||||
|
lsn_t max_lsn= 0;
|
||||||
|
/** base node for the chain of data files; multiple entries are
|
||||||
|
only possible for is_temporary() or id==0 */
|
||||||
UT_LIST_BASE_NODE_T(fil_node_t) chain;
|
UT_LIST_BASE_NODE_T(fil_node_t) chain;
|
||||||
/*!< base node for the file chain */
|
/** tablespace size in pages; 0 if not determined yet */
|
||||||
uint32_t size; /*!< tablespace file size in pages;
|
uint32_t size= 0;
|
||||||
0 if not known yet */
|
/** FSP_SIZE in the tablespace header; 0 if not determined yet */
|
||||||
uint32_t size_in_header;
|
uint32_t size_in_header= 0;
|
||||||
/* FSP_SIZE in the tablespace header;
|
/** length of the FSP_FREE list */
|
||||||
0 if not known yet */
|
uint32_t free_len= 0;
|
||||||
uint32_t free_len;
|
/** contents of FSP_FREE_LIMIT */
|
||||||
/*!< length of the FSP_FREE list */
|
uint32_t free_limit= 0;
|
||||||
uint32_t free_limit;
|
/** recovered tablespace size in pages; 0 if no size change was read
|
||||||
/*!< contents of FSP_FREE_LIMIT */
|
from the redo log, or if the size change was applied */
|
||||||
uint32_t recv_size;
|
uint32_t recv_size= 0;
|
||||||
/*!< recovered tablespace size in pages;
|
/** number of reserved free extents for ongoing operations like
|
||||||
0 if no size change was read from the redo log,
|
B-tree page split */
|
||||||
or if the size change was implemented */
|
uint32_t n_reserved_extents= 0;
|
||||||
uint32_t n_reserved_extents;
|
|
||||||
/*!< number of reserved free extents for
|
|
||||||
ongoing operations like B-tree page split */
|
|
||||||
private:
|
private:
|
||||||
#ifdef UNIV_DEBUG
|
#ifdef UNIV_DEBUG
|
||||||
fil_space_t *next_in_space_list();
|
fil_space_t *next_in_space_list();
|
||||||
@@ -387,10 +381,10 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** the committed size of the tablespace in pages */
|
/** the committed size of the tablespace in pages */
|
||||||
Atomic_relaxed<uint32_t> committed_size;
|
Atomic_relaxed<uint32_t> committed_size{0};
|
||||||
/** Number of pending operations on the file.
|
/** Number of pending operations on the file.
|
||||||
The tablespace cannot be freed while (n_pending & PENDING) != 0. */
|
The tablespace cannot be freed while (n_pending & PENDING) != 0. */
|
||||||
std::atomic<uint32_t> n_pending;
|
std::atomic<uint32_t> n_pending{CLOSING};
|
||||||
/** Flag in n_pending that indicates that the tablespace is about to be
|
/** Flag in n_pending that indicates that the tablespace is about to be
|
||||||
deleted, and no further operations should be performed */
|
deleted, and no further operations should be performed */
|
||||||
static constexpr uint32_t STOPPING_READS= 1U << 31;
|
static constexpr uint32_t STOPPING_READS= 1U << 31;
|
||||||
@@ -412,20 +406,23 @@ private:
|
|||||||
/** latch protecting all page allocation bitmap pages */
|
/** latch protecting all page allocation bitmap pages */
|
||||||
IF_DBUG(srw_lock_debug, srw_lock) latch;
|
IF_DBUG(srw_lock_debug, srw_lock) latch;
|
||||||
/** the thread that holds the exclusive latch, or 0 */
|
/** the thread that holds the exclusive latch, or 0 */
|
||||||
pthread_t latch_owner;
|
pthread_t latch_owner= 0;
|
||||||
public:
|
public:
|
||||||
/** MariaDB encryption data */
|
/** MariaDB encryption data */
|
||||||
fil_space_crypt_t *crypt_data;
|
fil_space_crypt_t *crypt_data= nullptr;
|
||||||
|
|
||||||
/** Whether needs_flush(), or this is in fil_system.unflushed_spaces */
|
/** Whether needs_flush(), or this is in fil_system.unflushed_spaces */
|
||||||
bool is_in_unflushed_spaces;
|
bool is_in_unflushed_spaces= false;
|
||||||
|
|
||||||
/** Whether this in fil_system.default_encrypt_tables (needs key rotation) */
|
/** Whether this in fil_system.default_encrypt_tables (needs key rotation) */
|
||||||
bool is_in_default_encrypt;
|
bool is_in_default_encrypt= false;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
/** Whether the tablespace is being imported */
|
||||||
|
bool being_imported= false;
|
||||||
|
|
||||||
/** Whether any corrupton of this tablespace has been reported */
|
/** Whether any corrupton of this tablespace has been reported */
|
||||||
mutable std::atomic_flag is_corrupted;
|
mutable std::atomic_flag is_corrupted{false};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** mutex to protect freed_ranges and last_freed_lsn */
|
/** mutex to protect freed_ranges and last_freed_lsn */
|
||||||
@@ -435,11 +432,18 @@ private:
|
|||||||
range_set freed_ranges;
|
range_set freed_ranges;
|
||||||
|
|
||||||
/** LSN of freeing last page; protected by freed_range_mutex */
|
/** LSN of freeing last page; protected by freed_range_mutex */
|
||||||
lsn_t last_freed_lsn;
|
lsn_t last_freed_lsn= 0;
|
||||||
|
|
||||||
/** LSN of undo tablespace creation or 0; protected by latch */
|
/** LSN of undo tablespace creation or 0; protected by latch */
|
||||||
lsn_t create_lsn;
|
lsn_t create_lsn= 0;
|
||||||
public:
|
public:
|
||||||
|
/** @return whether this is the temporary tablespace */
|
||||||
|
bool is_temporary() const noexcept
|
||||||
|
{ return UNIV_UNLIKELY(id == SRV_TMP_SPACE_ID); }
|
||||||
|
/** @return whether this tablespace is being imported */
|
||||||
|
bool is_being_imported() const noexcept
|
||||||
|
{ return UNIV_UNLIKELY(being_imported); }
|
||||||
|
|
||||||
/** @return whether doublewrite buffering is needed */
|
/** @return whether doublewrite buffering is needed */
|
||||||
inline bool use_doublewrite() const;
|
inline bool use_doublewrite() const;
|
||||||
|
|
||||||
@@ -509,7 +513,7 @@ public:
|
|||||||
MY_ATTRIBUTE((nonnull));
|
MY_ATTRIBUTE((nonnull));
|
||||||
|
|
||||||
/** Note that the tablespace has been imported.
|
/** Note that the tablespace has been imported.
|
||||||
Initially, purpose=FIL_TYPE_IMPORT so that no redo log is
|
Initially, purpose=IMPORT so that no redo log is
|
||||||
written while the space ID is being updated in each page. */
|
written while the space ID is being updated in each page. */
|
||||||
inline void set_imported();
|
inline void set_imported();
|
||||||
|
|
||||||
@@ -888,16 +892,16 @@ public:
|
|||||||
/** Create a tablespace in fil_system.
|
/** Create a tablespace in fil_system.
|
||||||
@param id tablespace identifier
|
@param id tablespace identifier
|
||||||
@param flags tablespace flags
|
@param flags tablespace flags
|
||||||
@param purpose tablespace purpose
|
@param being_imported whether this is IMPORT TABLESPACE
|
||||||
@param crypt_data encryption information
|
@param crypt_data encryption information
|
||||||
@param mode encryption mode
|
@param mode encryption mode
|
||||||
@param opened true if space files are opened
|
@param opened whether the tablespace files are open
|
||||||
@return pointer to created tablespace, to be filled in with add()
|
@return pointer to created tablespace, to be filled in with add()
|
||||||
@retval nullptr on failure (such as when the same tablespace exists) */
|
@retval nullptr on failure (such as when the same tablespace exists) */
|
||||||
static fil_space_t *create(uint32_t id, uint32_t flags,
|
static fil_space_t *create(uint32_t id, uint32_t flags, bool being_imported,
|
||||||
fil_type_t purpose, fil_space_crypt_t *crypt_data,
|
fil_space_crypt_t *crypt_data,
|
||||||
fil_encryption_t mode= FIL_ENCRYPTION_DEFAULT,
|
fil_encryption_t mode= FIL_ENCRYPTION_DEFAULT,
|
||||||
bool opened= false);
|
bool opened= false) noexcept;
|
||||||
|
|
||||||
MY_ATTRIBUTE((warn_unused_result))
|
MY_ATTRIBUTE((warn_unused_result))
|
||||||
/** Acquire a tablespace reference.
|
/** Acquire a tablespace reference.
|
||||||
@@ -1018,6 +1022,18 @@ public:
|
|||||||
/** @return the tablespace name (databasename/tablename) */
|
/** @return the tablespace name (databasename/tablename) */
|
||||||
name_type name() const;
|
name_type name() const;
|
||||||
|
|
||||||
|
/** How to validate tablespace files that are being opened */
|
||||||
|
enum validate {
|
||||||
|
/** the file may be missing */
|
||||||
|
MAYBE_MISSING= 0,
|
||||||
|
/** do not validate */
|
||||||
|
VALIDATE_NOTHING,
|
||||||
|
/** validate the tablespace ID */
|
||||||
|
VALIDATE_SPACE_ID,
|
||||||
|
/** opening a file for ALTER TABLE...IMPORT TABLESPACE */
|
||||||
|
VALIDATE_IMPORT
|
||||||
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** @return whether the file is usable for io() */
|
/** @return whether the file is usable for io() */
|
||||||
ATTRIBUTE_COLD bool prepare_acquired();
|
ATTRIBUTE_COLD bool prepare_acquired();
|
||||||
@@ -1102,8 +1118,8 @@ inline bool fil_space_t::use_doublewrite() const
|
|||||||
|
|
||||||
inline void fil_space_t::set_imported()
|
inline void fil_space_t::set_imported()
|
||||||
{
|
{
|
||||||
ut_ad(purpose == FIL_TYPE_IMPORT);
|
ut_ad(being_imported);
|
||||||
purpose= FIL_TYPE_TABLESPACE;
|
being_imported= false;
|
||||||
UT_LIST_GET_FIRST(chain)->find_metadata();
|
UT_LIST_GET_FIRST(chain)->find_metadata();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1415,7 +1431,8 @@ public:
|
|||||||
ulint n_open;
|
ulint n_open;
|
||||||
/** last time we noted n_open exceeding the limit; protected by mutex */
|
/** last time we noted n_open exceeding the limit; protected by mutex */
|
||||||
time_t n_open_exceeded_time;
|
time_t n_open_exceeded_time;
|
||||||
/** maximum persistent tablespace id that has ever been assigned */
|
/** maximum space id in the existing tables; on InnoDB startup this is
|
||||||
|
initialized based on the data dictionary contents */
|
||||||
uint32_t max_assigned_id;
|
uint32_t max_assigned_id;
|
||||||
/** nonzero if fil_node_open_file_low() should avoid moving the tablespace
|
/** nonzero if fil_node_open_file_low() should avoid moving the tablespace
|
||||||
to the end of space_list, for FIFO policy of try_to_close() */
|
to the end of space_list, for FIFO policy of try_to_close() */
|
||||||
@@ -1518,7 +1535,7 @@ template<bool have_reference> inline void fil_space_t::flush()
|
|||||||
{
|
{
|
||||||
mysql_mutex_assert_not_owner(&fil_system.mutex);
|
mysql_mutex_assert_not_owner(&fil_system.mutex);
|
||||||
ut_ad(!have_reference || (pending() & PENDING));
|
ut_ad(!have_reference || (pending() & PENDING));
|
||||||
ut_ad(purpose == FIL_TYPE_TABLESPACE || purpose == FIL_TYPE_IMPORT);
|
ut_ad(!is_temporary());
|
||||||
if (srv_file_flush_method == SRV_O_DIRECT_NO_FSYNC)
|
if (srv_file_flush_method == SRV_O_DIRECT_NO_FSYNC)
|
||||||
{
|
{
|
||||||
ut_ad(!is_in_unflushed_spaces);
|
ut_ad(!is_in_unflushed_spaces);
|
||||||
@@ -1641,7 +1658,7 @@ fil_ibd_create(
|
|||||||
uint32_t size,
|
uint32_t size,
|
||||||
fil_encryption_t mode,
|
fil_encryption_t mode,
|
||||||
uint32_t key_id,
|
uint32_t key_id,
|
||||||
dberr_t* err)
|
dberr_t* err) noexcept
|
||||||
MY_ATTRIBUTE((nonnull, warn_unused_result));
|
MY_ATTRIBUTE((nonnull, warn_unused_result));
|
||||||
|
|
||||||
/** Try to adjust FSP_SPACE_FLAGS if they differ from the expectations.
|
/** Try to adjust FSP_SPACE_FLAGS if they differ from the expectations.
|
||||||
@@ -1650,43 +1667,28 @@ fil_ibd_create(
|
|||||||
@param[in] flags desired tablespace flags */
|
@param[in] flags desired tablespace flags */
|
||||||
void fsp_flags_try_adjust(fil_space_t *space, uint32_t flags);
|
void fsp_flags_try_adjust(fil_space_t *space, uint32_t flags);
|
||||||
|
|
||||||
/********************************************************************//**
|
/**
|
||||||
Tries to open a single-table tablespace and optionally checks the space id is
|
Tries to open a single-table tablespace and optionally checks the space id is
|
||||||
right in it. If does not succeed, prints an error message to the .err log. This
|
right in it. If does not succeed, prints an error message to the .err log. This
|
||||||
function is used to open a tablespace when we start up mysqld, and also in
|
function is used to open a tablespace when we start up mysqld, and also in
|
||||||
IMPORT TABLESPACE.
|
IMPORT TABLESPACE.
|
||||||
NOTE that we assume this operation is used either at the database startup
|
|
||||||
or under the protection of dict_sys.latch, so that two users cannot
|
|
||||||
race here. This operation does not leave the file associated with the
|
|
||||||
tablespace open, but closes it after we have looked at the space id in it.
|
|
||||||
|
|
||||||
If the validate boolean is set, we read the first page of the file and
|
NOTE that we assume this operation is used either at the database
|
||||||
check that the space id in the file is what we expect. We assume that
|
startup or under the protection of MDL, to prevent concurrent access
|
||||||
this function runs much faster if no check is made, since accessing the
|
to the same tablespace.
|
||||||
file inode probably is much faster (the OS caches them) than accessing
|
|
||||||
the first page of the file. This boolean may be initially false, but if
|
|
||||||
a remote tablespace is found it will be changed to true.
|
|
||||||
|
|
||||||
@param[in] validate 0=maybe missing, 1=do not validate, 2=validate
|
@param id tablespace identifier
|
||||||
@param[in] purpose FIL_TYPE_TABLESPACE or FIL_TYPE_TEMPORARY
|
@param flags expected FSP_SPACE_FLAGS
|
||||||
@param[in] id tablespace ID
|
@param validate how to validate files
|
||||||
@param[in] flags expected FSP_SPACE_FLAGS
|
@param name the table name in databasename/tablename format
|
||||||
@param[in] name table name
|
@param path_in expected filepath, usually read from dictionary
|
||||||
If file-per-table, it is the table name in the databasename/tablename format
|
@param err DB_SUCCESS or error code
|
||||||
@param[in] path_in expected filepath, usually read from dictionary
|
|
||||||
@param[out] err DB_SUCCESS or error code
|
|
||||||
@return tablespace
|
@return tablespace
|
||||||
@retval NULL if the tablespace could not be opened */
|
@retval nullptr if the tablespace could not be opened */
|
||||||
fil_space_t*
|
fil_space_t *fil_ibd_open(uint32_t id, uint32_t flags,
|
||||||
fil_ibd_open(
|
fil_space_t::validate validate,
|
||||||
unsigned validate,
|
|
||||||
fil_type_t purpose,
|
|
||||||
uint32_t id,
|
|
||||||
uint32_t flags,
|
|
||||||
fil_space_t::name_type name,
|
fil_space_t::name_type name,
|
||||||
const char* path_in,
|
const char *path_in, dberr_t *err= nullptr) noexcept;
|
||||||
dberr_t* err = NULL)
|
|
||||||
MY_ATTRIBUTE((warn_unused_result));
|
|
||||||
|
|
||||||
enum fil_load_status {
|
enum fil_load_status {
|
||||||
/** The tablespace file(s) were found and valid. */
|
/** The tablespace file(s) were found and valid. */
|
||||||
|
@@ -201,9 +201,9 @@ struct fts_trx_t {
|
|||||||
|
|
||||||
/** Information required for transaction savepoint handling. */
|
/** Information required for transaction savepoint handling. */
|
||||||
struct fts_savepoint_t {
|
struct fts_savepoint_t {
|
||||||
char* name; /*!< First entry is always NULL, the
|
const void* name; /*!< First entry is always NULL, the
|
||||||
default instance. Otherwise the name
|
default instance. Otherwise the
|
||||||
of the savepoint */
|
savepoint */
|
||||||
|
|
||||||
ib_rbt_t* tables; /*!< Modified FTS tables */
|
ib_rbt_t* tables; /*!< Modified FTS tables */
|
||||||
};
|
};
|
||||||
@@ -666,7 +666,7 @@ void
|
|||||||
fts_savepoint_take(
|
fts_savepoint_take(
|
||||||
/*===============*/
|
/*===============*/
|
||||||
fts_trx_t* fts_trx, /*!< in: fts transaction */
|
fts_trx_t* fts_trx, /*!< in: fts transaction */
|
||||||
const char* name); /*!< in: savepoint name */
|
const void* name); /*!< in: savepoint */
|
||||||
|
|
||||||
/**********************************************************************//**
|
/**********************************************************************//**
|
||||||
Refresh last statement savepoint. */
|
Refresh last statement savepoint. */
|
||||||
@@ -681,7 +681,7 @@ void
|
|||||||
fts_savepoint_release(
|
fts_savepoint_release(
|
||||||
/*==================*/
|
/*==================*/
|
||||||
trx_t* trx, /*!< in: transaction */
|
trx_t* trx, /*!< in: transaction */
|
||||||
const char* name); /*!< in: savepoint name */
|
const void* name); /*!< in: savepoint */
|
||||||
|
|
||||||
/** Clear cache.
|
/** Clear cache.
|
||||||
@param[in,out] cache fts cache */
|
@param[in,out] cache fts cache */
|
||||||
@@ -702,7 +702,7 @@ void
|
|||||||
fts_savepoint_rollback(
|
fts_savepoint_rollback(
|
||||||
/*===================*/
|
/*===================*/
|
||||||
trx_t* trx, /*!< in: transaction */
|
trx_t* trx, /*!< in: transaction */
|
||||||
const char* name); /*!< in: savepoint name */
|
const void* name); /*!< in: savepoint */
|
||||||
|
|
||||||
/*********************************************************************//**
|
/*********************************************************************//**
|
||||||
Rollback to and including savepoint indentified by name. */
|
Rollback to and including savepoint indentified by name. */
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user