Skip to content

Commit a65f7dc

Browse files
committed
Merge branch '11.4' into 11.8
2 parents dbd7017 + 89c7e2b commit a65f7dc

File tree

200 files changed

+4683
-1210
lines changed

Some content is hidden

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

200 files changed

+4683
-1210
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build on Windows ARM64
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
- 'bb-*'
8+
- '[0-9]+.[0-9]+'
9+
- '*wlad*'
10+
pull_request:
11+
12+
jobs:
13+
build:
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
runs-on: windows-11-arm
19+
20+
steps:
21+
- name: Configure git
22+
run: |
23+
# We won't be able to successfully run mtr
24+
# unless we configure autocrlf.
25+
git config --global core.autocrlf input
26+
27+
- uses: actions/checkout@v4
28+
29+
- name: Install prerequisites
30+
run: |
31+
# Install bison to compile
32+
choco install winflexbison3
33+
34+
- name: Build
35+
run: |
36+
# speedup checkout by excluding uninteresting modules
37+
git config submodule.storage/columnstore/columnstore.update none
38+
git config submodule.storage/maria/libmarias3.update none
39+
git config submodule.storage/rocksdb/rocksdb.update none
40+
git config submodule.wsrep-lib.update none
41+
mkdir bld
42+
cd bld
43+
cmake .. -DWITH_SSL=bundled
44+
cmake --build . --config RelWithDebinfo --verbose -- -m
45+
46+
- name: Test MTR
47+
run: |
48+
$env:PATH = "C:\Strawberry\perl\bin;$env:PATH;C:\Program Files (x86)\Windows Kits\10\Debuggers\arm64"
49+
#Calculate parallel as 4 * number of processors
50+
$parallel = 4 * [int]$env:NUMBER_OF_PROCESSORS
51+
perl bld\mysql-test\mysql-test-run.pl --force --parallel=$parallel --suite=main --mysqld=--loose-innodb-flush-log-at-trx-commit=2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ scripts/mysqld_safe
138138
scripts/mysqldumpslow
139139
scripts/mysqlhotcopy
140140
scripts/mytop
141+
scripts/print_ddl_recovery_log.pl
141142
scripts/wsrep_sst_backup
142143
scripts/wsrep_sst_common
143144
scripts/wsrep_sst_mysqldump

CMakeLists.txt

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,7 @@ ENDIF()
120120
FIND_PACKAGE(Git)
121121

122122
IF(WIN32 AND (CMAKE_VERSION VERSION_GREATER "3.21"))
123-
# Install runtime dependency by default, when using vcpkg
124-
IF(NOT DEFINED INSTALL_RUNTIME_DEPENDENCIES_DEFAULT)
125-
IF("${VCPKG_INSTALLED_DIR}")
126-
SET(INSTALL_RUNTIME_DEPENDENCIES_DEFAULT OFF)
127-
ELSE()
128-
SET(INSTALL_RUNTIME_DEPENDENCIES_DEFAULT ON)
129-
ENDIF()
130-
ENDIF()
131-
OPTION(INSTALL_RUNTIME_DEPENDENCIES "Install runtime dependencies" "${INSTALL_RUNTIME_DEPENDENCIES_DEFAULT}")
123+
OPTION(INSTALL_RUNTIME_DEPENDENCIES "Install runtime dependencies" ON)
132124
ENDIF()
133125

134126
# Following autotools tradition, add preprocessor definitions
@@ -299,7 +291,7 @@ ENDIF()
299291
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
300292
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
301293

302-
IF(CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10")
294+
IF(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10")
303295
# Enable extra checks when using a recent enough version of GNU libstdc++
304296
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG -D_GLIBCXX_ASSERTIONS")
305297
ENDIF()
@@ -597,6 +589,7 @@ IF(WITH_SBOM)
597589
GENERATE_SBOM()
598590
ENDIF()
599591

592+
INSTALL_RUNTIME_DEPS()
600593
INCLUDE(CPack)
601594

602595
IF(WIN32 AND SIGNCODE)

client/mysqlcheck.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,9 @@ static int disable_binlog()
899899
}
900900

901901

902+
/* Ok as mysqlcheck is not multi threaded */
903+
PRAGMA_DISABLE_CHECK_STACK_FRAME
904+
902905
static int handle_request_for_tables(char *tables, size_t length,
903906
my_bool view, my_bool dont_quote)
904907
{
@@ -1030,9 +1033,6 @@ static void insert_table_name(DYNAMIC_ARRAY *arr, char *in, size_t dblen)
10301033
insert_dynamic(arr, (uchar*) buf);
10311034
}
10321035

1033-
/* Ok as mysqlcheck is not multi threaded */
1034-
PRAGMA_DISABLE_CHECK_STACK_FRAME
1035-
10361036
static void __attribute__((noinline)) print_result()
10371037
{
10381038
MYSQL_RES *res;

client/mysqlslap.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,8 @@ int main(int argc, char **argv)
419419
return 0;
420420
}
421421

422+
PRAGMA_DISABLE_CHECK_STACK_FRAME
423+
422424
void concurrency_loop(MYSQL *mysql, uint current, option_string *eptr)
423425
{
424426
unsigned int x;
@@ -514,6 +516,7 @@ void concurrency_loop(MYSQL *mysql, uint current, option_string *eptr)
514516
my_free(head_sptr);
515517

516518
}
519+
PRAGMA_REENABLE_CHECK_STACK_FRAME
517520

518521

519522
static struct my_option my_long_options[] =
@@ -2283,6 +2286,7 @@ statement_cleanup(statement *stmt)
22832286
}
22842287
}
22852288

2289+
PRAGMA_DISABLE_CHECK_STACK_FRAME
22862290

22872291
int
22882292
slap_connect(MYSQL *mysql)
@@ -2316,3 +2320,4 @@ slap_connect(MYSQL *mysql)
23162320

23172321
return 0;
23182322
}
2323+
PRAGMA_REENABLE_CHECK_STACK_FRAME

client/mysqltest.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2864,6 +2864,7 @@ do_result_format_version(struct st_command *command)
28642864
dynstr_append_mem(&ds_res, ds_version.str, ds_version.length);
28652865
dynstr_append_mem(&ds_res, STRING_WITH_LEN("\n"));
28662866
dynstr_free(&ds_version);
2867+
DBUG_VOID_RETURN;
28672868
}
28682869

28692870

cmake/build_configurations/mysql_release.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ ENDIF()
173173
IF(UNIX)
174174

175175
# Default GCC flags
176-
IF(CMAKE_COMPILER_IS_GNUCC)
176+
IF(CMAKE_C_COMPILER_ID STREQUAL "GNU")
177177
SET(COMMON_C_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized")
178178
STRING(APPEND CMAKE_C_FLAGS_DEBUG " ${COMMON_C_FLAGS}")
179179
STRING(APPEND CMAKE_C_FLAGS_RELEASE " ${COMMON_C_FLAGS}")
@@ -182,7 +182,7 @@ IF(UNIX)
182182
STRING(REGEX REPLACE "-O2" "-O3" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
183183
STRING(REGEX REPLACE "-O2" "-O3" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
184184
ENDIF()
185-
IF(CMAKE_COMPILER_IS_GNUCXX)
185+
IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
186186
SET(COMMON_CXX_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized")
187187
STRING(APPEND CMAKE_CXX_FLAGS_DEBUG " ${COMMON_CXX_FLAGS}")
188188
STRING(APPEND CMAKE_CXX_FLAGS_RELEASE " ${COMMON_CXX_FLAGS}")
@@ -202,11 +202,11 @@ IF(UNIX)
202202
SET(z_flags "")
203203
ENDIF()
204204

205-
IF(CMAKE_COMPILER_IS_GNUCC)
205+
IF(CMAKE_C_COMPILER_ID STREQUAL "GNU")
206206
STRING(APPEND CMAKE_C_FLAGS_RELEASE " ${z_flags}")
207207
STRING(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " ${z_flags}")
208208
ENDIF()
209-
IF(CMAKE_COMPILER_IS_GNUCXX)
209+
IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
210210
STRING(APPEND CMAKE_CXX_FLAGS_RELEASE " ${z_flags}")
211211
STRING(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " ${z_flags}")
212212
ENDIF()

cmake/dtrace.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# along with this program; if not, write to the Free Software
1414
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
1515

16-
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND CMAKE_COMPILER_IS_GNUCXX
16+
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
1717
AND CMAKE_SIZEOF_VOID_P EQUAL 4)
1818
IF(NOT DEFINED BUGGY_GCC_NO_DTRACE_MODULES)
1919
EXECUTE_PROCESS(

cmake/install_macros.cmake

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -228,26 +228,58 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
228228
IF(SIGNCODE)
229229
SIGN_TARGET(${target} ${COMP})
230230
ENDIF()
231+
IF(INSTALL_RUNTIME_DEPENDENCIES)
232+
# Populate INSTALLED_TARGETS list (stored as global property)
233+
# The list is used in INSTALL_RUNTIME_DEPS
234+
GET_PROPERTY(installed_targets GLOBAL PROPERTY INSTALLED_TARGETS)
235+
IF(NOT installed_targets)
236+
SET(installed_targets)
237+
ENDIF()
238+
LIST(APPEND installed_targets "${target}")
239+
SET_PROPERTY(GLOBAL PROPERTY INSTALLED_TARGETS "${installed_targets}")
240+
SET(RUNTIME_DEPS RUNTIME_DEPENDENCY_SET ${target})
241+
ENDIF()
242+
INSTALL(TARGETS ${target} DESTINATION ${ARG_DESTINATION} ${COMP} ${RUNTIME_DEPS})
243+
INSTALL_DEBUG_SYMBOLS(${target} ${COMP} INSTALL_LOCATION ${ARG_DESTINATION})
231244
ENDFOREACH()
245+
ENDFUNCTION()
232246

233-
IF(WIN32 AND INSTALL_RUNTIME_DEPENDENCIES)
234-
STRING(JOIN "." runtime_deps_set_name ${TARGETS})
235-
SET(RUNTIME_DEPS RUNTIME_DEPENDENCY_SET "${runtime_deps_set_name}")
236-
ENDIF()
237247

238-
INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION} ${COMP} ${RUNTIME_DEPS})
239-
INSTALL_DEBUG_SYMBOLS(${TARGETS} ${COMP} INSTALL_LOCATION ${ARG_DESTINATION})
248+
# On Windows, installs runtime dependency for all targets
249+
FUNCTION(INSTALL_RUNTIME_DEPS)
250+
IF(NOT WIN32 OR NOT INSTALL_RUNTIME_DEPENDENCIES)
251+
RETURN()
252+
ENDIF()
253+
# Install all runtime dependencies
254+
255+
GET_PROPERTY(installed_targets GLOBAL PROPERTY INSTALLED_TARGETS)
256+
# Exclude all dependencies that are shared libraries from the
257+
# same build.
258+
FOREACH(tgt ${installed_targets})
259+
SET(exclude_libs)
260+
GET_TARGET_PROPERTY(link_libraries ${tgt} LINK_LIBRARIES)
261+
IF(link_libraries)
262+
FOREACH(lib ${link_libraries})
263+
IF(TARGET ${lib})
264+
GET_TARGET_PROPERTY(type ${lib} TYPE)
265+
IF(type MATCHES "SHARED")
266+
LIST(APPEND exclude_libs "$<TARGET_FILE_BASE_NAME:${lib}>\\.dll")
267+
ENDIF()
268+
ENDIF()
269+
ENDFOREACH()
270+
ENDIF()
240271

241-
IF(WIN32 AND INSTALL_RUNTIME_DEPENDENCIES)
242272
INSTALL(
243273
RUNTIME_DEPENDENCY_SET
244-
"${runtime_deps_set_name}"
274+
${tgt}
245275
COMPONENT RuntimeDeps
246276
DESTINATION ${INSTALL_BINDIR}
247277
PRE_EXCLUDE_REGEXES
248278
"api-ms-" # Windows stuff
249279
"ext-ms-"
250-
"server\\.dll" # main server DLL, installed separately
280+
"icuuc\\.dll" # Old Windows 10 (1809)
281+
"icuin\\.dll"
282+
${exclude_libs}
251283
"clang_rt" # ASAN libraries
252284
"vcruntime"
253285
POST_EXCLUDE_REGEXES
@@ -257,7 +289,7 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
257289
${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin
258290
$<$<CONFIG:Debug>:${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin>
259291
)
260-
ENDIF()
292+
ENDFOREACH()
261293
ENDFUNCTION()
262294

263295
# Optionally install mysqld/client/embedded from debug build run. outside of the current build dir

cmake/maintainer.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ SET(MY_WARNING_FLAGS
4242
-Wcast-function-type-strict
4343
)
4444

45+
IF(NOT (WITH_MSAN OR WITH_ASAN OR WITH_UBSAN))
46+
SET(MY_WARNING_FLAGS ${MY_WARNING_FLAGS} -Wframe-larger-than=16384)
47+
ENDIF()
48+
4549
# Warning flags that are in testing before moving
4650
# to MY_WARNING_FLAGS if stable.
4751
SET(MY_WARNING_FLAGS_NON_FATAL
@@ -58,7 +62,7 @@ ENDFOREACH()
5862

5963
SET(MY_ERROR_FLAGS -Werror -fno-operator-names -Wsuggest-override)
6064

61-
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "6.0.0")
65+
IF(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "6.0.0")
6266
SET(MY_ERROR_FLAGS ${MY_ERROR_FLAGS} -Wno-error=maybe-uninitialized)
6367
SET(MY_ERROR_FLAGS ${MY_ERROR_FLAGS} -Wno-error=non-virtual-dtor) # gcc bug 7302
6468
ENDIF()

0 commit comments

Comments
 (0)