Skip to content

Commit 61dd397

Browse files
committed
Merge tag 'clone-5.7.29-build' into mysql-5.7-cluster-7.5
Change-Id: I1f088da44c4a67d46e00f04f2bdbc4e1a92dde78
2 parents ef2fa9e + 81689d3 commit 61dd397

File tree

110 files changed

+3295
-606
lines changed

Some content is hidden

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

110 files changed

+3295
-606
lines changed

LICENSE

+20-92
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,6 @@ PSF LICENSE AGREEMENT FOR PYTHON 2.7.11
588588
8. By copying, installing or otherwise using Python 2.7.11, Licensee agrees
589589
to be bound by the terms and conditions of this License Agreement.
590590

591-
592591
Boost Library
593592

594593
The following software may be included in this product:
@@ -1014,71 +1013,6 @@ OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
10141013
ARISING OUT OF OR IN CONNECTION WITH THE USE OR
10151014
PERFORMANCE OF THIS SOFTWARE.
10161015

1017-
Some files are:
1018-
Copyright (c) 1998 The NetBSD Foundation, Inc.
1019-
All rights reserved.
1020-
1021-
This code is derived from software contributed to The NetBSD
1022-
Foundation by Christos Zoulas.
1023-
1024-
Redistribution and use in source and binary forms, with or
1025-
without modification, are permitted provided that the following
1026-
conditions
1027-
are met:
1028-
1. Redistributions of source code must retain the above copyright
1029-
notice, this list of conditions and the following disclaimer.
1030-
2. Redistributions in binary form must reproduce the above
1031-
copyright notice, this list of conditions and the following
1032-
disclaimer in the documentation and/or other materials provided
1033-
with the distribution.
1034-
1035-
THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
1036-
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1037-
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1038-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1039-
DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
1040-
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
1041-
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
1042-
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
1043-
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
1044-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
1045-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
1046-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1047-
1048-
Some files are:
1049-
Copyright (c) 2009 The NetBSD Foundation, Inc.
1050-
All rights reserved.
1051-
1052-
Redistribution and use in source and binary forms, with or without
1053-
modification, are permitted provided that the following conditions
1054-
are met:
1055-
1. Redistributions of source code must retain the above copyright
1056-
notice, this list of conditions and the following disclaimer.
1057-
2. Redistributions in binary form must reproduce the above copyright
1058-
notice, this list of conditions and the following disclaimer in the
1059-
documentation and/or other materials provided with the
1060-
distribution.
1061-
3. All advertising materials mentioning features or use of this
1062-
software must display the following acknowledgement:
1063-
This product includes software developed by the NetBSD
1064-
Foundation, Inc. and its contributors.
1065-
4. Neither the name of The NetBSD Foundation nor the names of its
1066-
contributors may be used to endorse or promote products derived
1067-
from this software without specific prior written permission.
1068-
1069-
THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
1070-
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1071-
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1072-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1073-
DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
1074-
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
1075-
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
1076-
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
1077-
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
1078-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
1079-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
1080-
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1081-
10821016
Facebook Fast Checksum Patch
10831017

10841018
The following software may be included in this product:
@@ -1968,7 +1902,6 @@ SUCH DAMAGE.
19681902
libevent
19691903

19701904
The following software may be included in this product:
1971-
19721905
Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
19731906
Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
19741907

@@ -2036,7 +1969,6 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20361969
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20371970
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20381971

2039-
20401972
libgcc & libstdc++ Libraries
20411973

20421974
The following software may be included in this product:
@@ -3904,32 +3836,30 @@ LZ4
39043836

39053837
The following software may be included in this product:
39063838
LZ4 Library
3907-
Copyright (c) 2011-2014, Yann Collet
3839+
Copyright (c) 2011-2016, Yann Collet
39083840
All rights reserved.
39093841

39103842
Redistribution and use in source and binary forms, with or without
3911-
modification, are permitted provided that the following conditions
3912-
are met:
3843+
modification, are permitted provided that the following conditions are met:
39133844

3914-
* Redistributions of source code must retain the above copyright
3915-
notice, this list of conditions and the following disclaimer.
3845+
* Redistributions of source code must retain the above copyright notice,
3846+
this list of conditions and the following disclaimer.
39163847

3917-
* Redistributions in binary form must reproduce the above copyright
3918-
notice, this list of conditions and the following disclaimer in the
3919-
documentation and/or other materials provided with the distribution.
3848+
* Redistributions in binary form must reproduce the above copyright notice,
3849+
this list of conditions and the following disclaimer in the documentation
3850+
and/or other materials provided with the distribution.
39203851

3921-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3922-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3923-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
3924-
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
3925-
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
3926-
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
3927-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3928-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3929-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3930-
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
3931-
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3932-
POSSIBILITY OF SUCH DAMAGE.
3852+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
3853+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3854+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3855+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
3856+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAG
3857+
ES
3858+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
3859+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
3860+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3861+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3862+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39333863

39343864
md5 (Message-Digest Algorithm 5)
39353865

@@ -4688,16 +4618,14 @@ OpenSSL License
46884618

46894619
The OpenSSL toolkit stays under a double license, i.e. both the conditions of
46904620
the OpenSSL License and the original SSLeay license apply to the toolkit.
4691-
See below for the actual license texts. Actually both licenses are BSD-style
4692-
Open Source licenses. In case of any license issues related to OpenSSL
4693-
please contact openssl-core@openssl.org.
4621+
See below for the actual license texts.
46944622

46954623
OpenSSL License
46964624
---------------
46974625

46984626
/* ====================================================================
46994627

4700-
* Copyright (c) 1998-2017 The OpenSSL Project. All rights reserved.
4628+
* Copyright (c) 1998-2019 The OpenSSL Project. All rights reserved.
47014629
*
47024630

47034631
* Redistribution and use in source and binary forms, with or without

README

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
1+
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
22

33
This is a release of MySQL, an SQL database server.
44

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
MYSQL_VERSION_MAJOR=5
22
MYSQL_VERSION_MINOR=7
3-
MYSQL_VERSION_PATCH=28
3+
MYSQL_VERSION_PATCH=29
44
MYSQL_VERSION_EXTRA=-ndb-7.5.17

client/dump/mysql_crawler.cc

-7
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,6 @@ void Mysql_crawler::enumerate_views(const Database& db)
277277
const Mysql::Tools::Base::Mysql_query_runner::Row& is_view= **view_it;
278278
if (is_view[0] == "1")
279279
{
280-
/* Check if view dependent objects exists */
281-
if (runner->run_query(std::string("LOCK TABLES ")
282-
+ this->get_quoted_object_full_name(db.get_name(), table_name)
283-
+ " READ") != 0)
284-
return;
285-
else
286-
runner->run_query(std::string("UNLOCK TABLES"));
287280
View* view= new View(this->generate_new_object_id(),
288281
table_name,
289282
db.get_name(),

client/dump/mysqldump_tool_chain_maker.cc

+29-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2015, 2019 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, version 2.0,
@@ -31,6 +31,8 @@
3131
#include "sql_formatter.h"
3232
#include "mysqldump_tool_chain_maker_options.h"
3333
#include <boost/algorithm/string.hpp>
34+
#include "view.h"
35+
#include "m_ctype.h"
3436

3537
using namespace Mysql::Tools::Dump;
3638

@@ -52,12 +54,35 @@ I_object_reader* Mysqldump_tool_chain_maker::create_chain(
5254
{
5355
return NULL;
5456
}
55-
if (!m_options->is_object_included_in_dump(
56-
dynamic_cast<Abstract_data_object*>(
57-
dump_task->get_related_db_object())))
57+
58+
Abstract_data_object* object= dynamic_cast<Abstract_data_object*>(
59+
dump_task->get_related_db_object());
60+
if (!m_options->is_object_included_in_dump(object))
5861
{
5962
return NULL;
6063
}
64+
/*
65+
View dependency check is moved post filteration. This will ensure that
66+
only filtered out views will be checked for their dependecies. This
67+
allows mysqlpump to dump a database even when there exsits an invalid
68+
view in another database which user is not interested to dump. I_S views
69+
are skipped from this check.
70+
*/
71+
if (object && (dynamic_cast<View*>(object) != NULL) &&
72+
my_strcasecmp(&my_charset_latin1, object->get_schema().c_str(),
73+
INFORMATION_SCHEMA_DB_NAME))
74+
{
75+
Mysql::Tools::Base::Mysql_query_runner* runner= this->get_runner();
76+
/* Check if view dependent objects exists */
77+
if (runner->run_query(std::string("LOCK TABLES ")
78+
+ this->get_quoted_object_full_name(object->get_schema(),
79+
object->get_name()) + " READ") != 0)
80+
return NULL;
81+
else
82+
runner->run_query(std::string("UNLOCK TABLES"));
83+
delete runner;
84+
}
85+
6186
if (m_main_object_reader == NULL)
6287
{
6388
I_output_writer* writer;

include/mysql_com.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2000, 2019, 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, version 2.0,
@@ -620,6 +620,7 @@ ulong STDCALL net_field_length_checked(uchar **packet, ulong max_length);
620620
my_ulonglong net_field_length_ll(uchar **packet);
621621
uchar *net_store_length(uchar *pkg, ulonglong length);
622622
unsigned int net_length_size(ulonglong num);
623+
unsigned int net_field_length_size(const unsigned char *pos);
623624
#endif
624625

625626
#ifdef __cplusplus

include/welcome_copyright_notice.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2010, 2019, 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, version 2.0,
@@ -23,7 +23,7 @@
2323
#ifndef _welcome_copyright_notice_h_
2424
#define _welcome_copyright_notice_h_
2525

26-
#define COPYRIGHT_NOTICE_CURRENT_YEAR "2019"
26+
#define COPYRIGHT_NOTICE_CURRENT_YEAR "2020"
2727

2828
/*
2929
This define specifies copyright notice which is displayed by every MySQL

mysql-test/include/escape_sql.inc

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# ==== Purpose ====
2+
#
3+
# Escape occurences of " or ' in a string, in order to be used inside
4+
# an SQL statement.
5+
#
6+
# ==== Usage ====
7+
#
8+
# --let $escape_string= String
9+
# [--let $enclosing_char= "|' (default is ")]
10+
# --source include/escape_sql.inc
11+
# --echo $escape_string
12+
#
13+
# Parameters:
14+
# $escape_string
15+
# String to search for occurences of the $enclosing_char and
16+
# escape them according to SQL syntax. It is also the output
17+
# parameter.
18+
19+
# $enclosing_char
20+
# The character that will be used to enclose $escape_string when
21+
# included in an SQL statement.
22+
#
23+
24+
if (!$escape_string)
25+
{
26+
--die Error: set $escape_string before sourcing escape_sql.inc
27+
}
28+
29+
if ($escape_string != '')
30+
{
31+
--let $_enclosing_char= "
32+
if ($enclosing_char)
33+
{
34+
--let $_enclosing_char= $enclosing_char
35+
}
36+
37+
38+
--let $_output_filename= `SELECT UUID()`
39+
--let $_output_filename= $MYSQLTEST_VARDIR/tmp/$_output_filename
40+
--let full_output_filename= $_output_filename
41+
--let to_replace= $escape_string
42+
--let used_quote= $_enclosing_char
43+
44+
perl;
45+
my $out= $ENV{'full_output_filename'};
46+
my $to_replace= $ENV{'to_replace'};
47+
my $quote= $ENV{'used_quote'};
48+
49+
$to_replace =~ s/$quote/$quote$quote/g;
50+
51+
open(FILE, ">", $out) or die "Error $? opening $output_filename: $!";
52+
print FILE $to_replace or die "Error $? writing to $output_filename: $!";
53+
close FILE or die "Error $? closing $output_filename: $!";
54+
chmod 0777, $out;
55+
EOF
56+
57+
--let $escape_string= `SELECT LOAD_FILE('$_output_filename')`
58+
}
59+
# Cleanup
60+
--remove_file $_output_filename
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
--let $mi_repo= `SELECT @@GLOBAL.master_info_repository='FILE'`
2+
--let $rli_repo= `SELECT @@GLOBAL.relay_log_info_repository='FILE'`
3+
4+
if (`SELECT $mi_repo = 1 OR $rli_repo = 1`)
5+
{
6+
--skip Test runs only when slave repository type = TABLE
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#
2+
# Test that $query correctly checks read_only flag even if this
3+
# flag is set while the query is blocked waiting for protection
4+
# global read lock. Used by test for bug#28438114 in read_only.test.
5+
#
6+
7+
--enable_connect_log
8+
connection default;
9+
FLUSH TABLES WITH READ LOCK;
10+
11+
connection con1;
12+
--echo # DDL statement will block waiting for GRL.
13+
--send_eval $query
14+
15+
connection con2;
16+
--echo # Wait until statement is blocked waiting for GRL.
17+
let $wait_condition=
18+
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
19+
WHERE STATE = "Waiting for global read lock";
20+
--source include/wait_condition.inc
21+
SET GLOBAL READ_ONLY= 1;
22+
23+
connection default;
24+
--echo # Unblock the DDL statement.
25+
UNLOCK TABLES;
26+
27+
connection con1;
28+
--echo # Without patch for BUG#28438114, the DDL statement will succeed even
29+
--echo # though read only mode was set.
30+
--error ER_OPTION_PREVENTS_STATEMENT
31+
--reap
32+
33+
--echo # Clean up.
34+
connection default;
35+
SET GLOBAL READ_ONLY= 0;
36+
--disable_connect_log

mysql-test/include/show_slave_status.inc

+9
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,15 @@ while ($_show_slave_status_items)
100100
--let $_show_slave_status_items= `SELECT LTRIM(SUBSTRING('$_show_slave_status_items', LENGTH('$_show_slave_status_name') + 2))`
101101

102102
--let $_show_slave_status_value= query_get_value($show_slave_status_cmd, $_show_slave_status_name, 1)
103+
104+
if ($_show_slave_status_value)
105+
{
106+
--let $escape_string= $_show_slave_status_value
107+
--let $enclosing_char= "
108+
--source include/escape_sql.inc
109+
--let $_show_slave_status_value= $escape_string
110+
}
111+
103112
--let $_slave_field_result_replace= /[\\]/\// $slave_field_result_replace
104113
--replace_regex $_slave_field_result_replace
105114
--let $_show_slave_status_value= `SELECT REPLACE("$_show_slave_status_value", '$MYSQL_TEST_DIR', 'MYSQL_TEST_DIR')`

0 commit comments

Comments
 (0)