Skip to content

Commit 7b392d8

Browse files
authored
Merge branch 'mysql:trunk' into trunk
2 parents 1cbf4b1 + 9aa75cf commit 7b392d8

36 files changed

+336
-214
lines changed

CMakeLists.txt

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,32 +271,71 @@ endif()
271271
# TODO: Fix these warnings.
272272
#
273273

274-
if(MSVC)
274+
# TODO: Also cover linker warnings
275+
276+
add_config_option(WERROR BOOL ADVANCED DEFAULT OFF
277+
"Turn compile warnings into errors"
278+
)
279+
280+
#
281+
# Note: If WERROR is enabled we change its value to be the actual compiler
282+
# option to be used on the current platform. That is used for easier
283+
# propagation to external builds.
284+
#
285+
# Note: In more recent cmake there is CMAKE_COMPILE_WARNING_AS_ERROR variable
286+
# but at the moment we can't ensure using that recent cmake.
287+
#
288+
289+
if(WERROR)
290+
set(WERROR -Werror)
291+
endif()
292+
293+
if(MSVC OR TOOLSET_MSVC)
275294

276295
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
277296

278297
if(CXX_FRONTEND_MSVC)
298+
299+
if(WERROR)
300+
set(WERROR /WX) # MSVC equivalent of -Werror
301+
endif()
302+
279303
# Disable MSVC unreachable code warnings unless requested.
280304
add_compile_options(/wd4702)
281305

282306
# Disable MSVC warning C4297 as it seems to be buggy.
283307
# Seehttps://connect.microsoft.com/VisualStudio/feedback/details/897611/incorrect-warning-of-c4297-for-destructor-with-try-catch-statement
284308

285309
add_compile_options(/wd4297)
310+
286311
endif()
287312

288-
endif()
313+
elseif(SUNPRO)
289314

315+
# Note: For simplicity we do not handle WERROR on SunOS
290316

291-
if(SUNPRO)
317+
set(WERROR)
292318

293319
add_compile_options(
294320
-errtags=yes -erroff=hidevf,wvarhidemem
295321
)
296322

297323
endif()
298324

299-
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 12.0)
325+
if(NOT WERROR)
326+
# clear if WERROR was set to something like OFF or FALSE
327+
# message(STATUS "WERROR: cleared")
328+
unset(WERROR CACHE)
329+
else()
330+
# overwrite cache entry with changed value
331+
set(WERROR "${WERROR}" CACHE INTERNAL "WERROR flags" FORCE)
332+
endif()
333+
334+
# message(STATUS "WERROR: ${WERROR}")
335+
add_compile_options(${WERROR})
336+
337+
338+
if (GCC AND GCC VERSION_GREATER 11)
300339
# Silence a warning produced by a regression in GCC 12.0 and newer
301340
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106199
302341
# Note: The stringop-overflow warnings are shown also during linking phase
@@ -383,7 +422,8 @@ if(MAINTAINER_MODE)
383422
# (and this is the case for MSVC 2015).
384423
# See: http://en.cppreference.com/w/cpp/language/copy_assignment
385424

386-
add_compile_options(/W4 /wd4512 /wd4127)
425+
set_warnings_level(4)
426+
add_compile_options(/wd4512 /wd4127)
387427

388428
elseif(SUNPRO)
389429
else()

LICENSE.txt

Lines changed: 74 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
Licensing Information User Manual
22

3-
MySQL Connector/C++ 9.2.0 Community
3+
MySQL Connector/C++ 9.3.0 Community
44
__________________________________________________________________
55

66
Introduction
77

88
This License Information User Manual contains Oracle's product license
99
and other licensing information, including licensing information for
1010
third-party software which may be included in this distribution of
11-
MySQL Connector/C++ 9.2.0 Community.
11+
MySQL Connector/C++ 9.3.0 Community.
1212

13-
Last updated: November 2024
13+
Last updated: March 2025
1414

1515
Licensing Information
1616

17-
This release of MySQL Connector/C++ 9.2.0 Community is brought to you
17+
This release of MySQL Connector/C++ 9.3.0 Community is brought to you
1818
by the MySQL team at Oracle. This software is released under version 2
1919
of the GNU General Public License (GPLv2), as set forth below, with the
2020
following additional permissions:
2121

22-
This distribution of MySQL Connector/C++ 9.2.0 Community is designed to
22+
This distribution of MySQL Connector/C++ 9.3.0 Community is designed to
2323
work with certain software (including but not limited to OpenSSL) that
2424
is licensed under separate terms, as designated in a particular file or
2525
component or in the license documentation. Without limiting your rights
@@ -34,7 +34,7 @@ Licensing Information
3434
a copy of which is reproduced below and can also be found along with
3535
its FAQ at http://oss.oracle.com/licenses/universal-foss-exception.
3636

37-
Copyright (c) 2008, 2024, Oracle and/or its affiliates.
37+
Copyright (c) 2008, 2025, Oracle and/or its affiliates.
3838

3939
Election of GPLv2
4040

@@ -2142,49 +2142,20 @@ but the Oracle program might not operate properly or at all without it.
21422142
// SPDX-License-Identifier: Apache-2.0
21432143

21442144
LICENSE:
2145-
Apache License
2146-
Version 2.0, January 2004
2147-
http://www.apache.org/licenses/
2148-
A copy of the Apache License v2.0, January 2004 license can be found
2149-
in the 'Standard Licenses' section.
2150-
2151-
2152-
4th party code included
2153-
=======================
2154-
exporters/etw
2155-
-------------
2156-
TraceLogging Dynamic for Windows
2157-
2158-
Copyright (c) Microsoft Corporation. All rights reserved.
2159-
2160-
MIT License
2161-
2162-
Permission is hereby granted, free of charge, to any person obtaining a copy
2163-
of this software and associated documentation files (the "Software"), to deal
2164-
in the Software without restriction, including without limitation the rights
2165-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2166-
copies of the Software, and to permit persons to whom the Software is
2167-
furnished to do so, subject to the following conditions:
21682145

2169-
The above copyright notice and this permission notice shall be included in all
2170-
copies or substantial portions of the Software.
2171-
2172-
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2173-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2174-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2175-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2176-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2177-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2178-
SOFTWARE.
2146+
Apache License
2147+
Version 2.0, January 2004
2148+
http://www.apache.org/licenses/
21792149

2150+
A copy of the Apache License v2.0, January 2004 license can be found
2151+
in the 'Standard Licenses' section.
21802152

21812153

2182-
4th Party Libraries
2183-
===================
2154+
4th Party Dependencies
2155+
======================
21842156
opentelemetry-proto
21852157
-------------------
21862158
// Copyright 2019, OpenTelemetry Authors
2187-
// Copyright 2020, OpenTelemetry Authors
21882159
//
21892160
// Licensed under the Apache License, Version 2.0 (the "License");
21902161
// you may not use this file except in compliance with the License.
@@ -2198,48 +2169,75 @@ opentelemetry-proto
21982169
// See the License for the specific language governing permissions and
21992170
// limitations under the License.
22002171

2201-
Apache License Text as listed above
2172+
Some files include
2173+
// Copyright 2020, OpenTelemetry Authors
2174+
(same license header)
2175+
2176+
A copy of the Apache License v2.0, January 2004 license can be found
2177+
in the 'Standard Licenses' section.
2178+
2179+
================================================================================
2180+
==
22022181

2203-
------------------------------------------------------------------------------
22042182
protobuf
22052183
--------
2184+
COPYRIGHT AND PERMISSION NOTICE
22062185

2207-
Copyright 2008 Google Inc. All rights reserved.
2186+
Copyright (c) 1996 - 2024, Daniel Stenberg, <[email protected]>, and many
2187+
contributors, see the THANKS file.
22082188

2209-
Redistribution and use in source and binary forms, with or without
2210-
modification, are permitted provided that the following conditions are
2211-
met:
2189+
All rights reserved.
22122190

2213-
* Redistributions of source code must retain the above copyright
2214-
notice, this list of conditions and the following disclaimer.
2215-
* Redistributions in binary form must reproduce the above
2216-
copyright notice, this list of conditions and the following disclaimer
2217-
in the documentation and/or other materials provided with the
2218-
distribution.
2219-
* Neither the name of Google Inc. nor the names of its
2220-
contributors may be used to endorse or promote products derived from
2221-
this software without specific prior written permission.
2191+
Permission to use, copy, modify, and distribute this software for any purpose
2192+
with or without fee is hereby granted, provided that the above copyright
2193+
notice and this permission notice appear in all copies.
22222194

2223-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2224-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2225-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2226-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2227-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2228-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2229-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2230-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2231-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2232-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2233-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2195+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2196+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2197+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
2198+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
2199+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
2200+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
2201+
OR OTHER DEALINGS IN THE SOFTWARE.
22342202

2235-
Code generated by the Protocol Buffer compiler is owned by the owner
2236-
of the input file used when generating it. This code is not
2237-
standalone and requires a support library to be linked with it. This
2238-
support library is itself covered by the above license.
2203+
Except as contained in this notice, the name of a copyright holder shall not
2204+
be used in advertising or otherwise to promote the sale, use or other dealings
2205+
in this Software without prior written authorization of the copyright holder.
2206+
2207+
Protobuf dependency - abseil-cpp
2208+
--------------------------------
2209+
=== Header in source files:
2210+
// Copyright 2017 The Abseil Authors.
2211+
//
2212+
// Licensed under the Apache License, Version 2.0 (the "License");
2213+
// you may not use this file except in compliance with the License.
2214+
// You may obtain a copy of the License at
2215+
//
2216+
// https://www.apache.org/licenses/LICENSE-2.0
2217+
//
2218+
// Unless required by applicable law or agreed to in writing, software
2219+
// distributed under the License is distributed on an "AS IS" BASIS,
2220+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2221+
// See the License for the specific language governing permissions and
2222+
// limitations under the License.
2223+
//
2224+
// This header file contains C++11 versions of standard <utility> header
2225+
// abstractions available within C++14 and C++17, and are designed to be drop-in
2226+
// replacement for code compliant with C++14 and C++17.
2227+
2228+
=== License File
2229+
Apache License
2230+
Version 2.0, January 2004
2231+
https://www.apache.org/licenses/
2232+
2233+
A copy of the Apache License v2.0, January 2004 license can be found
2234+
in the 'Standard Licenses' section.
2235+
================================================================================
2236+
==
22392237

2240-
------------------------------------------------------------------------------
22412238
json (nlohmann)
22422239
----
2240+
22432241
MIT License
22442242

22452243
Copyright (c) 2013-2022 Niels Lohmann
@@ -2262,14 +2260,14 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22622260
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22632261
SOFTWARE.
22642262

2265-
------------------------------------------------------------------------------
2266-
2263+
================================================================================
2264+
==
22672265

22682266
curl
22692267
----
22702268
COPYRIGHT AND PERMISSION NOTICE
22712269

2272-
Copyright (c) 1996 - 2023, Daniel Stenberg, <[email protected]>, and many
2270+
Copyright (c) 1996 - 2024, Daniel Stenberg, <[email protected]>, and many
22732271
contributors, see the THANKS file.
22742272

22752273
All rights reserved.

cdk/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828

2929

3030

31-
CMAKE_MINIMUM_REQUIRED(VERSION 3.8)
31+
CMAKE_MINIMUM_REQUIRED(VERSION 3.15)
3232

33-
cmake_policy(VERSION 3.0)
33+
cmake_policy(VERSION 3.15)
3434

3535
if(POLICY CMP0022)
3636
cmake_policy(SET CMP0022 NEW) # consistently use INTERFACE_LINK_LIBRARIES property
@@ -150,7 +150,7 @@ IF(MSVC)
150150

151151
# TODO: move to /Wall when code base is ready for this
152152

153-
add_compile_options(/W4)
153+
set_warnings_level(4)
154154

155155
# Note: We disable warnings related to C++11 language because we want this
156156
# to be pure C++ code.

cdk/cmake/DepFindProtobuf.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function(mysqlx_protobuf_generate_cpp SRCS HDRS)
115115
ELSEIF(MSVC)
116116
set_source_files_properties(${srcs}
117117
APPEND_STRING PROPERTY COMPILE_FLAGS
118-
"/W1 /wd4018 /wd4996 /wd4244 /wd4267"
118+
"/wd4018 /wd4996 /wd4244 /wd4267"
119119
)
120120
ENDIF()
121121

cdk/cmake/compiler/MSVC.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,16 @@ function(set_visibility)
8989
endfunction()
9090

9191

92+
function(set_warnings_level N)
93+
94+
# Note: The /Wn flag must be set only once, otherwise msvc shows warnings
95+
96+
string(REGEX REPLACE "/W[123456789]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
97+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W${N}")
98+
99+
endfunction()
100+
101+
92102
function(set_msvcrt TYPE)
93103

94104
if(TYPE MATCHES "^(STATIC|Static|static)$")

cdk/cmake/dependency.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ set(EXT_FWD
6060
CMAKE_SYSTEM_PROCESSOR
6161
CMAKE_C_COMPILER CMAKE_CXX_COMPILER
6262
MSVC
63+
WERROR
6364
)
6465

6566
set(EXT_DIR ${CMAKE_CURRENT_LIST_DIR}/ext CACHE INTERNAL "external project utils location")
@@ -129,7 +130,7 @@ function(add_ext NAME HEADER)
129130
"${EXT_LIB} library name"
130131
)
131132

132-
133+
133134
#show_config_options()
134135

135136
# Handle non-path value of WITH_X option

cdk/cmake/gtest.cmake

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@
3232
# Set up gtest for use by targets in given folder and its sub-folders.
3333
#
3434
MACRO(SETUP_GTEST)
35-
IF (WITH_GTEST)
36-
INCLUDE_DIRECTORIES(${GTEST_INCLUDE_DIRS})
37-
ENDIF (WITH_GTEST)
3835
ENDMACRO(SETUP_GTEST)
3936

4037

@@ -135,6 +132,14 @@ MESSAGE("gtest_main location: ${gtest_main_location}")
135132
add_library(gtest STATIC IMPORTED)
136133
add_library(gtest_main STATIC IMPORTED)
137134

135+
target_include_directories(gtest INTERFACE ${GTEST_INCLUDE_DIRS})
136+
137+
# See: https://stackoverflow.com/questions/42847103/stdtr1-with-visual-studio-2017
138+
139+
target_compile_definitions(gtest INTERFACE
140+
-DGTEST_LANG_CXX11=1
141+
)
142+
138143
set_target_properties(gtest PROPERTIES
139144
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
140145
IMPORTED_LOCATION "${gtest_location}"

0 commit comments

Comments
 (0)