Skip to content

Commit 15700f5

Browse files
committed
Merge 11.4 into 11.7
2 parents bc32705 + 17f0118 commit 15700f5

File tree

552 files changed

+12645
-3554
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

552 files changed

+12645
-3554
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ENDIF()
3131
# in RPM's:
3232

3333
#set(CPACK_RPM_SPEC_MORE_DEFINE "%define __spec_install_post /bin/true")
34-
FOREACH(p CMP0022 CMP0046 CMP0040 CMP0048 CMP0054 CMP0074 CMP0075 CMP0069 CMP0135)
34+
FOREACH(p CMP0022 CMP0046 CMP0040 CMP0048 CMP0054 CMP0067 CMP0074 CMP0075 CMP0069 CMP0135)
3535
IF(POLICY ${p})
3636
CMAKE_POLICY(SET ${p} NEW)
3737
ENDIF()

client/mysql.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5338,6 +5338,9 @@ put_info(const char *str,INFO_TYPE info_type, uint error, const char *sqlstate)
53385338
}
53395339
if (!opt_silent || info_type == INFO_ERROR)
53405340
{
5341+
report_progress_end();
5342+
fflush(stdout);
5343+
53415344
if (!inited)
53425345
{
53435346
#ifdef HAVE_SETUPTERM

client/mysqltest.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9824,7 +9824,7 @@ void init_re(void)
98249824
//"[[:space:]]*CALL[[:space:]]|" // XXX run_query_stmt doesn't read multiple result sets
98259825
"[[:space:]]*CHANGE[[:space:]]|"
98269826
"[[:space:]]*CHECKSUM[[:space:]]|"
9827-
"[[:space:]]*COMMIT[[:space:]]|"
9827+
"[[:space:]]*COMMIT[[:space:]]*|"
98289828
"[[:space:]]*COMPOUND[[:space:]]|"
98299829
"[[:space:]]*CREATE[[:space:]]+DATABASE[[:space:]]|"
98309830
"[[:space:]]*CREATE[[:space:]]+INDEX[[:space:]]|"

cmake/dtrace.cmake

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,20 @@ FUNCTION(DTRACE_INSTRUMENT target)
125125
WORKING_DIRECTORY ${objdir}
126126
)
127127
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
128-
# dtrace on Linux runs gcc and uses flags from environment
129-
SET(CFLAGS_SAVED $ENV{CFLAGS})
130-
SET(ENV{CFLAGS} ${CMAKE_C_FLAGS})
128+
IF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
129+
# dtrace on Linux runs gcc and uses flags from environment
130+
SET(CFLAGS_SAVED $ENV{CFLAGS})
131+
SET(ENV{CFLAGS} ${CMAKE_C_FLAGS})
132+
ENDIF()
131133
SET(outfile "${CMAKE_BINARY_DIR}/probes_mysql.o")
132134
# Systemtap object
133135
EXECUTE_PROCESS(
134136
COMMAND ${DTRACE} -G -s ${CMAKE_SOURCE_DIR}/include/probes_mysql.d.base
135137
-o ${outfile}
136138
)
137-
SET(ENV{CFLAGS} ${CFLAGS_SAVED})
139+
IF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
140+
SET(ENV{CFLAGS} ${CFLAGS_SAVED})
141+
ENDIF()
138142
ENDIF()
139143

140144
# Do not try to extend the library if we have not built the .o file

cmake/mariadb_connector_c.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ ENDIF()
77
SET(CONC_WITH_SIGNCODE ${SIGNCODE})
88
SET(SIGN_OPTIONS ${SIGNTOOL_PARAMETERS})
99
SET(CONC_WITH_EXTERNAL_ZLIB ON)
10+
SET(CLIENT_PLUGIN_PARSEC OFF)
1011

1112
CHECK_INCLUDE_FILES (threads.h HAVE_THREADS_H)
1213
IF(HAVE_THREADS_H)

extra/mariabackup/backup_mysql.cc

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,12 @@ bool get_mysql_vars(MYSQL *connection)
459459

460460
msg("Using server version %s", version_var);
461461

462-
if (!(ret= detect_mysql_capabilities_for_backup()))
462+
if (opt_galera_info && !have_galera_enabled)
463463
{
464-
goto out;
464+
msg("--galera-info is specified on the command "
465+
"line, but the server does not support Galera "
466+
"replication. Ignoring the option.");
467+
opt_galera_info= false;
465468
}
466469

467470
/* make sure datadir value is the same in configuration file */
@@ -554,30 +557,6 @@ bool get_mysql_vars(MYSQL *connection)
554557
return (ret);
555558
}
556559

557-
/*********************************************************************//**
558-
Query the server to find out what backup capabilities it supports.
559-
@return true on success. */
560-
bool
561-
detect_mysql_capabilities_for_backup()
562-
{
563-
/* do some sanity checks */
564-
if (opt_galera_info && !have_galera_enabled) {
565-
msg("--galera-info is specified on the command "
566-
"line, but the server does not support Galera "
567-
"replication. Ignoring the option.");
568-
opt_galera_info = false;
569-
}
570-
571-
if (opt_slave_info && have_multi_threaded_slave &&
572-
!have_gtid_slave) {
573-
msg("The --slave-info option requires GTID enabled for a "
574-
"multi-threaded slave.");
575-
return(false);
576-
}
577-
578-
return(true);
579-
}
580-
581560
static
582561
bool
583562
select_incremental_lsn_from_history(lsn_t *incremental_lsn)

extra/mariabackup/backup_mysql.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ backup_cleanup();
4343
bool
4444
get_mysql_vars(MYSQL *connection);
4545

46-
bool
47-
detect_mysql_capabilities_for_backup();
48-
4946
MYSQL *
5047
xb_mysql_connect();
5148

extra/mariabackup/fil_cur.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ xb_fil_cur_open(
186186
}
187187
#else
188188
err = fstat(cursor->file.m_file, &cursor->statinfo);
189+
MSAN_STAT_WORKAROUND(&cursor->statinfo);
189190
#endif
190191
if (max_file_size < (ulonglong)cursor->statinfo.st_size) {
191192
cursor->statinfo.st_size = (ulonglong)max_file_size;

extra/mariabackup/xtrabackup.cc

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -915,13 +915,15 @@ datafiles_iter_next(datafiles_iter_t *it)
915915
fil_system.space_list.begin() :
916916
std::next(it->space);
917917

918-
while (it->space != fil_system.space_list.end() &&
919-
(it->space->purpose != FIL_TYPE_TABLESPACE ||
920-
UT_LIST_GET_LEN(it->space->chain) == 0))
918+
while (it->space != fil_system.space_list.end()
919+
&& UT_LIST_GET_LEN(it->space->chain) == 0)
921920
++it->space;
922921
if (it->space == fil_system.space_list.end())
923922
goto end;
924923

924+
ut_ad(!it->space->is_temporary());
925+
ut_ad(!it->space->is_being_imported());
926+
925927
it->node = UT_LIST_GET_FIRST(it->space->chain);
926928

927929
end:
@@ -1113,7 +1115,8 @@ static void backup_file_op(uint32_t space_id, int type,
11131115
std::string space_name = filename_to_spacename(name, len);
11141116
ddl_tracker.id_to_name[space_id] = space_name;
11151117
ddl_tracker.delete_defer(space_id, space_name);
1116-
msg("DDL tracking : create %u \"%.*s\"", space_id, int(len), name);
1118+
msg("DDL tracking : create %" PRIu32 " \"%.*s\"",
1119+
space_id, int(len), name);
11171120
}
11181121
break;
11191122
case FILE_MODIFY:
@@ -1129,15 +1132,16 @@ static void backup_file_op(uint32_t space_id, int type,
11291132
ddl_tracker.id_to_name[space_id] = new_space_name;
11301133
ddl_tracker.rename_defer(space_id, old_space_name,
11311134
new_space_name);
1132-
msg("DDL tracking : rename %u \"%.*s\",\"%.*s\"",
1135+
msg("DDL tracking : rename %" PRIu32 " \"%.*s\",\"%.*s\"",
11331136
space_id, int(len), name, int(new_len), new_name);
11341137
}
11351138
break;
11361139
case FILE_DELETE:
11371140
ddl_tracker.drops.insert(space_id);
11381141
ddl_tracker.delete_defer(
11391142
space_id, filename_to_spacename(name, len));
1140-
msg("DDL tracking : delete %u \"%.*s\"", space_id, int(len), name);
1143+
msg("DDL tracking : delete %" PRIu32 " \"%.*s\"",
1144+
space_id, int(len), name);
11411145
break;
11421146
default:
11431147
ut_ad(0);
@@ -1188,13 +1192,14 @@ static void backup_file_op_fail(uint32_t space_id, int type,
11881192
const std::string spacename{filename_to_spacename(name, len)};
11891193
switch (type) {
11901194
case FILE_CREATE:
1191-
msg("DDL tracking : create %u \"%.*s\"", space_id, int(len), name);
1195+
msg("DDL tracking : create %" PRIu32 " \"%.*s\"",
1196+
space_id, int(len), name);
11921197
fail = !check_if_skip_table(spacename.c_str());
11931198
break;
11941199
case FILE_MODIFY:
11951200
break;
11961201
case FILE_RENAME:
1197-
msg("DDL tracking : rename %u \"%.*s\",\"%.*s\"",
1202+
msg("DDL tracking : rename %" PRIu32 " \"%.*s\",\"%.*s\"",
11981203
space_id, int(len), name, int(new_len), new_name);
11991204
fail = !check_if_skip_table(spacename.c_str())
12001205
|| !check_if_skip_table(
@@ -1203,7 +1208,8 @@ static void backup_file_op_fail(uint32_t space_id, int type,
12031208
case FILE_DELETE:
12041209
fail = !check_if_skip_table(spacename.c_str())
12051210
&& !check_if_fts_table(spacename.c_str());
1206-
msg("DDL tracking : delete %u \"%.*s\"", space_id, int(len), name);
1211+
msg("DDL tracking : delete %" PRIu32 " \"%.*s\"",
1212+
space_id, int(len), name);
12071213
break;
12081214
default:
12091215
ut_ad(0);
@@ -1224,7 +1230,7 @@ static void backup_undo_trunc(uint32_t space_id)
12241230

12251231
/* Function to store the space id of page0 INIT_PAGE
12261232
@param space_id space id which has page0 init page */
1227-
static void backup_first_page_op(space_id_t space_id)
1233+
static void backup_first_page_op(uint32_t space_id)
12281234
{
12291235
first_page_init_ids.insert(space_id);
12301236
}
@@ -3955,8 +3961,8 @@ static void xb_load_single_table_tablespace(const char *dirname,
39553961
if (err == DB_SUCCESS && file->space_id() != SRV_TMP_SPACE_ID) {
39563962
mysql_mutex_lock(&fil_system.mutex);
39573963
space = fil_space_t::create(
3958-
file->space_id(), file->flags(),
3959-
FIL_TYPE_TABLESPACE, nullptr/* TODO: crypt_data */,
3964+
uint32_t(file->space_id()), file->flags(), false,
3965+
nullptr/* TODO: crypt_data */,
39603966
FIL_ENCRYPTION_DEFAULT,
39613967
file->handle() != OS_FILE_CLOSED);
39623968
ut_ad(space);
@@ -4173,6 +4179,7 @@ os_file_readdir_next_file(
41734179
return(-1);
41744180
}
41754181

4182+
MSAN_STAT_WORKAROUND(&statinfo);
41764183
info->size = statinfo.st_size;
41774184

41784185
if (S_ISDIR(statinfo.st_mode)) {
@@ -5691,8 +5698,8 @@ void CorruptedPages::backup_fix_ddl(ds_ctxt *ds_data, ds_ctxt *ds_meta)
56915698
iter != ddl_tracker.tables_in_backup.end();
56925699
iter++) {
56935700

5694-
const std::string name = iter->second;
56955701
uint32_t id = iter->first;
5702+
const std::string &name = iter->second;
56965703

56975704
if (ddl_tracker.drops.find(id) != ddl_tracker.drops.end()) {
56985705
dropped_tables.insert(name);
@@ -5719,7 +5726,7 @@ void CorruptedPages::backup_fix_ddl(ds_ctxt *ds_data, ds_ctxt *ds_meta)
57195726
iter++) {
57205727

57215728
uint32_t id = iter->first;
5722-
std::string name = iter->second;
5729+
const std::string &name = iter->second;
57235730

57245731
if (ddl_tracker.tables_in_backup.find(id) != ddl_tracker.tables_in_backup.end()) {
57255732
/* already processed above */
@@ -6016,8 +6023,8 @@ xb_delta_open_matching_space(
60166023

60176024
char tmpname[FN_REFLEN];
60186025

6019-
snprintf(tmpname, FN_REFLEN, "%s/xtrabackup_tmp_#%u",
6020-
dbname, fil_space->id);
6026+
snprintf(tmpname, FN_REFLEN, "%s/xtrabackup_tmp_#%"
6027+
PRIu32, dbname, fil_space->id);
60216028

60226029
msg("mariabackup: Renaming %s to %s.ibd",
60236030
fil_space->chain.start->name, tmpname);
@@ -6072,8 +6079,8 @@ xb_delta_open_matching_space(
60726079
ut_ad(fil_space_t::physical_size(flags) == info.page_size);
60736080

60746081
mysql_mutex_lock(&fil_system.mutex);
6075-
fil_space_t* space = fil_space_t::create(info.space_id, flags,
6076-
FIL_TYPE_TABLESPACE, 0,
6082+
fil_space_t* space = fil_space_t::create(uint32_t(info.space_id),
6083+
flags, false, 0,
60776084
FIL_ENCRYPTION_DEFAULT, true);
60786085
mysql_mutex_unlock(&fil_system.mutex);
60796086
if (space) {
@@ -6866,7 +6873,8 @@ static bool xtrabackup_prepare_func(char** argv)
68666873
srv_max_dirty_pages_pct_lwm = srv_max_buf_pool_modified_pct;
68676874
}
68686875

6869-
if (innodb_init()) {
6876+
recv_sys.recovery_on = false;
6877+
if (innodb_init()) {
68706878
goto error;
68716879
}
68726880

include/handler_ername.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,7 @@
7878
{ "HA_ERR_ABORTED_BY_USER", HA_ERR_ABORTED_BY_USER, "" },
7979
{ "HA_ERR_DISK_FULL", HA_ERR_DISK_FULL, "" },
8080
{ "HA_ERR_INCOMPATIBLE_DEFINITION", HA_ERR_INCOMPATIBLE_DEFINITION, "" },
81-
{ "HA_ERR_NO_ENCRYPTION", HA_ERR_NO_ENCRYPTION, "" },
8281
{ "HA_ERR_COMMIT_ERROR", HA_ERR_COMMIT_ERROR, "" },
82+
{ "HA_ERR_PARTITION_LIST", HA_ERR_PARTITION_LIST, ""},
83+
{ "HA_ERR_NO_ENCRYPTION", HA_ERR_NO_ENCRYPTION, ""},
84+
{ "HA_ERR_ROLLBACK", HA_ERR_ROLLBACK, "" },

0 commit comments

Comments
 (0)