Skip to content

Commit 4a7dfda

Browse files
committed
Merge 10.2 into 10.3
2 parents ff77a09 + 2bb8d7c commit 4a7dfda

36 files changed

+358
-51
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ x86/
340340
build/
341341
bld/
342342
[Bb]in/
343+
/cmake-build-debug/
343344
[Oo]bj/
344345

345346
# Roslyn cache directories
@@ -521,4 +522,5 @@ compile_commands.json
521522
# Visual Studio Code workspace
522523
.vscode/
523524

525+
/.idea/
524526
.cache/clangd

client/mysql.cc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,11 +1683,14 @@ static struct my_option my_long_options[] =
16831683
&opt_default_auth, &opt_default_auth, 0,
16841684
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
16851685
{"binary-mode", 0,
1686-
"By default, ASCII '\\0' is disallowed and '\\r\\n' is translated to '\\n'. "
1687-
"This switch turns off both features, and also turns off parsing of all client"
1688-
"commands except \\C and DELIMITER, in non-interactive mode (for input "
1689-
"piped to mysql or loaded using the 'source' command). This is necessary "
1690-
"when processing output from mysqlbinlog that may contain blobs.",
1686+
"Binary mode allows certain character sequences to be processed as data "
1687+
"that would otherwise be treated with a special meaning by the parser. "
1688+
"Specifically, this switch turns off parsing of all client commands except "
1689+
"\\C and DELIMITER in non-interactive mode (i.e., when binary mode is "
1690+
"combined with either 1) piped input, 2) the --batch mysql option, or 3) "
1691+
"the 'source' command). Also, in binary mode, occurrences of '\\r\\n' and "
1692+
"ASCII '\\0' are preserved within strings, whereas by default, '\\r\\n' is "
1693+
"translated to '\\n' and '\\0' is disallowed in user input.",
16911694
&opt_binary_mode, &opt_binary_mode, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
16921695
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
16931696
};

include/ft_global.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ void ft_free_stopwords(void);
9090

9191
FT_INFO *ft_init_search(uint,void *, uint, uchar *, size_t,
9292
CHARSET_INFO *, uchar *);
93-
my_bool ft_boolean_check_syntax_string(const uchar *);
93+
my_bool ft_boolean_check_syntax_string(const uchar *, size_t length,
94+
CHARSET_INFO *cs);
9495

9596
/* Internal symbols for fulltext between maria and MyISAM */
9697

include/my_context.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ struct my_context {
5252

5353

5454
#ifdef MY_CONTEXT_USE_UCONTEXT
55+
#if defined(__APPLE__) && !defined(_XOPEN_SOURCE)
56+
#define _XOPEN_SOURCE
57+
#endif
5558
#include <ucontext.h>
5659

5760
struct my_context {

include/my_global.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
# if defined(__i386__) || defined(__ppc__)
165165
# define SIZEOF_CHARP 4
166166
# define SIZEOF_LONG 4
167-
# elif defined(__x86_64__) || defined(__ppc64__)
167+
# elif defined(__x86_64__) || defined(__ppc64__) || defined(__aarch64__)
168168
# define SIZEOF_CHARP 8
169169
# define SIZEOF_LONG 8
170170
# else

man/mysql.1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,14 @@ option\&.
206206
.\" binary-mode option: mysql
207207
\fB\-\-binary\-mode\fR
208208
.sp
209-
By default, ASCII '\e0' is disallowed and '\er\en' is translated to '\en'\&. This switch turns off both features, and also turns off parsing of all client commands except \eC and DELIMITER, in non-interactive mode (for input piped to mysql or loaded using the 'source' command)\&. This is necessary when processing output from mysqlbinlog that may contain blobs\&.
209+
Binary mode allows certain character sequences to be processed as data that
210+
would otherwise be treated with a special meaning by the parser\&.
211+
Specifically, this switch turns off parsing of all client commands except \eC
212+
and DELIMITER in non-interactive mode (i\&.e\&., when binary mode is combined
213+
with either 1) piped input, 2) the --batch mysql option, or 3) the 'source'
214+
command)\&. Also, in binary mode, occurrences of '\er\en' and ASCII '\e0' are
215+
preserved within strings, whereas by default, '\er\en' is translated to '\en'
216+
and '\e0' is disallowed in user input\&.
210217
.RE
211218
.sp
212219
.RS 4

mysql-test/main/ctype_utf16_def.result

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ character_set_server utf16
88
SHOW VARIABLES LIKE 'ft_stopword_file';
99
Variable_name Value
1010
ft_stopword_file (built-in)
11+
#
12+
# MDEV-23269 SIGSEGV in ft_boolean_check_syntax_string on setting ft_boolean_syntax
13+
#
14+
SET GLOBAL ft_boolean_syntax='+ -><()~*:""&|';
15+
SET GLOBAL ft_boolean_syntax=DEFAULT;

mysql-test/main/ctype_utf16_def.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@ call mtr.add_suppression("'utf16' can not be used as client character set");
77
SHOW VARIABLES LIKE 'collation_server';
88
SHOW VARIABLES LIKE 'character_set_server';
99
SHOW VARIABLES LIKE 'ft_stopword_file';
10+
11+
--echo #
12+
--echo # MDEV-23269 SIGSEGV in ft_boolean_check_syntax_string on setting ft_boolean_syntax
13+
--echo #
14+
15+
SET GLOBAL ft_boolean_syntax='+ -><()~*:""&|';
16+
SET GLOBAL ft_boolean_syntax=DEFAULT;

mysql-test/main/ctype_utf32_def.opt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--character-set-server=utf32,latin1 --collation-server=utf32_general_ci
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
call mtr.add_suppression("'utf32' can not be used as client character set");
2+
#
3+
# MDEV-23269 SIGSEGV in ft_boolean_check_syntax_string on setting ft_boolean_syntax
4+
#
5+
SET GLOBAL ft_boolean_syntax='+ -><()~*:""&|';
6+
SET GLOBAL ft_boolean_syntax=DEFAULT;

0 commit comments

Comments
 (0)