Skip to content

Commit 189c3f8

Browse files
committed
Merge branch 'mysql-5.6-cluster-7.3' into mysql-5.6-cluster-7.4
(Merge tag 'clone-5.6.36-build' into mysql-5.6-cluster-7.3 This is the periodic Server down-merge)
2 parents c97a400 + 2912c6c commit 189c3f8

File tree

214 files changed

+6685
-1999
lines changed

Some content is hidden

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

214 files changed

+6685
-1999
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.gitattributes export-ignore
2+
.gitignore export-ignore

CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -288,12 +288,9 @@ IF (WITH_ASAN)
288288
ENDIF()
289289
ENDIF()
290290

291-
292-
OPTION(ENABLE_DEBUG_SYNC "Enable debug sync (debug builds only)" ON)
293-
IF(ENABLE_DEBUG_SYNC)
294-
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
295-
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
296-
ENDIF()
291+
# Always enable debug sync for debug builds.
292+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
293+
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
297294

298295
# Older versions of ccache must be disabled: export CCACHE_DISABLE=1
299296
# See http://www.cmake.org/Uncyclo/CTest/Coverage
@@ -514,6 +511,7 @@ IF(NOT WITHOUT_SERVER)
514511
ADD_SUBDIRECTORY(packaging/rpm-fedora)
515512
ADD_SUBDIRECTORY(packaging/rpm-sles)
516513
ADD_SUBDIRECTORY(packaging/rpm-docker)
514+
ADD_SUBDIRECTORY(packaging/deb-in)
517515
ENDIF()
518516

519517
INCLUDE(cmake/abi_check.cmake)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
MYSQL_VERSION_MAJOR=5
22
MYSQL_VERSION_MINOR=6
3-
MYSQL_VERSION_PATCH=35
3+
MYSQL_VERSION_PATCH=36
44
MYSQL_VERSION_EXTRA=-ndb-7.4.15

client/mysql.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
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
@@ -2630,7 +2630,7 @@ C_MODE_END
26302630
if not.
26312631
*/
26322632

2633-
#if defined(USE_NEW_READLINE_INTERFACE)
2633+
#if defined(USE_NEW_EDITLINE_INTERFACE)
26342634
static int fake_magic_space(int, int);
26352635
extern "C" char *no_completion(const char*,int)
26362636
#elif defined(USE_LIBEDIT_INTERFACE)
@@ -2712,7 +2712,7 @@ static int not_in_history(const char *line)
27122712
}
27132713

27142714

2715-
#if defined(USE_NEW_READLINE_INTERFACE)
2715+
#if defined(USE_NEW_EDITLINE_INTERFACE)
27162716
static int fake_magic_space(int, int)
27172717
#else
27182718
static int fake_magic_space(const char *, int)
@@ -2729,7 +2729,7 @@ static void initialize_readline (char *name)
27292729
rl_readline_name = name;
27302730

27312731
/* Tell the completer that we want a crack first. */
2732-
#if defined(USE_NEW_READLINE_INTERFACE)
2732+
#if defined(USE_NEW_EDITLINE_INTERFACE)
27332733
rl_attempted_completion_function= (rl_completion_func_t*)&new_mysql_completion;
27342734
rl_completion_entry_function= (rl_compentry_func_t*)&no_completion;
27352735

@@ -2759,7 +2759,7 @@ static char **new_mysql_completion(const char *text,
27592759
int end MY_ATTRIBUTE((unused)))
27602760
{
27612761
if (!status.batch && !quick)
2762-
#if defined(USE_NEW_READLINE_INTERFACE)
2762+
#if defined(USE_NEW_EDITLINE_INTERFACE)
27632763
return rl_completion_matches(text, new_command_generator);
27642764
#else
27652765
return completion_matches((char *)text, (CPFunction *)new_command_generator);

client/mysqltest.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -35,6 +35,7 @@
3535
#include <my_dir.h>
3636
#include <hash.h>
3737
#include <stdarg.h>
38+
#include <string>
3839
#include <violite.h>
3940
#include "my_regex.h" /* Our own version of regex */
4041
#ifdef HAVE_SYS_WAIT_H
@@ -52,6 +53,7 @@
5253

5354
using std::min;
5455
using std::max;
56+
using std::string;
5557

5658
#ifdef __WIN__
5759
#include <crtdbg.h>
@@ -4237,7 +4239,11 @@ void do_perl(struct st_command *command)
42374239
die("Failed to create temporary file for perl command");
42384240
my_close(fd, MYF(0));
42394241

4240-
str_to_file(temp_file_path, ds_script.str, ds_script.length);
4242+
/* Compatibility for Perl 5.24 and newer. */
4243+
string script = "push @INC, \".\";\n";
4244+
script.append(ds_script.str, ds_script.length);
4245+
4246+
str_to_file(temp_file_path, &script[0], script.size());
42414247

42424248
/* Format the "perl <filename>" command */
42434249
my_snprintf(buf, sizeof(buf), "perl %s", temp_file_path);

cmake/os/SunOS.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -21,6 +21,7 @@ INCLUDE(CheckCSourceCompiles)
2121
IF(NOT FORCE_UNSUPPORTED_COMPILER)
2222
IF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
2323
# CC -V yields
24+
# CC: Studio 12.6 Sun C++ 5.15 SunOS_sparc Beta 2016/12/19
2425
# CC: Studio 12.5 Sun C++ 5.14 SunOS_sparc Dodona 2016/04/04
2526
# CC: Sun C++ 5.13 SunOS_sparc Beta 2014/03/11
2627
# CC: Sun C++ 5.11 SunOS_sparc 2010/08/13
@@ -32,7 +33,7 @@ IF(NOT FORCE_UNSUPPORTED_COMPILER)
3233
)
3334
STRING(REGEX MATCH "CC: Sun C\\+\\+ 5\\.([0-9]+)" VERSION_STRING ${stderr})
3435
IF (NOT CMAKE_MATCH_1 OR CMAKE_MATCH_1 STREQUAL "")
35-
STRING(REGEX MATCH "CC: Studio 12\\.5 Sun C\\+\\+ 5\\.([0-9]+)"
36+
STRING(REGEX MATCH "CC: Studio 12\\.[56] Sun C\\+\\+ 5\\.([0-9]+)"
3637
VERSION_STRING ${stderr})
3738
ENDIF()
3839
SET(CC_MINOR_VERSION ${CMAKE_MATCH_1})

cmake/os/Windows.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -65,6 +65,7 @@ IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4)
6565
ENDIF()
6666

6767
IF(MSVC)
68+
OPTION(LINK_STATIC_RUNTIME_LIBRARIES "Link with /MT" OFF)
6869
# Enable debug info also in Release build,
6970
# and create PDB to be able to analyze crashes.
7071
FOREACH(type EXE SHARED MODULE)
@@ -94,7 +95,9 @@ IF(MSVC)
9495
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
9596
CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
9697
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT)
97-
STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}")
98+
IF(LINK_STATIC_RUNTIME_LIBRARIES)
99+
STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}")
100+
ENDIF()
98101
STRING(REPLACE "/Zi" "/Z7" "${flag}" "${${flag}}")
99102
SET("${flag}" "${${flag}} /EHsc")
100103
ENDFOREACH()

cmake/readline.cmake

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -179,12 +179,28 @@ MACRO (FIND_SYSTEM_EDITLINE)
179179
completion_matches(0,0);
180180
return res;
181181
}"
182-
EDITLINE_HAVE_COMPLETION)
182+
EDITLINE_HAVE_COMPLETION_INT)
183183

184-
IF(EDITLINE_HAVE_COMPLETION)
184+
CHECK_CXX_SOURCE_COMPILES("
185+
#include <stdio.h>
186+
#include <readline.h>
187+
int main(int argc, char **argv)
188+
{
189+
typedef char* MYFunction(const char*, int);
190+
MYFunction* myf= rl_completion_entry_function;
191+
char *res= (myf)(NULL, 0);
192+
completion_matches(0,0);
193+
return res != NULL;
194+
}"
195+
EDITLINE_HAVE_COMPLETION_CHAR)
196+
197+
IF(EDITLINE_HAVE_COMPLETION_INT OR EDITLINE_HAVE_COMPLETION_CHAR)
185198
SET(HAVE_HIST_ENTRY ${EDITLINE_HAVE_HIST_ENTRY})
186199
SET(USE_LIBEDIT_INTERFACE 1)
187200
SET(EDITLINE_FOUND 1)
201+
IF(EDITLINE_HAVE_COMPLETION_CHAR)
202+
SET(USE_NEW_EDITLINE_INTERFACE 1)
203+
ENDIF()
188204
ENDIF()
189205
ENDIF()
190206
ENDMACRO()

config.h.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
22

33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -119,6 +119,7 @@
119119

120120
/* Readline */
121121
#cmakedefine HAVE_HIST_ENTRY 1
122+
#cmakedefine USE_NEW_EDITLINE_INTERFACE 1
122123
#cmakedefine USE_LIBEDIT_INTERFACE 1
123124

124125
#cmakedefine FIONREAD_IN_SYS_IOCTL 1

configure.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -153,6 +153,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND
153153
GET_FILENAME_COMPONENT(CXX_REALPATH ${CMAKE_CXX_COMPILER} REALPATH)
154154

155155
# CC -V yields
156+
# CC: Studio 12.6 Sun C++ 5.15 SunOS_sparc Beta 2016/12/19
156157
# CC: Studio 12.5 Sun C++ 5.14 SunOS_sparc Dodona 2016/04/04
157158
# CC: Sun C++ 5.13 SunOS_sparc Beta 2014/03/11
158159
# CC: Sun C++ 5.11 SunOS_sparc 2010/08/13
@@ -169,7 +170,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND
169170

170171
STRING(REGEX MATCH "CC: Sun C\\+\\+ 5\\.([0-9]+)" VERSION_STRING ${stderr})
171172
IF (NOT CMAKE_MATCH_1 OR CMAKE_MATCH_1 STREQUAL "")
172-
STRING(REGEX MATCH "CC: Studio 12\\.5 Sun C\\+\\+ 5\\.([0-9]+)"
173+
STRING(REGEX MATCH "CC: Studio 12\\.[56] Sun C\\+\\+ 5\\.([0-9]+)"
173174
VERSION_STRING ${stderr})
174175
ENDIF()
175176
SET(CC_MINOR_VERSION ${CMAKE_MATCH_1})

include/mysql_com.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#define USERNAME_CHAR_LENGTH 16
2727
#define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN)
2828
#define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXLEN)
29+
#define CONNECT_STRING_MAXLEN 1024
2930

3031
#define MYSQL_AUTODETECT_CHARSET_NAME "auto"
3132

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
# Smaller batch of weekly run for tier2 platforms
22
# Same as default.weekly, but all tests are run without big-test option.
33
# big-test runs were leading to sporadic failures in tier2 platforms
4-
# Comprises of the following
5-
# 1. Repeat of daily runs
6-
# 2. All suites in normal mode
7-
# 3. nist suite
8-
# 4. engine independant suite
9-
# 5. Covers debug and non-debug runs
10-
# 6. Covers all suites with Multi-Threaded-Slave and MIXED binlog-format
11-
# 7. Covers all suites with innodb-page-size=4k and 8k
124

13-
# Repeat daily run
14-
# big-test option for normal runs
15-
# Default suites (in modes binlog format stmt/mixed/row, parts), embedded and ps-protocol
5+
# Default suites (in modes binlog format stmt/mixed/row, parts)
166
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=normal-debug --vardir=var-normal-debug --report-features --skip-test-list=collections/disabled-daily.list --mysqld=--innodb_autoextend_increment=64 --unit-tests-report
177

188
# Run all default suites with embedded server
19-
# --debug-server is not used for embedded runs since debug build of embedded server is not available
9+
# --debug-server is not used for embedded runs
10+
# since debug build of embedded server is not available
2011
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-embedded --embedded-server
2112

2213
# Run default suites with ps protocol
@@ -47,23 +38,3 @@ perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=
4738
#Memcached tests
4839
perl mysql-test-run.pl --timer --force --debug-server --comment=memcached-debug --vardir=var-debug-memcached --experimental=collections/default.experimental --parallel=1 --retry=0 --suite=memcached --skip-test-list=collections/disabled-weekly.list
4940

50-
# Non debug runs of default suites in normal modes
51-
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=normal-non-debug --vardir=var-normal-non-debug --report-features --skip-test-list=collections/disabled-daily.list
52-
53-
54-
55-
# Multi-Thread Slave
56-
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=MTS-debug --vardir=var-MTS-debug --suite=rpl --experimental=collections/default.experimental --skip-test-list=collections/disabled-per-push.list --mysqld=--slave-parallel-workers=4 --mysqld=--slave-transaction-retries=0 --skip-test-list=collection/disabled-weekly.list
57-
58-
# Run all default suites with 4K page size
59-
perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=all_4k_size --vardir=var_all_4k_size --experimental=collections/default.experimental --skip-test-list=collections/disabled-per-push.list --mysqld=--innodb-page-size=4k
60-
61-
# Run all default suites with 8K page size
62-
perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=all_8k_size --vardir=var-all_8k_size --experimental=collections/default.experimental --skip-test-list=collections/disabled-per-push.list --mysqld=--innodb-page-size=8k
63-
64-
65-
66-
# Additional run to test rpl HASH_SCAN & INDEX_SCAN
67-
perl mysql-test-run.pl --force --debug-server --timer --parallel=auto --experimental=collections/default.experimental --comment=binlog_rpl_row_hash_scan --vardir=var-binlog_rpl_row_hash_scan --mysqld=--binlog-format=row --suite=binlog,rpl --mysqld=--slave-rows-search-algorithms=HASH_SCAN,INDEX_SCAN --skip-test-list=collection/disabled-weekly.list
68-
perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=rpl_binlog_row_hash_MTS --vardir=var-mts-rpl-binlog-hash-n_mix --mysqld=--binlog-format=row --experimental=collections/default.experimental --mysqld=--slave-parallel-workers=4 --mysqld=--slave-transaction-retries=0 --suite=rpl,binlog -mysqld=--slave-rows-search-algorithms=HASH_SCAN,INDEX_SCAN --skip-test-list=collection/disabled-weekly.list
69-

mysql-test/mysql-test-run.pl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/perl
22
# -*- cperl -*-
33

4-
# Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
4+
# Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
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
@@ -100,6 +100,8 @@ BEGIN
100100
use IO::Socket::INET;
101101
use IO::Select;
102102

103+
push @INC, ".";
104+
103105
require "lib/mtr_process.pl";
104106
require "lib/mtr_io.pl";
105107
require "lib/mtr_gcov.pl";
@@ -5966,16 +5968,14 @@ ($)
59665968
my $mysqld_basedir= $mysqld->value('basedir');
59675969
if ( $basedir eq $mysqld_basedir )
59685970
{
5969-
if (! $opt_start_dirty) # If dirty, keep possibly grown system db
5971+
if (!$opt_start_dirty) # If dirty, keep possibly grown system db
59705972
{
5971-
# Copy datadir from installed system db
5972-
for my $path ( "$opt_vardir", "$opt_vardir/..") {
5973-
my $install_db= "$path/install.db";
5974-
copytree($install_db, $datadir)
5975-
if -d $install_db;
5976-
}
5977-
mtr_error("Failed to copy system db to '$datadir'")
5978-
unless -d $datadir;
5973+
# Copy datadir from installed system db
5974+
my $path= ($opt_parallel == 1) ? "$opt_vardir" : "$opt_vardir/..";
5975+
my $install_db= "$path/install.db";
5976+
copytree($install_db, $datadir) if -d $install_db;
5977+
mtr_error("Failed to copy system db to '$datadir'")
5978+
unless -d $datadir;
59795979
}
59805980
}
59815981
else

mysql-test/r/distinct.result

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,3 +982,16 @@ LIMIT 1;
982982
t3_date
983983
NULL
984984
DROP TABLE t1,t2,t3;
985+
#
986+
# Bug#22686994 REGRESSION FOR A GROUPING QUERY WITH DISTINCT
987+
#
988+
CREATE TABLE t1 (a INTEGER, b INTEGER);
989+
INSERT INTO t1 VALUES (1,3), (2,4), (1,5),
990+
(1,3), (2,1), (1,5), (1,7), (3,1),
991+
(3,2), (3,1), (2,4);
992+
SELECT DISTINCT (COUNT(DISTINCT b) + 1) AS c FROM t1 GROUP BY a;
993+
c
994+
4
995+
3
996+
DROP TABLE t1;
997+
# End of test for Bug#22686994

0 commit comments

Comments
 (0)