Skip to content

Commit 7564be1

Browse files
committed
Merge branch '10.4' into 10.5
2 parents 5da492c + 2a46b35 commit 7564be1

File tree

111 files changed

+3375
-1511
lines changed

Some content is hidden

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

111 files changed

+3375
-1511
lines changed

extra/innochecksum.cc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,11 +1193,15 @@ print_summary(
11931193
fprintf(fil_out, "index_id\t#pages\t\t#leaf_pages\t#recs_per_page"
11941194
"\t#bytes_per_page\n");
11951195

1196-
for (std::map<unsigned long long, per_index_stats>::const_iterator it = index_ids.begin();
1197-
it != index_ids.end(); it++) {
1198-
const per_index_stats& index = it->second;
1196+
for (const auto &ids : index_ids) {
1197+
const per_index_stats& index = ids.second;
1198+
if (!index.pages) {
1199+
DBUG_ASSERT(index.free_pages);
1200+
continue;
1201+
}
1202+
11991203
fprintf(fil_out, "%lld\t\t%lld\t\t%lld\t\t%lld\t\t%lld\n",
1200-
it->first, index.pages, index.leaf_pages,
1204+
ids.first, index.pages, index.leaf_pages,
12011205
index.total_n_recs / index.pages,
12021206
index.total_data_bytes / index.pages);
12031207
}

extra/wolfssl/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ IF(WOLFSSL_X86_64_BUILD)
147147
LIST(APPEND WOLFCRYPT_SOURCES ${WOLFCRYPT_SRCDIR}/cpuid.c)
148148
IF(MSVC)
149149
SET(WOLFSSL_AESNI 1)
150-
LIST(APPEND WOLFCRYPT_SOURCES ${WOLFCRYPT_SRCDIR}/aes_asm.asm)
150+
LIST(APPEND WOLFCRYPT_SOURCES
151+
${WOLFCRYPT_SRCDIR}/aes_asm.asm
152+
${WOLFCRYPT_SRCDIR}/aes_gcm_asm.asm)
151153
IF(CMAKE_C_COMPILER_ID MATCHES Clang)
152154
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes -msse4.2 -mpclmul -mrdrnd -mrdseed")
153155
ENDIF()

extra/wolfssl/wolfssl

Submodule wolfssl updated 1037 files

include/m_string.h

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,30 @@ static inline void lex_string_set3(LEX_CSTRING *lex_str, const char *c_str,
250250
static inline int safe_strcpy(char *dst, size_t dst_size, const char *src)
251251
{
252252
DBUG_ASSERT(dst_size > 0);
253-
/* Note, strncpy will zerofill end of dst if src shorter than dst_size */
253+
254+
/* 1) IF there is a 0 byte in the first dst_size bytes of src, strncpy will
255+
* 0-terminate dst, and pad dst with additional 0 bytes out to dst_size.
256+
*
257+
* 2) IF there is no 0 byte in the first dst_size bytes of src, strncpy will
258+
* copy dst_size bytes, and the final byte won't be 0.
259+
*
260+
* In GCC 8+, the `-Wstringop-truncation` warning will object to strncpy()
261+
* being used in this way, so we need to disable this warning for this
262+
* single statement.
263+
*/
264+
265+
#if defined(__GNUC__) && __GNUC__ >= 8
266+
#pragma GCC diagnostic push
267+
#pragma GCC diagnostic ignored "-Wstringop-truncation"
268+
#endif
254269
strncpy(dst, src, dst_size);
270+
#if defined(__GNUC__) && __GNUC__ >= 8
271+
#pragma GCC diagnostic pop
272+
#endif
273+
255274
if (dst[dst_size-1])
256275
{
257-
/* Ensure string is zero terminated */
276+
/* Only possible in case (2), meaning src was truncated. */
258277
dst[dst_size-1]= 0;
259278
return 1;
260279
}

include/my_base.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ enum ha_base_keytype {
446446
#define HA_ERR_CRASHED126/* Indexfile is crashed */
447447
#define HA_ERR_WRONG_IN_RECORD127/* Record-file is crashed */
448448
#define HA_ERR_OUT_OF_MEM128/* Out of memory */
449+
#define HA_ERR_RETRY_INIT 129 /* Initialization failed and should be retried */
449450
#define HA_ERR_NOT_A_TABLE 130 /* not a MYI file - no signature */
450451
#define HA_ERR_WRONG_COMMAND131/* Command not supported */
451452
#define HA_ERR_OLD_FILE132/* old databasfile */

include/mysql_com.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ enum enum_indicator_type
281281
#define CLIENT_DEPRECATE_EOF (1ULL << 24)
282282

283283
#define CLIENT_PROGRESS_OBSOLETE (1ULL << 29)
284-
#define CLIENT_SSL_VERIFY_SERVER_CERT (1ULL << 30)
284+
#define CLIENT_SSL_VERIFY_SERVER_CERT_OBSOLETE (1ULL << 30)
285285
/*
286286
It used to be that if mysql_real_connect() failed, it would delete any
287287
options set by the client, unless the CLIENT_REMEMBER_OPTIONS flag was
@@ -334,7 +334,6 @@ enum enum_indicator_type
334334
CLIENT_MULTI_STATEMENTS | \
335335
CLIENT_MULTI_RESULTS | \
336336
CLIENT_PS_MULTI_RESULTS | \
337-
CLIENT_SSL_VERIFY_SERVER_CERT | \
338337
CLIENT_REMEMBER_OPTIONS | \
339338
MARIADB_CLIENT_PROGRESS | \
340339
CLIENT_PLUGIN_AUTH | \
@@ -352,9 +351,8 @@ enum enum_indicator_type
352351
If any of the optional flags is supported by the build it will be switched
353352
on before sending to the client during the connection handshake.
354353
*/
355-
#define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \
356-
& ~CLIENT_COMPRESS) \
357-
& ~CLIENT_SSL_VERIFY_SERVER_CERT)
354+
#define CLIENT_BASIC_FLAGS ((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \
355+
& ~CLIENT_COMPRESS)
358356

359357
enum mariadb_field_attr_t
360358
{

include/sql_common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ struct st_mysql_options_extention {
4444
struct mysql_async_context *async_context;
4545
HASH connection_attributes;
4646
size_t connection_attributes_length;
47+
my_bool tls_verify_server_cert;
4748
};
4849

4950
typedef struct st_mysql_methods

libmariadb

mysql-test/main/cte_recursive.result

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5799,4 +5799,52 @@ a a
57995799
9 9
58005800
10 10
58015801
drop table t1;
5802+
#
5803+
# MDEV-20010 Equal on two RANK window functions create wrong result
5804+
#
5805+
create table t1 (a int, b int) engine= innodb;
5806+
insert into t1 values (4, -2), (3, -1);
5807+
SELECT RANK() OVER (ORDER BY D.C) = RANK() OVER (ORDER BY B.a) FROM
5808+
(SELECT 5 AS C FROM t1) as D, (SELECT t1.b AS A FROM t1) AS B;
5809+
RANK() OVER (ORDER BY D.C) = RANK() OVER (ORDER BY B.a)
5810+
1
5811+
1
5812+
0
5813+
0
5814+
select b, rank() over (order by c) , rank() over (order by dt1.b)
5815+
from
5816+
(select 5 as c from t1) as dt,
5817+
(select b from t1) as dt1;
5818+
b rank() over (order by c) rank() over (order by dt1.b)
5819+
-2 1 1
5820+
-2 1 1
5821+
-1 1 3
5822+
-1 1 3
5823+
select b, rank() over (order by c) , rank() over (order by dt1.b),
5824+
rank() over (order by c) = rank() over (order by dt1.b)
5825+
from
5826+
(select 5 as c from t1) as dt,
5827+
(select b from t1) as dt1;
5828+
b rank() over (order by c) rank() over (order by dt1.b) rank() over (order by c) = rank() over (order by dt1.b)
5829+
-2 1 1 1
5830+
-2 1 1 1
5831+
-1 1 3 0
5832+
-1 1 3 0
5833+
alter table t1 engine=myisam;
5834+
select b, rank() over (order by c) , rank() over (order by dt1.b)
5835+
from
5836+
(select 5 as c from t1) as dt,
5837+
(select b from t1) as dt1;
5838+
b rank() over (order by c) rank() over (order by dt1.b)
5839+
-2 1 1
5840+
-2 1 1
5841+
-1 1 3
5842+
-1 1 3
5843+
create view v1 as select b,5 as c from t1;
5844+
select b, rank() over (order by c) from v1 order by b;
5845+
b rank() over (order by c)
5846+
-2 1
5847+
-1 1
5848+
drop view v1;
5849+
drop table t1;
58025850
# End of 10.4 tests

mysql-test/main/cte_recursive.test

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# This is too slow on MSAN
33
--source include/not_msan.inc
44
--source include/not_valgrind.inc
5+
--source include/have_innodb.inc
56

67
create table t1 (a int, b varchar(32));
78
insert into t1 values
@@ -4016,4 +4017,37 @@ with cte_e as (
40164017

40174018
drop table t1;
40184019

4020+
--echo #
4021+
--echo # MDEV-20010 Equal on two RANK window functions create wrong result
4022+
--echo #
4023+
4024+
create table t1 (a int, b int) engine= innodb;
4025+
insert into t1 values (4, -2), (3, -1);
4026+
4027+
SELECT RANK() OVER (ORDER BY D.C) = RANK() OVER (ORDER BY B.a) FROM
4028+
(SELECT 5 AS C FROM t1) as D, (SELECT t1.b AS A FROM t1) AS B;
4029+
4030+
select b, rank() over (order by c) , rank() over (order by dt1.b)
4031+
from
4032+
(select 5 as c from t1) as dt,
4033+
(select b from t1) as dt1;
4034+
4035+
select b, rank() over (order by c) , rank() over (order by dt1.b),
4036+
rank() over (order by c) = rank() over (order by dt1.b)
4037+
from
4038+
(select 5 as c from t1) as dt,
4039+
(select b from t1) as dt1;
4040+
4041+
alter table t1 engine=myisam;
4042+
select b, rank() over (order by c) , rank() over (order by dt1.b)
4043+
from
4044+
(select 5 as c from t1) as dt,
4045+
(select b from t1) as dt1;
4046+
4047+
create view v1 as select b,5 as c from t1;
4048+
select b, rank() over (order by c) from v1 order by b;
4049+
4050+
drop view v1;
4051+
drop table t1;
4052+
40194053
--echo # End of 10.4 tests

0 commit comments

Comments
 (0)