Skip to content

Commit b3cdac9

Browse files
committed
Merge tag 'clone-5.5.55-build' into mysql-5.5-cluster-7.2
This is the periodic Server down-merge
2 parents 7a743bb + 19150f7 commit b3cdac9

34 files changed

+970
-215
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: 4 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
@@ -252,12 +252,9 @@ IF (WITH_ASAN)
252252
ENDIF()
253253
ENDIF()
254254

255-
256-
OPTION(ENABLE_DEBUG_SYNC "Enable debug sync (debug builds only)" ON)
257-
IF(ENABLE_DEBUG_SYNC)
258-
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
259-
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
260-
ENDIF()
255+
# Always enable debug sync for debug builds.
256+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
257+
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
261258

262259
OPTION(ENABLE_GCOV "Enable gcov (debug, Linux builds only)" OFF)
263260
IF (ENABLE_GCOV AND NOT WIN32 AND NOT APPLE)

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=5
3-
MYSQL_VERSION_PATCH=54
3+
MYSQL_VERSION_PATCH=55
44
MYSQL_VERSION_EXTRA=-ndb-7.2.28

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
@@ -64,6 +64,7 @@ IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4)
6464
ENDIF()
6565

6666
IF(MSVC)
67+
OPTION(LINK_STATIC_RUNTIME_LIBRARIES "Link with /MT" OFF)
6768
# Enable debug info also in Release build,
6869
# and create PDB to be able to analyze crashes.
6970
FOREACH(type EXE SHARED MODULE)
@@ -86,7 +87,9 @@ IF(MSVC)
8687
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
8788
CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
8889
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT)
89-
STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}")
90+
IF(LINK_STATIC_RUNTIME_LIBRARIES)
91+
STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}")
92+
ENDIF()
9093
STRING(REPLACE "/Zi" "/Z7" "${flag}" "${${flag}}")
9194
ENDFOREACH()
9295

include/mysql_com.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2000, 2016, 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
@@ -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

mysql-test/mysql-test-run.pl

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5768,16 +5768,14 @@ ($)
57685768
my $mysqld_basedir= $mysqld->value('basedir');
57695769
if ( $basedir eq $mysqld_basedir )
57705770
{
5771-
if (! $opt_start_dirty) # If dirty, keep possibly grown system db
5771+
if (!$opt_start_dirty) # If dirty, keep possibly grown system db
57725772
{
5773-
# Copy datadir from installed system db
5774-
for my $path ( "$opt_vardir", "$opt_vardir/..") {
5775-
my $install_db= "$path/install.db";
5776-
copytree($install_db, $datadir)
5777-
if -d $install_db;
5778-
}
5779-
mtr_error("Failed to copy system db to '$datadir'")
5780-
unless -d $datadir;
5773+
# Copy datadir from installed system db
5774+
my $path= ($opt_parallel == 1) ? "$opt_vardir" : "$opt_vardir/..";
5775+
my $install_db= "$path/install.db";
5776+
copytree($install_db, $datadir) if -d $install_db;
5777+
mtr_error("Failed to copy system db to '$datadir'")
5778+
unless -d $datadir;
57815779
}
57825780
}
57835781
else

mysql-test/r/loaddata.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ FIELDS ESCAPED BY '\\'
316316
TERMINATED BY ','
317317
ENCLOSED BY '"'
318318
LINES TERMINATED BY '\n' (c0, c2);
319-
ERROR HY000: Invalid column reference (v2.c0) in LOAD DATA
319+
ERROR HY000: Column 'c0' is not updatable
320320

321321
LOAD DATA INFILE '../../std_data/bug35469.dat' INTO TABLE v3
322322
FIELDS ESCAPED BY '\\'

mysql-test/r/log_tables-big.result

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
1+
set @@global.log_output = 'TABLE';
12
set session long_query_time=10;
23
select get_lock('bug27638', 1);
34
get_lock('bug27638', 1)
45
1
56
set session long_query_time=1;
6-
truncate table mysql.slow_log;
77
select get_lock('bug27638', 2);
88
get_lock('bug27638', 2)
99
0
10-
select if (query_time between '00:00:01' and '00:00:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log;
10+
select if (query_time >= '00:00:01', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log
11+
where sql_text = 'select get_lock(\'bug27638\', 2)';
1112
qt sql_text
1213
OK select get_lock('bug27638', 2)
13-
truncate table mysql.slow_log;
1414
select get_lock('bug27638', 60);
1515
get_lock('bug27638', 60)
1616
0
17-
select if (query_time between '00:00:59' and '00:01:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log;
17+
select if (query_time >= '00:00:59', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log
18+
where sql_text = 'select get_lock(\'bug27638\', 60)';
1819
qt sql_text
1920
OK select get_lock('bug27638', 60)
20-
truncate table mysql.slow_log;
2121
select get_lock('bug27638', 101);
2222
get_lock('bug27638', 101)
2323
0
24-
select if (query_time between '00:01:40' and '00:01:50', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log;
24+
select if (query_time >= '00:01:40', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log
25+
where sql_text = 'select get_lock(\'bug27638\', 101)';
2526
qt sql_text
2627
OK select get_lock('bug27638', 101)
2728
select release_lock('bug27638');
2829
release_lock('bug27638')
2930
1
31+
set @@global.log_output=default;

mysql-test/r/symlink.result

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,14 @@ t2 CREATE TABLE `t2` (
213213
PRIMARY KEY (`a`)
214214
) ENGINE=MyISAM DEFAULT CHARSET=latin1
215215
drop tables t1, t2;
216+
#
217+
# Test for bug #25514146 DB_NAME IS IGNORED WHEN CREATING TABLE
218+
# WITH DATA DIRECTORY
219+
#
220+
# Make sure we have no current database
221+
CREATE DATABASE x;
222+
USE x;
223+
DROP DATABASE x;
224+
CREATE TABLE test.t1(id INT(11)) ENGINE MYISAM
225+
DATA DIRECTORY "MYSQLTEST_VARDIR/tmp";
226+
DROP TABLE test.t1;

mysql-test/t/disabled.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ lowercase_table3 : Bug#11762269 2010-06-30 alik main.lowercase_table3 on
1313
read_many_rows_innodb : Bug#11748886 2010-11-15 mattiasj report already exists
1414
sum_distinct-big : Bug#11764126 2010-11-15 mattiasj was not tested
1515
archive-big : Bug#11817185 2011-03-10 Anitha Disabled since this leads to timeout on Solaris Sparc
16-
log_tables-big : Bug#11756699 2010-11-15 mattiasj report already exists
1716
mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 changes - eventum#41836
1817

1918
file_contents : bug#12585902 2013-05-21 Jonas - FILE_CONTENTS.TEST FAILS WHEN BUILDING FROM "BZR EXPORT", this is still broken, not sure why it's reenabled

mysql-test/t/loaddata.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ SELECT * FROM v2;
292292
DELETE FROM t1;
293293

294294
--echo
295-
--error ER_LOAD_DATA_INVALID_COLUMN
295+
--error ER_NONUPDATEABLE_COLUMN
296296
LOAD DATA INFILE '../../std_data/bug35469.dat' INTO TABLE v2
297297
FIELDS ESCAPED BY '\\'
298298
TERMINATED BY ','

mysql-test/t/log_tables-big.test

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# check that CSV engine was compiled in
88
--source include/have_csv.inc
99

10+
set @@global.log_output = 'TABLE';
11+
1012
connect (con1,localhost,root,,);
1113
connect (con2,localhost,root,,);
1214

@@ -18,18 +20,20 @@ set session long_query_time=10;
1820
select get_lock('bug27638', 1);
1921
connection con2;
2022
set session long_query_time=1;
21-
truncate table mysql.slow_log;
2223
select get_lock('bug27638', 2);
23-
select if (query_time between '00:00:01' and '00:00:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log;
24-
truncate table mysql.slow_log;
24+
select if (query_time >= '00:00:01', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log
25+
where sql_text = 'select get_lock(\'bug27638\', 2)';
2526
select get_lock('bug27638', 60);
26-
select if (query_time between '00:00:59' and '00:01:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log;
27-
truncate table mysql.slow_log;
27+
select if (query_time >= '00:00:59', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log
28+
where sql_text = 'select get_lock(\'bug27638\', 60)';
2829
select get_lock('bug27638', 101);
29-
select if (query_time between '00:01:40' and '00:01:50', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log;
30+
select if (query_time >= '00:01:40', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log
31+
where sql_text = 'select get_lock(\'bug27638\', 101)';
3032
connection con1;
3133
select release_lock('bug27638');
3234
connection default;
3335

3436
disconnect con1;
3537
disconnect con2;
38+
39+
set @@global.log_output=default;

mysql-test/t/symlink.test

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,3 +298,19 @@ show create table t1;
298298
create table t2 like t1;
299299
show create table t2;
300300
drop tables t1, t2;
301+
302+
--echo #
303+
--echo # Test for bug #25514146 DB_NAME IS IGNORED WHEN CREATING TABLE
304+
--echo # WITH DATA DIRECTORY
305+
--echo #
306+
307+
--echo # Make sure we have no current database
308+
CREATE DATABASE x;
309+
USE x;
310+
DROP DATABASE x;
311+
312+
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
313+
eval CREATE TABLE test.t1(id INT(11)) ENGINE MYISAM
314+
DATA DIRECTORY "$MYSQLTEST_VARDIR/tmp";
315+
316+
DROP TABLE test.t1;

mysql-test/valgrind.supp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or
44
# modify it under the terms of the GNU Library General Public
@@ -487,6 +487,15 @@
487487
fun:dl_open_worker
488488
}
489489

490+
{
491+
libc pthread_exit 9
492+
Memcheck:Leak
493+
fun:malloc
494+
fun:_dl_close_worker
495+
fun:_dl_close
496+
fun:_dl_catch_error
497+
}
498+
490499
#
491500
# This is seen internally in the system libraries on 64-bit RHAS3.
492501
#

packaging/rpm-oel/mysql.init

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,37 @@ prog="mysqld"
2323
STARTTIMEOUT=120
2424
STOPTIMEOUT=60
2525

26+
# Set in /etc/sysconfig/mysqld, will be passed to mysqld_safe
27+
MYSQLD_OPTS=
28+
2629
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
2730

2831
lockfile=/var/lock/subsys/$prog
2932

3033

31-
# extract value of a MySQL option from config files
32-
# Usage: get_mysql_option SECTION VARNAME DEFAULT
33-
# result is returned in $result
34+
# Extract value of a MySQL option from config files
35+
# Usage: get_mysql_option OPTION DEFAULT SECTION1 SECTION2 SECTIONN
36+
# Result is returned in $result
3437
# We use my_print_defaults which prints all options from multiple files,
3538
# with the more specific ones later; hence take the last match.
36-
get_mysql_option(){
37-
result=`/usr/bin/my_print_defaults "$1" | sed -n "s/^--$2=//p" | tail -n 1`
38-
if [ -z "$result" ]; then
39-
# not found, use default
40-
result="$3"
41-
fi
39+
get_mysql_option () {
40+
option=$1
41+
default=$2
42+
shift 2
43+
result=$(/usr/bin/my_print_defaults "$@" | sed -n "s/^--${option}=//p" | tail -n 1)
44+
if [ -z "$result" ]; then
45+
# not found, use default
46+
result="${default}"
47+
fi
4248
}
4349

44-
get_mysql_option mysqld datadir "/var/lib/mysql"
50+
get_mysql_option datadir "/var/lib/mysql" mysqld
4551
datadir="$result"
46-
get_mysql_option mysqld socket "$datadir/mysql.sock"
52+
get_mysql_option socket "$datadir/mysql.sock" mysqld
4753
socketfile="$result"
48-
get_mysql_option mysqld_safe log-error "/var/log/mysqld.log"
54+
get_mysql_option log-error "/var/log/mysqld.log" mysqld mysqld_safe
4955
errlogfile="$result"
50-
get_mysql_option mysqld_safe pid-file "/var/run/mysqld/mysqld.pid"
56+
get_mysql_option pid-file "/var/run/mysqld/mysqld.pid" mysqld mysqld_safe
5157
mypidfile="$result"
5258

5359
case $socketfile in
@@ -110,7 +116,7 @@ start(){
110116
# and some users might prefer to configure logging to syslog.)
111117
# Note: set --basedir to prevent probes that might trigger SELinux
112118
# alarms, per bug #547485
113-
$exec --datadir="$datadir" --socket="$socketfile" \
119+
$exec $MYSQLD_OPTS --datadir="$datadir" --socket="$socketfile" \
114120
--pid-file="$mypidfile" \
115121
--basedir=/usr --user=mysql >/dev/null &
116122
safe_pid=$!

packaging/rpm-sles/mysql.init

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,23 @@ PROG=/usr/bin/mysqld_safe
3838
lockfile=/var/lock/subsys/mysql
3939

4040
get_option () {
41-
local section=$1
42-
local option=$2
43-
local default=$3
44-
ret=$(/usr/bin/my_print_defaults $section | grep '^--'${option}'=' | cut -d= -f2-)
45-
[ -z $ret ] && ret=$default
41+
local option=$1
42+
local default=$2
43+
shift 2
44+
ret=$(/usr/bin/my_print_defaults "$@" | sed -n "s/^--${option}=//p" | tail -n 1)
45+
[ -z $ret ] && ret=${default}
4646
echo $ret
4747
}
4848

49-
datadir=$(get_option mysqld datadir "/var/lib/mysql")
50-
socket=$(get_option mysqld socket "$datadir/mysql.sock")
51-
pidfile=$(get_option mysqld_safe pid-file "/var/run/mysql/mysqld.pid")
49+
datadir=$(get_option datadir "/var/lib/mysql" mysqld)
50+
socket=$(get_option socket "$datadir/mysql.sock" mysqld)
51+
pidfile=$(get_option pid-file "/var/run/mysql/mysqld.pid" mysqld mysqld_safe)
5252

5353
install_db () {
5454
# Note: something different than datadir=/var/lib/mysql requires
5555
# SELinux policy changes (in enforcing mode)
56-
datadir=$(get_option mysqld datadir "/var/lib/mysql")
57-
logfile=$(get_option mysqld_safe log-error "/var/log/mysql/mysqld.log")
56+
datadir=$(get_option datadir "/var/lib/mysql" mysqld)
57+
logfile=$(get_option log-error "/var/log/mysql/mysqld.log" mysqld mysqld_safe)
5858

5959
# Restore log, dir, perms and SELinux contexts
6060
if [ ! -d "$datadir" -a ! -h "$datadir" -a "x$(dirname "$datadir")" = "x/var/lib" ]; then

0 commit comments

Comments
 (0)