Skip to content

Commit ce991f1

Browse files
committed
Merge branch 'mysql-5.6-cluster-7.3' into mysql-5.6-cluster-7.4
Merge tag 'clone-5.6.52-build' into mysql-5.6-cluster-7.3 Change-Id: I57d86c0ceb9968485295b93cf157137020a0fdd6
2 parents 1ea4b28 + ce3aefd commit ce991f1

11 files changed

+99
-18
lines changed

LICENSE

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4975,6 +4975,42 @@ By Steve Reid <steve@edmweb.com>
49754975
======================================================================
49764976
======================================================================
49774977

4978+
Time Zone Information
4979+
4980+
Unless specified below, all files in the tz code and data (including this
4981+
LICENSE file) are in the public domain. If the files date.c,
4982+
newstrftime.3, and strftime.c are present, they contain material derived
4983+
from BSD and use the BSD 3-clause license. tzdata:
4984+
# This file is in the public domain, so clarified as of
4985+
# 2009-05-17 by Arthur David Olson.
4986+
/* Copyright 1985, 1987, 1988 The Regents of the University of California.
4987+
All rights reserved.
4988+
Redistribution and use in source and binary forms, with or without
4989+
modification, are permitted provided that the following conditions
4990+
are met:
4991+
1. Redistributions of source code must retain the above copyright
4992+
notice, this list of conditions and the following disclaimer.
4993+
2. Redistributions in binary form must reproduce the above copyright
4994+
notice, this list of conditions and the following disclaimer in the
4995+
documentation and/or other materials provided with the distribution.
4996+
3. Neither the name of the University nor the names of its contributors
4997+
may be used to endorse or promote products derived from this software
4998+
without specific prior written permission.
4999+
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND
5000+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5001+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5002+
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
5003+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5004+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
5005+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5006+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5007+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5008+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5009+
SUCH DAMAGE. */
5010+
5011+
======================================================================
5012+
======================================================================
5013+
49785014
Unicode Data Files
49795015

49805016
Unicode Data Files

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=51
3+
MYSQL_VERSION_PATCH=52
44
MYSQL_VERSION_EXTRA=-ndb-7.4.32

include/welcome_copyright_notice.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
#define ORACLE_WELCOME_COPYRIGHT_NOTICE(first_year) \
3333
(strcmp(first_year, COPYRIGHT_NOTICE_CURRENT_YEAR) ? \
3434
"Copyright (c) " first_year ", " COPYRIGHT_NOTICE_CURRENT_YEAR ", " \
35-
"Oracle and/or its affiliates. All rights reserved.\n\nOracle is a " \
35+
"Oracle and/or its affiliates.\n\nOracle is a " \
3636
"registered trademark of Oracle Corporation and/or its\naffiliates. " \
3737
"Other names may be trademarks of their respective\nowners.\n" : \
3838
"Copyright (c) " first_year ", Oracle and/or its affiliates. " \
39-
"All rights reserved.\n\nOracle is a registered trademark of " \
39+
"\n\nOracle is a registered trademark of " \
4040
"Oracle Corporation and/or its\naffiliates. Other names may be " \
4141
"trademarks of their respective\nowners.\n")
4242

mysql-test/r/mysql_config_editor.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ user = test_user4
100100
##############################################
101101
# Tests for mysql_config_editor's help command
102102
##############################################
103-
Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
103+
Copyright (c) 2012, 2021, Oracle and/or its affiliates.
104104

105105
Oracle is a registered trademark of Oracle Corporation and/or its
106106
affiliates. Other names may be trademarks of their respective

mysql-test/r/mysqld--help-win.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ myisam-sort-buffer-size 8388608
12011201
myisam-stats-method nulls_unequal
12021202
myisam-use-mmap FALSE
12031203
named-pipe FALSE
1204-
named-pipe-full-access-group *everyone*
1204+
named-pipe-full-access-group
12051205
net-buffer-length 16384
12061206
net-read-timeout 30
12071207
net-retry-count 10

mysql-test/suite/sys_vars/r/named_pipe_full_access_group_basic.result

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
select @@global.named_pipe_full_access_group;
22
@@global.named_pipe_full_access_group
3-
*everyone*
3+
44
select @@session.named_pipe_full_access_group;
55
ERROR HY000: Variable 'named_pipe_full_access_group' is a GLOBAL variable
66
show global variables like 'named_pipe_full_access_group';
77
Variable_name Value
8-
named_pipe_full_access_group *everyone*
8+
named_pipe_full_access_group
99
show session variables like 'named_pipe_full_access_group';
1010
Variable_name Value
11-
named_pipe_full_access_group *everyone*
11+
named_pipe_full_access_group
1212
set global named_pipe_full_access_group = NULL;
1313
show session variables like 'named_pipe_full_access_group';
1414
Variable_name Value
@@ -22,3 +22,4 @@ NAMED_PIPE_FULL_ACCESS_GROUP *everyone*
2222
select * from information_schema.session_variables where variable_name='named_pipe_full_access_group';
2323
VARIABLE_NAME VARIABLE_VALUE
2424
NAMED_PIPE_FULL_ACCESS_GROUP *everyone*
25+
set global named_pipe_full_access_group = default;

mysql-test/suite/sys_vars/t/named_pipe_full_access_group_basic.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ set global named_pipe_full_access_group = '*everyone*';
1515
select * from information_schema.global_variables where variable_name='named_pipe_full_access_group';
1616
select * from information_schema.session_variables where variable_name='named_pipe_full_access_group';
1717
--enable_warnings
18+
# Restore initial state
19+
set global named_pipe_full_access_group = default;
1820

sql/item.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2000, 2021, 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,
@@ -2919,7 +2919,7 @@ bool Item_field::eq(const Item *item, bool binary_cmp) const
29192919

29202920
table_map Item_field::used_tables() const
29212921
{
2922-
if (field->table->const_table)
2922+
if (!field || !field->table || field->table->const_table)
29232923
return 0; // const item
29242924
return (depended_from ? OUTER_REF_TABLE_BIT : field->table->map);
29252925
}

sql/named_pipe.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static bool check_windows_group_for_everyone(const char *group_name,
6969
return false;
7070
}
7171

72-
if (strcmp(group_name, DEFAULT_NAMED_PIPE_FULL_ACCESS_GROUP) == 0)
72+
if (strcmp(group_name, NAMED_PIPE_FULL_ACCESS_GROUP_EVERYONE) == 0)
7373
{
7474
*is_everyone_group= true;
7575
return false;
@@ -160,9 +160,9 @@ bool my_security_attr_add_rights_to_group(SECURITY_ATTRIBUTES *psa,
160160
}
161161
}
162162

163-
// Treat the DEFAULT_NAMED_PIPE_FULL_ACCESS_GROUP value
163+
// Treat the NAMED_PIPE_FULL_ACCESS_GROUP_EVERYONE value
164164
// as a special case: we convert it to the "world" SID
165-
if (strcmp(group_name, DEFAULT_NAMED_PIPE_FULL_ACCESS_GROUP) == 0)
165+
if (strcmp(group_name, NAMED_PIPE_FULL_ACCESS_GROUP_EVERYONE) == 0)
166166
{
167167
if (!CreateWellKnownSid(WinWorldSid, NULL, soughtSID, &size_sid))
168168
{

sql/named_pipe.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,6 @@ bool is_valid_named_pipe_full_access_group(const char *group_name);
4141
bool my_security_attr_add_rights_to_group(SECURITY_ATTRIBUTES *psa,
4242
const char *group_name,
4343
DWORD group_rights);
44-
#define DEFAULT_NAMED_PIPE_FULL_ACCESS_GROUP "*everyone*"
44+
#define DEFAULT_NAMED_PIPE_FULL_ACCESS_GROUP ""
45+
#define NAMED_PIPE_FULL_ACCESS_GROUP_EVERYONE "*everyone*"
4546
#endif /* NAMED_PIPE_INCLUDED */

sql/sql_yacc.yy

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2000, 2021, 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,
@@ -3112,10 +3112,22 @@ sp_decl:
31123112
uint num_vars= pctx->context_var_count();
31133113
enum enum_field_types var_type= (enum enum_field_types) $4;
31143114
Item *dflt_value_item= $5;
3115+
const bool has_default_clause = (dflt_value_item != NULL);
3116+
bool is_const_item = false;
3117+
31153118
LEX_STRING dflt_value_query= EMPTY_STR;
31163119

3117-
if (dflt_value_item)
3118-
{
3120+
if (has_default_clause) {
3121+
// Handling a NEG_FUNC wrapping a constant.
3122+
if (dflt_value_item->type() == Item::FUNC_ITEM) {
3123+
Item_func *func_item = (Item_func *) dflt_value_item;
3124+
if (func_item->functype() == Item_func::NEG_FUNC) {
3125+
is_const_item = true;
3126+
}
3127+
} else if (dflt_value_item->const_item()) {
3128+
is_const_item = true;
3129+
}
3130+
31193131
// sp_opt_default only pushes start ptr for DEFAULT clause.
31203132
const char *expr_start_ptr=
31213133
sp->m_parser_data.pop_expr_start_ptr();
@@ -3135,10 +3147,13 @@ sp_decl:
31353147
MYSQL_YYABORT;
31363148
}
31373149

3150+
sp_variable *first_spvar = NULL;
3151+
const uint first_var_num = num_vars - $2;
3152+
31383153
// We can have several variables in DECLARE statement.
31393154
// We need to create an sp_instr_set instruction for each variable.
31403155

3141-
for (uint i = num_vars-$2 ; i < num_vars ; i++)
3156+
for (uint i = first_var_num; i < num_vars; i++)
31423157
{
31433158
uint var_idx= pctx->var_context2runtime(i);
31443159
sp_variable *spvar= pctx->find_variable(var_idx);
@@ -3147,8 +3162,34 @@ sp_decl:
31473162
MYSQL_YYABORT;
31483163

31493164
spvar->type= var_type;
3165+
3166+
// Transforming the following declare statements having non-const
3167+
// expressions:
3168+
// DECLARE a, b, c type DEFAULT expr;
3169+
// to
3170+
// DECLARE a type DEFAULT expr, b type DEFAULT a,
3171+
// c type DEFAULT a;
3172+
3173+
if (i == first_var_num) {
3174+
first_spvar = spvar;
3175+
} else if (has_default_clause && !is_const_item) {
3176+
Item_splocal *item =
3177+
new (thd->mem_root)
3178+
Item_splocal(first_spvar->name, first_spvar->offset,
3179+
first_spvar->type, 0, 0);
3180+
if (item == NULL)
3181+
MYSQL_YYABORT; // OOM
3182+
#ifndef DBUG_OFF
3183+
item->m_sp = lex->sphead;
3184+
#endif
3185+
dflt_value_item = item;
3186+
}
31503187
spvar->default_value= dflt_value_item;
31513188

3189+
if (has_default_clause && !is_const_item && (i > first_var_num)) {
3190+
dflt_value_query = first_spvar->name;
3191+
}
3192+
31523193
if (fill_field_definition(thd, sp, var_type, &spvar->field_def))
31533194
MYSQL_YYABORT;
31543195

0 commit comments

Comments
 (0)