Skip to content

Commit 4ce6e78

Browse files
committed
Merge 10.9 into 10.10
2 parents 0149abf + f53f64b commit 4ce6e78

File tree

434 files changed

+20690
-8820
lines changed

Some content is hidden

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

434 files changed

+20690
-8820
lines changed

.gitlab-ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,10 @@ fedora-ninja:
118118
- mkdir builddir; cd builddir
119119
- cmake -DRPM=generic $CMAKE_FLAGS -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -G Ninja .. 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
120120
- ninja -t graph > ../dependencies.dot && dot -Tpng -o ../dependencies.png ../dependencies.dot
121-
- eatmydata ninja package --verbose 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
122-
# Ninja builds are not affected by bug https://jira.mariadb.org/browse/MDEV-25968
121+
- eatmydata ninja package -j 2 --verbose 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
122+
# @TODO: Unlike other builds, the Ninja builds using Gitlab.com runners don't get stuck, but they do get
123+
# stuck on runners with more processors, see https://jira.mariadb.org/browse/MDEV-25968.
124+
# Thus, use the same limitation on Ninja builds as well to ensure it never gets stuck due to this bug.
123125
- ninja test
124126
- *rpm_listfiles
125127
- mkdir ../rpm; mv *.rpm ../rpm

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ test_script:
2525
- set PATH=C:\Strawberry\perl\bin;%PATH%;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64
2626
- cd %APPVEYOR_BUILD_FOLDER%\_build\mysql-test
2727
- set /A parallel=4*%NUMBER_OF_PROCESSORS%
28-
- perl mysql-test-run.pl --force --max-test-fail=10 --retry=2 -parallel=%parallel% --testcase-timeout=4 --suite=main --skip-test-list=%APPVEYOR_BUILD_FOLDER%\win\appveyor_skip_tests.txt --mysqld=--loose-innodb-flush-log-at-trx-commit=2
28+
- perl mysql-test-run.pl --force --max-test-fail=10 --retry=2 --parallel=%parallel% --testcase-timeout=4 --suite=main --skip-test-list=%APPVEYOR_BUILD_FOLDER%\win\appveyor_skip_tests.txt --mysqld=--loose-innodb-flush-log-at-trx-commit=2
2929

3030
image: Visual Studio 2022

client/mysql.cc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Copyright (c) 2000, 2018, Oracle and/or its affiliates.
3-
Copyright (c) 2009, 2021, MariaDB Corporation.
3+
Copyright (c) 2009, 2022, MariaDB Corporation.
44
55
This program is free software; you can redistribute it and/or modify
66
it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@
4242
#include <violite.h>
4343
#include <my_sys.h>
4444
#include <source_revision.h>
45-
#if defined(USE_LIBEDIT_INTERFACE) && defined(HAVE_LOCALE_H)
45+
#if defined(HAVE_LOCALE_H)
4646
#include <locale.h>
4747
#endif
4848

@@ -2857,6 +2857,9 @@ static void initialize_readline ()
28572857
/* Allow conditional parsing of the ~/.inputrc file. */
28582858
rl_readline_name= (char *) "mysql";
28592859
rl_terminal_name= getenv("TERM");
2860+
#ifdef HAVE_SETLOCALE
2861+
setlocale(LC_ALL,"");
2862+
#endif
28602863

28612864
/* Tell the completer that we want a crack first. */
28622865
#if defined(USE_NEW_READLINE_INTERFACE)
@@ -2865,9 +2868,6 @@ static void initialize_readline ()
28652868

28662869
rl_add_defun("magic-space", (rl_command_func_t *)&fake_magic_space, -1);
28672870
#elif defined(USE_LIBEDIT_INTERFACE)
2868-
#ifdef HAVE_LOCALE_H
2869-
setlocale(LC_ALL,""); /* so as libedit use isprint */
2870-
#endif
28712871
rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
28722872
rl_completion_entry_function= &no_completion;
28732873
rl_add_defun("magic-space", (Function*)&fake_magic_space, -1);
@@ -3791,7 +3791,6 @@ print_table_data(MYSQL_RES *result)
37913791
{
37923792
String separator(256);
37933793
MYSQL_ROW cur;
3794-
MYSQL_FIELD *field;
37953794
bool *num_flag;
37963795

37973796
num_flag=(bool*) my_alloca(sizeof(bool)*mysql_num_fields(result));
@@ -3803,7 +3802,7 @@ print_table_data(MYSQL_RES *result)
38033802
mysql_field_seek(result,0);
38043803
}
38053804
separator.copy("+",1,charset_info);
3806-
while ((field = mysql_fetch_field(result)))
3805+
while (MYSQL_FIELD *field= mysql_fetch_field(result))
38073806
{
38083807
uint length= column_names ? field->name_length : 0;
38093808
if (quick)
@@ -3825,7 +3824,7 @@ print_table_data(MYSQL_RES *result)
38253824
{
38263825
mysql_field_seek(result,0);
38273826
(void) tee_fputs("|", PAGER);
3828-
for (uint off=0; (field = mysql_fetch_field(result)) ; off++)
3827+
while (MYSQL_FIELD *field= mysql_fetch_field(result))
38293828
{
38303829
size_t name_length= (uint) strlen(field->name);
38313830
size_t numcells= charset_info->numcells(field->name,
@@ -3867,7 +3866,7 @@ print_table_data(MYSQL_RES *result)
38673866
data_length= (uint) lengths[off];
38683867
}
38693868

3870-
field= mysql_fetch_field(result);
3869+
MYSQL_FIELD *field= mysql_fetch_field(result);
38713870
field_max_length= field->max_length;
38723871

38733872
/*

client/mysqlcheck.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Copyright (c) 2001, 2013, Oracle and/or its affiliates.
3-
Copyright (c) 2010, 2017, MariaDB
3+
Copyright (c) 2010, 2012, MariaDB
44
55
This program is free software; you can redistribute it and/or modify
66
it under the terms of the GNU General Public License as published by
@@ -1061,7 +1061,6 @@ static void print_result()
10611061
char prev[(NAME_LEN+9)*3+2];
10621062
char prev_alter[MAX_ALTER_STR_SIZE];
10631063
size_t length_of_db= strlen(sock->db);
1064-
uint i;
10651064
my_bool found_error=0, table_rebuild=0;
10661065
DYNAMIC_ARRAY *array4repair= &tables4repair;
10671066
DBUG_ENTER("print_result");
@@ -1070,7 +1069,7 @@ static void print_result()
10701069

10711070
prev[0] = '\0';
10721071
prev_alter[0]= 0;
1073-
for (i = 0; (row = mysql_fetch_row(res)); i++)
1072+
while ((row = mysql_fetch_row(res)))
10741073
{
10751074
int changed = strcmp(prev, row[0]);
10761075
my_bool status = !strcmp(row[2], "status");

client/mysqlslap.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Copyright (c) 2005, 2015, Oracle and/or its affiliates.
3-
Copyright (c) 2010, 2017, MariaDB
3+
Copyright (c) 2010, 2022, MariaDB
44
55
This program is free software; you can redistribute it and/or modify
66
it under the terms of the GNU General Public License as published by
@@ -1897,12 +1897,11 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
18971897

18981898
pthread_handler_t run_task(void *p)
18991899
{
1900-
ulonglong counter= 0, queries;
1900+
ulonglong queries;
19011901
ulonglong detach_counter;
19021902
unsigned int commit_counter;
19031903
MYSQL *mysql;
19041904
MYSQL_RES *result;
1905-
MYSQL_ROW row;
19061905
statement *ptr;
19071906
thread_context *con= (thread_context *)p;
19081907

@@ -2023,8 +2022,7 @@ pthread_handler_t run_task(void *p)
20232022
my_progname, mysql_errno(mysql), mysql_error(mysql));
20242023
else
20252024
{
2026-
while ((row= mysql_fetch_row(result)))
2027-
counter++;
2025+
while (mysql_fetch_row(result)) {}
20282026
mysql_free_result(result);
20292027
}
20302028
}
@@ -2034,7 +2032,7 @@ pthread_handler_t run_task(void *p)
20342032
if (commit_rate && (++commit_counter == commit_rate))
20352033
{
20362034
commit_counter= 0;
2037-
run_query(mysql, "COMMIT", strlen("COMMIT"));
2035+
run_query(mysql, C_STRING_WITH_LEN("COMMIT"));
20382036
}
20392037

20402038
if (con->limit && queries == con->limit)
@@ -2046,7 +2044,7 @@ pthread_handler_t run_task(void *p)
20462044

20472045
end:
20482046
if (commit_rate)
2049-
run_query(mysql, "COMMIT", strlen("COMMIT"));
2047+
run_query(mysql, C_STRING_WITH_LEN("COMMIT"));
20502048

20512049
mysql_close(mysql);
20522050

client/readline.cc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,8 @@ char *batch_readline(LINE_BUFFER *line_buff, bool binary_mode)
6464
return 0;
6565
if (out_length && pos[out_length-1] == '\n')
6666
{
67-
/*
68-
On Windows platforms we also need to remove '\r', unconditionally. On
69-
Unix-like platforms we only remove it if we are not on binary mode.
70-
*/
71-
7267
/* Remove '\n' */
73-
if (--out_length && IF_WIN(1,!binary_mode) && pos[out_length-1] == '\r')
68+
if (--out_length && !binary_mode && pos[out_length-1] == '\r')
7469
/* Remove '\r' */
7570
out_length--;
7671
}

cmake/build_configurations/mysql_release.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
2-
# Copyright (c) 2011, 2021, MariaDB Corporation.
2+
# Copyright (c) 2011, 2022, MariaDB Corporation.
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 as published by

cmake/libutils.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
154154
# (can be a static or shared lib)
155155
IF(LIB_TYPE STREQUAL "STATIC_LIBRARY")
156156
SET(STATIC_TGTS ${STATIC_TGTS} ${LIB})
157-
SET(STATIC_LIBS ${STATIC_LIBS} $<TARGET_FILE:${LIB}>)
157+
IF(MSVC)
158+
TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ${LIB})
159+
ELSE()
160+
SET(STATIC_LIBS ${STATIC_LIBS} $<TARGET_FILE:${LIB}>)
161+
ENDIF()
158162
ADD_DEPENDENCIES(${TARGET} ${LIB})
159163
# Extract dependent OS libraries
160164
GET_DEPENDEND_OS_LIBS(${LIB} LIB_OSLIBS)

cmake/os/FreeBSD.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,3 @@ SET(EXECINFO_ROOT /usr/local CACHE INTERNAL "Where to find execinfo library and
2828
INCLUDE_DIRECTORIES(${EXECINFO_ROOT}/include)
2929
SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${EXECINFO_ROOT}/include)
3030
SET(ENV{LIB} "$ENV{LIB}:${EXECINFO_ROOT}/lib")
31-
FIND_LIBRARY(EXECINFO NAMES execinfo)
32-
IF(EXECINFO)
33-
SET(LIBEXECINFO ${EXECINFO})
34-
ENDIF()

cmake/os/OpenBSD.cmake

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)