Skip to content

Commit 2f20d29

Browse files
committed
Merge branch '10.0' into 10.1
2 parents a629b51 + eb4f2e0 commit 2f20d29

File tree

150 files changed

+2247
-567
lines changed

Some content is hidden

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

150 files changed

+2247
-567
lines changed

client/mysqltest.cc

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,11 +1729,11 @@ int cat_file(DYNAMIC_STRING* ds, const char* filename)
17291729
while((len= my_read(fd, (uchar*)&buff,
17301730
sizeof(buff)-1, MYF(0))) > 0)
17311731
{
1732-
char *p= buff, *start= buff;
1733-
while (p < buff+len)
1732+
char *p= buff, *start= buff,*end=buff+len;
1733+
while (p < end)
17341734
{
17351735
/* Convert cr/lf to lf */
1736-
if (*p == '\r' && *(p+1) && *(p+1)== '\n')
1736+
if (*p == '\r' && p+1 < end && *(p+1)== '\n')
17371737
{
17381738
/* Add fake newline instead of cr and output the line */
17391739
*p= '\n';
@@ -3389,16 +3389,32 @@ void do_exec(struct st_command *command)
33893389
ds_result= &ds_sorted;
33903390
}
33913391

3392+
#ifdef _WIN32
3393+
/* Workaround for CRT bug, MDEV-9409 */
3394+
_setmode(fileno(res_file), O_BINARY);
3395+
#endif
3396+
33923397
while (fgets(buf, sizeof(buf), res_file))
33933398
{
3399+
int len = (int)strlen(buf);
3400+
#ifdef _WIN32
3401+
/* Strip '\r' off newlines. */
3402+
if (len > 1 && buf[len-2] == '\r' && buf[len-1] == '\n')
3403+
{
3404+
buf[len-2] = '\n';
3405+
buf[len-1] = 0;
3406+
len--;
3407+
}
3408+
#endif
33943409
if (disable_result_log)
33953410
{
3396-
buf[strlen(buf)-1]=0;
3411+
if (len)
3412+
buf[len-1] = 0;
33973413
DBUG_PRINT("exec_result",("%s", buf));
33983414
}
33993415
else
34003416
{
3401-
replace_dynstr_append(ds_result, buf);
3417+
replace_dynstr_append_mem(ds_result, buf, len);
34023418
}
34033419
}
34043420
error= pclose(res_file);

cmake/install_macros.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ IF(WIN32)
201201
FIND_PROGRAM(SIGNTOOL_EXECUTABLE signtool
202202
PATHS "$ENV{ProgramFiles}/Microsoft SDKs/Windows/v7.0A/bin"
203203
"$ENV{ProgramFiles}/Windows Kits/8.0/bin/x86"
204+
"$ENV{ProgramFiles}/Windows Kits/8.1/bin/x86"
204205
)
205206
IF(NOT SIGNTOOL_EXECUTABLE)
206207
MESSAGE(FATAL_ERROR

cmake/os/Windows.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ IF(MSVC)
115115

116116
#TODO: update the code and remove the disabled warnings
117117
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996")
118-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /we4099")
118+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /wd4577 /we4099")
119119

120120
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
121121
# _WIN64 is defined by the compiler itself.

cmake/readline.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,5 +230,6 @@ MACRO (MYSQL_CHECK_READLINE)
230230
SET(CMAKE_REQUIRED_LIBRARIES)
231231
SET(CMAKE_REQUIRED_INCLUDES)
232232
ENDIF(NOT WIN32)
233+
CHECK_INCLUDE_FILES ("curses.h;term.h" HAVE_TERM_H)
233234
ENDMACRO()
234235

configure.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H)
231231
CHECK_INCLUDE_FILES (sys/stream.h HAVE_SYS_STREAM_H)
232232
CHECK_INCLUDE_FILES (sys/syscall.h HAVE_SYS_SYSCALL_H)
233233
CHECK_INCLUDE_FILES (sys/termcap.h HAVE_SYS_TERMCAP_H)
234-
CHECK_INCLUDE_FILES ("curses.h;term.h" HAVE_TERM_H)
235234
CHECK_INCLUDE_FILES (asm/termbits.h HAVE_ASM_TERMBITS_H)
236235
CHECK_INCLUDE_FILES (termbits.h HAVE_TERMBITS_H)
237236
CHECK_INCLUDE_FILES (termios.h HAVE_TERMIOS_H)

debian/rules

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/make -f
22

33
export DH_VERBOSE=1
4-
export DEB_BUILD_HARDENING=1
54

65
PACKAGE=mariadb-10.1
76

include/m_ctype.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ extern MY_UNI_CTYPE my_uni_ctype[256];
181181
/* A helper macros for "need at least n bytes" */
182182
#define MY_CS_TOOSMALLN(n) (-100-(n))
183183

184+
#define MY_CS_IS_TOOSMALL(rc) ((rc) >= MY_CS_TOOSMALL6 && (rc) <= MY_CS_TOOSMALL)
185+
186+
184187
#define MY_SEQ_INTTAIL 1
185188
#define MY_SEQ_SPACES 2
186189

man/mysqldump.1

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,29 @@ suppresses date printing\&
753753
.sp -1
754754
.IP \(bu 2.3
755755
.\}
756+
.\" mysqldump: dump-slave option
757+
.\" dump-slave option: mysqldump
758+
\fB\-\-dump\-slave[=\fR\fB\fIvalue\fR\fR\fB]\fR
759+
.sp
760+
Used for producing a dump file from a replication slave server that can be used to set up another slave server
761+
with the same master\&. Causes the binary log position and filename of the master to be appended to the dumped
762+
data output\&. Setting the value to 1 (the default) will print it as a CHANGE MASTER command in the dumped data
763+
output; if set to 2, that command will be prefixed with a comment symbol\&. This option will turn
764+
\-\-lock\-all\-tables on, unless \-\-single-transaction is specified too (in which case a global read lock is only
765+
taken a short time at the beginning of the dump \- don't forget to read about \-\-single-transaction below)\&. In
766+
all cases any action on logs will happen at the exact moment of the dump\&. Option automatically turns
767+
\-\-lock\-tables off\&. Using this option causes mysqldump to stop the slave SQL thread before beginning the dump,
768+
and restart it again after completion\&.
769+
.RE
770+
.sp
771+
.RS 4
772+
.ie n \{\
773+
\h'-04'\(bu\h'+03'\c
774+
.\}
775+
.el \{\
776+
.sp -1
777+
.IP \(bu 2.3
778+
.\}
756779
.\" mysqldump: events option
757780
.\" events option: mysqldump
758781
\fB\-\-events\fR,

mysql-test/extra/binlog_tests/binlog_index.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ source include/have_debug.inc;
1515
# Avoid CrashReporter popup on Mac
1616
--source include/not_crashrep.inc
1717
call mtr.add_suppression('Attempting backtrace');
18-
call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
19-
call mtr.add_suppression('MSYQL_BIN_LOG::open failed to sync the index file');
18+
call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
19+
call mtr.add_suppression('MYSQL_BIN_LOG::open failed to sync the index file');
2020
call mtr.add_suppression('Turning logging off for the whole duration of the MySQL server process.');
2121
call mtr.add_suppression('Could not open .*');
22-
call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to clean registers before purging logs.');
22+
call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to clean registers before purging logs.');
2323
flush tables;
2424

2525
let $old=`select @@debug`;

mysql-test/extra/rpl_tests/rpl_binlog_errors.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ SET GLOBAL debug_dbug=@old_debug;
275275
### while registering the index file and the binary log
276276
### file or failure to write the rotate event.
277277

278-
call mtr.add_suppression("MSYQL_BIN_LOG::open failed to sync the index file.");
278+
call mtr.add_suppression("MYSQL_BIN_LOG::open failed to sync the index file.");
279279
call mtr.add_suppression("Could not open .*");
280280

281281
RESET MASTER;
@@ -380,7 +380,7 @@ RESET MASTER;
380380
call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*");
381381
call mtr.add_suppression("Error writing file .*");
382382
call mtr.add_suppression("Could not open .*");
383-
call mtr.add_suppression("MSYQL_BIN_LOG::open failed to sync the index file.");
383+
call mtr.add_suppression("MYSQL_BIN_LOG::open failed to sync the index file.");
384384
call mtr.add_suppression("Can't generate a unique log-filename .*");
385385
-- echo ###################### TEST #13
386386

0 commit comments

Comments
 (0)