Skip to content

Commit 648cf71

Browse files
author
Jan Lindström
committed
Merge remote-tracking branch 'origin/5.5-galera' into 10.0-galera
2 parents 7b11518 + 1ecd68d commit 648cf71

File tree

118 files changed

+1536
-473
lines changed

Some content is hidden

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

118 files changed

+1536
-473
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ scripts/mytop
114114
scripts/wsrep_sst_common
115115
scripts/wsrep_sst_mysqldump
116116
scripts/wsrep_sst_rsync
117+
scripts/wsrep_sst_rsync_wan
117118
scripts/wsrep_sst_xtrabackup
118119
scripts/wsrep_sst_xtrabackup-v2
119120
sql-bench/bench-count-distinct

extra/yassl/src/handshake.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,16 @@ int DoProcessReply(SSL& ssl)
788788
needHdr = true;
789789
else {
790790
buffer >> hdr;
791+
/*
792+
According to RFC 4346 (see "7.4.1.3. Server Hello"), the Server Hello
793+
packet needs to specify the highest supported TLS version, but not
794+
higher than what client requests. YaSSL highest supported version is
795+
TLSv1.1 (=3.2) - if the client requests a higher version, downgrade it
796+
here to 3.2.
797+
See also Appendix E of RFC 5246 (TLS 1.2)
798+
*/
799+
if (hdr.version_.major_ == 3 && hdr.version_.minor_ > 2)
800+
hdr.version_.minor_ = 2;
791801
ssl.verifyState(hdr);
792802
}
793803

include/heap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ typedef struct st_heap_share
144144
uint key_version; /* Updated on key change */
145145
uint file_version; /* Update on clear */
146146
uint reclength; /* Length of one record */
147+
uint visible; /* Offset to the visible/deleted mark */
147148
uint changed;
148149
uint keys,max_key_length;
149150
uint currently_disabled_keys; /* saved value from "keys" when disabled */

include/my_valgrind.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
# define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len)
3636
#elif defined(__SANITIZE_ADDRESS__)
3737
# include <sanitizer/asan_interface.h>
38+
/* How to do manual poisoning:
39+
https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning */
3840
# define MEM_UNDEFINED(a,len) ASAN_UNPOISON_MEMORY_REGION(a,len)
3941
# define MEM_NOACCESS(a,len) ASAN_POISON_MEMORY_REGION(a,len)
4042
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)

include/mysql_com.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
2-
Copyright (c) 2010, 2013, Monty Program Ab
2+
Copyright (c) 2010, 2018, 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

include/sql_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef SQL_COMMON_INCLUDED
22
#define SQL_COMMON_INCLUDED
33
/* Copyright (c) 2003, 2012, Oracle and/or its affiliates.
4-
Copyright (c) 2010, 2012, Monty Program Ab
4+
Copyright (c) 2010, 2018, MariaDB
55
66
This program is free software; you can redistribute it and/or modify
77
it under the terms of the GNU General Public License as published by

mysql-test/mysql-test-run.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- cperl -*-
33

44
# Copyright (c) 2004, 2014, Oracle and/or its affiliates.
5-
# Copyright (c) 2009, 2017, MariaDB Corporation
5+
# Copyright (c) 2009, 2018, MariaDB Corporation
66
#
77
# This program is free software; you can redistribute it and/or modify
88
# it under the terms of the GNU General Public License as published by

mysql-test/r/connect_debug.result

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
set @old_dbug=@@global.debug_dbug;
2+
set global debug_dbug='+d,auth_disconnect';
3+
create user 'bad' identified by 'worse';
4+
set global debug_dbug=@old_dbug;
5+
drop user bad;

mysql-test/r/ctype_ucs.result

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4590,6 +4590,37 @@ Field Type Null Key Default Extra
45904590
c1 mediumtext YES NULL
45914591
DROP TABLE t1;
45924592
#
4593+
# MDEV-15624 Changing the default character set to utf8mb4 changes query evaluation in a very surprising way
4594+
#
4595+
SET NAMES utf8;
4596+
CREATE TABLE t1 (id INT);
4597+
INSERT INTO t1 VALUES (1),(2),(3);
4598+
SELECT COUNT(DISTINCT c) FROM (SELECT id, REPLACE(uuid_short(), '0', CAST('o' AS CHAR CHARACTER SET ucs2)) AS c FROM t1) AS d1;
4599+
COUNT(DISTINCT c)
4600+
3
4601+
SELECT DISTINCT REPLACE(uuid_short(), '0', CAST('o' AS CHAR CHARACTER SET ucs2)) AS c FROM t1;
4602+
c
4603+
xxxxxxxxxxxxxxxxx
4604+
xxxxxxxxxxxxxxxxx
4605+
xxxxxxxxxxxxxxxxx
4606+
SELECT COUNT(DISTINCT c) FROM (SELECT id, INSERT(uuid_short(), 1, 1, CAST('0' AS CHAR CHARACTER SET ucs2)) AS c FROM t1) AS d1;
4607+
COUNT(DISTINCT c)
4608+
3
4609+
SELECT DISTINCT INSERT(uuid_short(), 1, 1, CAST('0' AS CHAR CHARACTER SET ucs2)) AS c FROM t1;
4610+
c
4611+
xxxxxxxxxxxxxxxxx
4612+
xxxxxxxxxxxxxxxxx
4613+
xxxxxxxxxxxxxxxxx
4614+
SELECT COUNT(DISTINCT c) FROM (SELECT id, CONCAT(uuid_short(), CAST('0' AS CHAR CHARACTER SET ucs2)) AS c FROM t1) AS d1;
4615+
COUNT(DISTINCT c)
4616+
3
4617+
SELECT DISTINCT CONCAT(uuid_short(), CAST('0' AS CHAR CHARACTER SET ucs2)) AS c FROM t1;
4618+
c
4619+
xxxxxxxxxxxxxxxxx
4620+
xxxxxxxxxxxxxxxxx
4621+
xxxxxxxxxxxxxxxxx
4622+
DROP TABLE t1;
4623+
#
45934624
# End of 5.5 tests
45944625
#
45954626
#

mysql-test/r/ctype_utf8mb4.result

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2859,6 +2859,29 @@ SELECT LENGTH(data) AS len FROM (SELECT REPEAT('☃', 65536) AS data ) AS sub;
28592859
len
28602860
196608
28612861
#
2862+
# MDEV-15624 Changing the default character set to utf8mb4 changes query evaluation in a very surprising way
2863+
#
2864+
SET NAMES utf8mb4;
2865+
CREATE TABLE t1 (id INT);
2866+
INSERT INTO t1 VALUES (1),(2),(3);
2867+
SELECT COUNT(DISTINCT c) FROM (SELECT id, REPLACE(UUID(), "-", "") AS c FROM t1) AS d1;
2868+
COUNT(DISTINCT c)
2869+
3
2870+
SELECT DISTINCT INSERT(uuid(), 9, 1, "X") AS c FROM t1;
2871+
c
2872+
xxxxxxxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
2873+
xxxxxxxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
2874+
xxxxxxxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
2875+
SELECT COUNT(DISTINCT c) FROM (SELECT id, INSERT(UUID(), 9, 1, "X") AS c FROM t1) AS d1;
2876+
COUNT(DISTINCT c)
2877+
3
2878+
SELECT DISTINCT INSERT(UUID(), 9, 1, "X") AS c FROM t1;
2879+
c
2880+
xxxxxxxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
2881+
xxxxxxxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
2882+
xxxxxxxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx
2883+
DROP TABLE t1;
2884+
#
28622885
# End of 5.5 tests
28632886
#
28642887
#

0 commit comments

Comments
 (0)