Skip to content

Commit 53aabda

Browse files
committed
Merge 10.4 into 10.5
2 parents f614b6e + ba679ae commit 53aabda

File tree

8 files changed

+33
-26
lines changed

8 files changed

+33
-26
lines changed

extra/wolfssl/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@ IF(MSVC)
1212
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
1313
IF(CMAKE_C_COMPILER_ID MATCHES GNU AND CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
1414
MESSAGE_ONCE(NO_INTEL_ASSEMBLY "Disable Intel assembly for WolfSSL - compiler is too old")
15+
ELSEIF(WITH_MSAN)
16+
MESSAGE_ONCE(MSAN_CANT_HANDLE_IT
17+
"Disable Intel assembly for WolfSSL - MSAN can't handle it")
1518
ELSE()
1619
MY_CHECK_C_COMPILER_FLAG(-maes)
1720
MY_CHECK_C_COMPILER_FLAG(-msse4)
1821
MY_CHECK_C_COMPILER_FLAG(-mpclmul)
19-
ENDIF()
20-
IF(have_C__maes AND have_C__msse4 AND have_C__mpclmul)
21-
SET(WOLFSSL_INTELASM ON)
22+
IF(have_C__maes AND have_C__msse4 AND have_C__mpclmul)
23+
SET(WOLFSSL_INTELASM ON)
24+
ENDIF()
2225
ENDIF()
2326
ENDIF()
2427
ENDIF()

sql/mysql_install_db.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,12 @@ static int create_myini()
364364

365365
static const char update_root_passwd_part1[]=
366366
"UPDATE mysql.global_priv SET priv=json_set(priv,"
367+
"'$.password_last_changed', UNIX_TIMESTAMP(),"
367368
"'$.plugin','mysql_native_password',"
368369
"'$.authentication_string',PASSWORD(";
369370
static const char update_root_passwd_part2[]=
370371
")) where User='root';\n";
371-
static const char remove_default_user_cmd[]=
372+
static const char remove_default_user_cmd[]=
372373
"DELETE FROM mysql.user where User='';\n";
373374
static const char allow_remote_root_access_cmd[]=
374375
"CREATE TEMPORARY TABLE tmp_user LIKE global_priv;\n"

sql/rpl_parallel.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,7 @@ rpl_parallel_thread::inuse_relaylog_refcount_update()
17771777
inuse_relaylog *ir= accumulated_ir_last;
17781778
if (ir)
17791779
{
1780-
my_atomic_add64(&ir->dequeued_count, accumulated_ir_count);
1780+
ir->dequeued_count+= accumulated_ir_count;
17811781
accumulated_ir_count= 0;
17821782
accumulated_ir_last= NULL;
17831783
}

sql/rpl_rli.cc

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Copyright (c) 2006, 2017, Oracle and/or its affiliates.
2-
Copyright (c) 2010, 2017, MariaDB Corporation
2+
Copyright (c) 2010, 2020, MariaDB Corporation.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -1437,32 +1437,27 @@ Relay_log_info::alloc_inuse_relaylog(const char *name)
14371437
uint32 gtid_count;
14381438
rpl_gtid *gtid_list;
14391439

1440-
if (!(ir= (inuse_relaylog *)my_malloc(PSI_INSTRUMENT_ME, sizeof(*ir),
1441-
MYF(MY_WME|MY_ZEROFILL))))
1442-
{
1443-
my_error(ER_OUTOFMEMORY, MYF(0), (int)sizeof(*ir));
1444-
return 1;
1445-
}
14461440
gtid_count= relay_log_state.count();
14471441
if (!(gtid_list= (rpl_gtid *)my_malloc(PSI_INSTRUMENT_ME,
14481442
sizeof(*gtid_list)*gtid_count, MYF(MY_WME))))
14491443
{
1450-
my_free(ir);
14511444
my_error(ER_OUTOFMEMORY, MYF(0), (int)sizeof(*gtid_list)*gtid_count);
14521445
return 1;
14531446
}
1447+
if (!(ir= new inuse_relaylog(this, gtid_list, gtid_count, name)))
1448+
{
1449+
my_free(gtid_list);
1450+
my_error(ER_OUTOFMEMORY, MYF(0), (int) sizeof(*ir));
1451+
return 1;
1452+
}
14541453
if (relay_log_state.get_gtid_list(gtid_list, gtid_count))
14551454
{
14561455
my_free(gtid_list);
1457-
my_free(ir);
1456+
delete ir;
14581457
DBUG_ASSERT(0 /* Should not be possible as we allocated correct length */);
14591458
my_error(ER_OUT_OF_RESOURCES, MYF(0));
14601459
return 1;
14611460
}
1462-
ir->rli= this;
1463-
strmake_buf(ir->name, name);
1464-
ir->relay_log_state= gtid_list;
1465-
ir->relay_log_state_count= gtid_count;
14661461

14671462
if (!inuse_relaylog_list)
14681463
inuse_relaylog_list= ir;
@@ -1481,7 +1476,7 @@ void
14811476
Relay_log_info::free_inuse_relaylog(inuse_relaylog *ir)
14821477
{
14831478
my_free(ir->relay_log_state);
1484-
my_free(ir);
1479+
delete ir;
14851480
}
14861481

14871482

sql/rpl_rli.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,10 +608,20 @@ struct inuse_relaylog {
608608
/* Number of events in this relay log queued for worker threads. */
609609
int64 queued_count;
610610
/* Number of events completed by worker threads. */
611-
volatile int64 dequeued_count;
611+
Atomic_counter<int64> dequeued_count;
612612
/* Set when all events have been read from a relaylog. */
613613
bool completed;
614614
char name[FN_REFLEN];
615+
616+
inuse_relaylog(Relay_log_info *rli_arg, rpl_gtid *relay_log_state_arg,
617+
uint32 relay_log_state_count_arg,
618+
const char *name_arg):
619+
next(0), rli(rli_arg), relay_log_state(relay_log_state_arg),
620+
relay_log_state_count(relay_log_state_count_arg), queued_count(0),
621+
dequeued_count(0), completed(false)
622+
{
623+
strmake_buf(name, name_arg);
624+
}
615625
};
616626

617627

sql/select_handler.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2018, 2019 MariaDB
2+
Copyright (c) 2018, 2020, MariaDB
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by

sql/sql_parse.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9138,8 +9138,8 @@ kill_one_thread(THD *thd, longlong id, killed_state kill_signal, killed_type typ
91389138
else
91399139
error= (type == KILL_TYPE_QUERY ? ER_KILL_QUERY_DENIED_ERROR :
91409140
ER_KILL_DENIED_ERROR);
9141-
mysql_mutex_unlock(&tmp->LOCK_thd_kill);
91429141
if (WSREP(tmp)) mysql_mutex_unlock(&tmp->LOCK_thd_data);
9142+
mysql_mutex_unlock(&tmp->LOCK_thd_kill);
91439143
}
91449144
DBUG_PRINT("exit", ("%d", error));
91459145
DBUG_RETURN(error);

storage/federatedx/federatedx_pushdown.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2019 MariaDB
2+
Copyright (c) 2019, 2020, MariaDB
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -295,10 +295,8 @@ int ha_federatedx_select_handler::end_scan()
295295

296296
DBUG_RETURN(0);
297297
}
298-
\
298+
299299
void ha_federatedx_select_handler::print_error(int error, myf error_flag)
300300
{
301301
select_handler::print_error(error, error_flag);
302302
}
303-
304-

0 commit comments

Comments
 (0)