Skip to content

Commit 31b2237

Browse files
committed
Merge branch '10.2' of github.com:MariaDB/server into 10.2-mariarocks
and a few trivial test result updates
2 parents a597e0e + efcd093 commit 31b2237

File tree

2,046 files changed

+123698
-49177
lines changed

Some content is hidden

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

2,046 files changed

+123698
-49177
lines changed

.travis.yml

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,66 @@ dist: trusty
88
language: cpp
99
compiler:
1010
- gcc
11-
# - clang # See commit f38808 if you want to re-enable clang builds
1211
cache:
13-
apt:
14-
ccache:
15-
16-
# Timing on build an test needs to be < 50 minutes. The compile is ~4-5minutes
17-
# so here we group the tests such that this happens.
12+
- apt
13+
- ccache
1814

15+
env:
16+
matrix:
17+
- GCC_VERSION=5
18+
- GCC_VERSION=6
1919
addons:
2020
apt:
21+
sources:
22+
- ubuntu-toolchain-r-test
23+
# below requires https://github.com/travis-ci/apt-source-whitelist/pull/309
24+
# - llvm-toolchain-trusty-3.8
25+
# - llvm-toolchain-trusty-3.9
26+
# llvm urls awaiting fix
27+
# https://github.com/travis-ci/apt-source-whitelist/pull/288
28+
# https://github.com/travis-ci/apt-source-whitelist/pull/309
2129
packages: # make sure these match debian/control contents
30+
- gcc-5
31+
- g++-5
32+
- gcc-6
33+
- g++-6
2234
- bison
2335
- chrpath
2436
- cmake
2537
- debhelper
2638
- dh-apparmor
2739
- dpatch
40+
- gdb
2841
- libaio-dev
2942
- libboost-dev
3043
- libjudy-dev
3144
- libncurses5-dev
3245
- libpam0g-dev
46+
- libpcre3-dev
3347
- libreadline-gplv2-dev
48+
- libstemmer-dev
3449
- libssl-dev
50+
- libnuma-dev
51+
- libxml2-dev
3552
- lsb-release
3653
- perl
3754
- po-debconf
3855
- psmisc
3956
- zlib1g-dev
40-
- libcrack2-dev # no effect as the package is disallowed on Travis-CI
57+
- libcrack2-dev
4158
- libjemalloc-dev
4259
- devscripts # implicit for any build on Ubuntu
4360

61+
# libsnappy-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3880
62+
# liblzma-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3879
63+
# libzmq-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3881
64+
# libsystemd-daemon-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3882
65+
4466
script:
45-
- ${CC} --version ; ${CXX} --version
67+
- export MYSQL_BUILD_CC=/usr/bin/gcc-${GCC_VERSION} MYSQL_BUILD_CXX=/usr/bin/g++-${GCC_VERSION}
68+
- ${MYSQL_BUILD_CC} --version ; ${MYSQL_BUILD_CXX} --version
4669
- cd "${TRAVIS_BUILD_DIR}"
47-
- env DEB_BUILD_OPTIONS="parallel=4" debian/autobake-deb.sh;
70+
- env DEB_BUILD_OPTIONS="parallel=3" debian/autobake-deb.sh;
4871

4972
notifications:
5073
irc:

CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ IF(WITH_UNIT_TESTS)
356356
ADD_SUBDIRECTORY(unittest/examples)
357357
ADD_SUBDIRECTORY(unittest/mysys)
358358
ADD_SUBDIRECTORY(unittest/my_decimal)
359+
ADD_SUBDIRECTORY(unittest/json_lib)
359360
IF(NOT WITHOUT_SERVER)
360361
ADD_SUBDIRECTORY(unittest/sql)
361362
ENDIF()
@@ -433,12 +434,6 @@ CONFIGURE_FILE(
433434
${CMAKE_SOURCE_DIR}/cmake/info_macros.cmake.in
434435
${CMAKE_BINARY_DIR}/info_macros.cmake @ONLY)
435436

436-
IF(DEB)
437-
CONFIGURE_FILE(
438-
${CMAKE_SOURCE_DIR}/debian/mariadb-server-10.2.files.in
439-
${CMAKE_SOURCE_DIR}/debian/mariadb-server-10.2.files)
440-
ENDIF(DEB)
441-
442437
# Handle the "INFO_*" files.
443438
INCLUDE(${CMAKE_BINARY_DIR}/info_macros.cmake)
444439
# Source: This can be done during the cmake phase, all information is

CREDITS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Visma http://visma.com (2015 - 2016)
1010
Acronis http://acronis.com (2016)
1111
Nexedi https://www.nexedi.com (2016)
1212
Automattic https://automattic.com (2014 - 2016)
13+
Tencent Game DBA http://tencentdba.com/about (2016)
1314
Verkkokauppa.com https://www.verkkokauppa.com (2015 - 2016)
1415
Virtuozzo https://virtuozzo.com (2016)
1516

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
MYSQL_VERSION_MAJOR=10
22
MYSQL_VERSION_MINOR=2
3-
MYSQL_VERSION_PATCH=3
3+
MYSQL_VERSION_PATCH=4

client/mysql.cc

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ static void end_pager();
245245
static void init_tee(const char *);
246246
static void end_tee();
247247
static const char* construct_prompt();
248-
static char *get_arg(char *line, my_bool get_next_arg);
248+
enum get_arg_mode { CHECK, GET, GET_NEXT};
249+
static char *get_arg(char *line, get_arg_mode mode);
249250
static void init_username();
250251
static void add_int_to_prompt(int toadd);
251252
static int get_result_width(MYSQL_RES *res);
@@ -2257,7 +2258,7 @@ static COMMANDS *find_command(char *name)
22572258
if (!my_strnncoll(&my_charset_latin1, (uchar*) name, len,
22582259
(uchar*) commands[i].name, len) &&
22592260
(commands[i].name[len] == '\0') &&
2260-
(!end || commands[i].takes_params))
2261+
(!end || (commands[i].takes_params && get_arg(name, CHECK))))
22612262
{
22622263
index= i;
22632264
break;
@@ -3175,7 +3176,7 @@ com_charset(String *buffer __attribute__((unused)), char *line)
31753176
char buff[256], *param;
31763177
CHARSET_INFO * new_cs;
31773178
strmake_buf(buff, line);
3178-
param= get_arg(buff, 0);
3179+
param= get_arg(buff, GET);
31793180
if (!param || !*param)
31803181
{
31813182
return put_info("Usage: \\C charset_name | charset charset_name",
@@ -4260,12 +4261,12 @@ com_connect(String *buffer, char *line)
42604261
#ifdef EXTRA_DEBUG
42614262
tmp[1]= 0;
42624263
#endif
4263-
tmp= get_arg(buff, 0);
4264+
tmp= get_arg(buff, GET);
42644265
if (tmp && *tmp)
42654266
{
42664267
my_free(current_db);
42674268
current_db= my_strdup(tmp, MYF(MY_WME));
4268-
tmp= get_arg(buff, 1);
4269+
tmp= get_arg(buff, GET_NEXT);
42694270
if (tmp)
42704271
{
42714272
my_free(current_host);
@@ -4368,7 +4369,7 @@ com_delimiter(String *buffer __attribute__((unused)), char *line)
43684369
char buff[256], *tmp;
43694370

43704371
strmake_buf(buff, line);
4371-
tmp= get_arg(buff, 0);
4372+
tmp= get_arg(buff, GET);
43724373

43734374
if (!tmp || !*tmp)
43744375
{
@@ -4399,7 +4400,7 @@ com_use(String *buffer __attribute__((unused)), char *line)
43994400

44004401
bzero(buff, sizeof(buff));
44014402
strmake_buf(buff, line);
4402-
tmp= get_arg(buff, 0);
4403+
tmp= get_arg(buff, GET);
44034404
if (!tmp || !*tmp)
44044405
{
44054406
put_info("USE must be followed by a database name", INFO_ERROR);
@@ -4484,23 +4485,22 @@ com_nowarnings(String *buffer __attribute__((unused)),
44844485
}
44854486

44864487
/*
4487-
Gets argument from a command on the command line. If get_next_arg is
4488-
not defined, skips the command and returns the first argument. The
4489-
line is modified by adding zero to the end of the argument. If
4490-
get_next_arg is defined, then the function searches for end of string
4491-
first, after found, returns the next argument and adds zero to the
4492-
end. If you ever wish to use this feature, remember to initialize all
4493-
items in the array to zero first.
4488+
Gets argument from a command on the command line. If mode is not GET_NEXT,
4489+
skips the command and returns the first argument. The line is modified by
4490+
adding zero to the end of the argument. If mode is GET_NEXT, then the
4491+
function searches for end of string first, after found, returns the next
4492+
argument and adds zero to the end. If you ever wish to use this feature,
4493+
remember to initialize all items in the array to zero first.
44944494
*/
44954495

4496-
char *get_arg(char *line, my_bool get_next_arg)
4496+
static char *get_arg(char *line, get_arg_mode mode)
44974497
{
44984498
char *ptr, *start;
4499-
my_bool quoted= 0, valid_arg= 0;
4499+
bool short_cmd= false;
45004500
char qtype= 0;
45014501

45024502
ptr= line;
4503-
if (get_next_arg)
4503+
if (mode == GET_NEXT)
45044504
{
45054505
for (; *ptr; ptr++) ;
45064506
if (*(ptr + 1))
@@ -4511,7 +4511,7 @@ char *get_arg(char *line, my_bool get_next_arg)
45114511
/* skip leading white spaces */
45124512
while (my_isspace(charset_info, *ptr))
45134513
ptr++;
4514-
if (*ptr == '\\') // short command was used
4514+
if ((short_cmd= *ptr == '\\')) // short command was used
45154515
ptr+= 2;
45164516
else
45174517
while (*ptr &&!my_isspace(charset_info, *ptr)) // skip command
@@ -4524,24 +4524,28 @@ char *get_arg(char *line, my_bool get_next_arg)
45244524
if (*ptr == '\'' || *ptr == '\"' || *ptr == '`')
45254525
{
45264526
qtype= *ptr;
4527-
quoted= 1;
45284527
ptr++;
45294528
}
45304529
for (start=ptr ; *ptr; ptr++)
45314530
{
4532-
if (*ptr == '\\' && ptr[1]) // escaped character
4531+
if ((*ptr == '\\' && ptr[1]) || // escaped character
4532+
(!short_cmd && qtype && *ptr == qtype && ptr[1] == qtype)) // quote
45334533
{
4534-
// Remove the backslash
4535-
strmov_overlapp(ptr, ptr+1);
4534+
// Remove (or skip) the backslash (or a second quote)
4535+
if (mode != CHECK)
4536+
strmov_overlapp(ptr, ptr+1);
4537+
else
4538+
ptr++;
45364539
}
4537-
else if ((!quoted && *ptr == ' ') || (quoted && *ptr == qtype))
4540+
else if (*ptr == (qtype ? qtype : ' '))
45384541
{
4539-
*ptr= 0;
4542+
qtype= 0;
4543+
if (mode != CHECK)
4544+
*ptr= 0;
45404545
break;
45414546
}
45424547
}
4543-
valid_arg= ptr != start;
4544-
return valid_arg ? start : NullS;
4548+
return ptr != start && !qtype ? start : NullS;
45454549
}
45464550

45474551

@@ -5129,7 +5133,7 @@ static const char *construct_prompt()
51295133
{
51305134
const char *prompt;
51315135
prompt= connected ? mysql_get_host_info(&mysql) : "not_connected";
5132-
if (strstr(prompt, "Localhost"))
5136+
if (strstr(prompt, "Localhost") || strstr(prompt, "localhost "))
51335137
{
51345138
if (*c == 'h')
51355139
processed_prompt.append("localhost");

client/mysqlbinlog.cc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
10021002

10031003
switch (ev_type) {
10041004
case QUERY_EVENT:
1005+
case QUERY_COMPRESSED_EVENT:
10051006
{
10061007
Query_log_event *qe= (Query_log_event*)ev;
10071008
if (!qe->is_trans_keyword())
@@ -1243,6 +1244,12 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
12431244
case WRITE_ROWS_EVENT_V1:
12441245
case UPDATE_ROWS_EVENT_V1:
12451246
case DELETE_ROWS_EVENT_V1:
1247+
case WRITE_ROWS_COMPRESSED_EVENT:
1248+
case DELETE_ROWS_COMPRESSED_EVENT:
1249+
case UPDATE_ROWS_COMPRESSED_EVENT:
1250+
case WRITE_ROWS_COMPRESSED_EVENT_V1:
1251+
case UPDATE_ROWS_COMPRESSED_EVENT_V1:
1252+
case DELETE_ROWS_COMPRESSED_EVENT_V1:
12461253
{
12471254
Rows_log_event *e= (Rows_log_event*) ev;
12481255
if (print_row_event(print_event_info, ev, e->get_table_id(),
@@ -1260,6 +1267,9 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
12601267
goto err;
12611268
break;
12621269
}
1270+
case START_ENCRYPTION_EVENT:
1271+
glob_description_event->start_decryption((Start_encryption_log_event*)ev);
1272+
/* fall through */
12631273
default:
12641274
print_skip_replication_statement(print_event_info, ev);
12651275
ev->print(result_file, print_event_info);
@@ -2832,9 +2842,16 @@ int main(int argc, char** argv)
28322842
}
28332843

28342844

2845+
uint dummy1() { return 1; }
28352846
struct encryption_service_st encryption_handler=
28362847
{
2837-
0, 0, 0, 0, 0, 0, 0
2848+
(uint(*)(uint))dummy1,
2849+
(uint(*)(uint, uint, uchar*, uint*))dummy1,
2850+
(uint(*)(uint, uint))dummy1,
2851+
(int (*)(void*, const uchar*, uint, const uchar*, uint, int, uint, uint))dummy1,
2852+
(int (*)(void*, const uchar*, uint, uchar*, uint*))dummy1,
2853+
(int (*)(void*, uchar*, uint*))dummy1,
2854+
(uint (*)(uint, uint, uint))dummy1
28382855
};
28392856

28402857
/*

0 commit comments

Comments
 (0)