Skip to content

Commit 4828918

Browse files
committed
Merge remote-tracking branch 'origin/release/8.0.16'
2 parents cd3f7eb + c836e39 commit 4828918

File tree

6 files changed

+39
-14
lines changed

6 files changed

+39
-14
lines changed

LICENSE.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Introduction
1010
third-party software which may be included in this distribution of
1111
MySQL Connector/C++ 8.0.
1212

13-
Last updated: January 2019.
13+
Last updated: March 2019
1414

1515
Licensing Information
1616

@@ -2059,4 +2059,4 @@ Written Offer for Source Code
20592059
a. within three (3) years of the date you received the Oracle product
20602060
that included the binary that is the subject of your request, or
20612061
b. in the case of code licensed under the GPL v3 for as long as Oracle
2062-
offers spare parts or customer support for that product model.
2062+
offers spare parts or customer support for that product model.

PackageSpecs.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ ELSE(EXTRA_NAME_SUFFIX)
110110
ENDIF(EXTRA_NAME_SUFFIX)
111111

112112
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")
113+
set(CPACK_TOPLEVEL_TAG "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
113114
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
114115
if(CMAKE_BUILD_TYPE STREQUAL Debug)
115116
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}-debug")

cdk/cmake/compiler/GCC.cmake

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,27 @@
2828

2929
##########################################################################
3030

31+
#
32+
# Ensure relative source locations in debug entries
33+
#
34+
35+
option(DEBUG_PREFIX_MAP
36+
"Set -fdebug-prefix-map option to ensure relative source locations in debug entries."
37+
ON
38+
)
39+
40+
if(DEBUG_PREFIX_MAP)
41+
42+
foreach(LANG C CXX)
43+
foreach(TYPE DEBUG RELWITHDEBINFO)
44+
set(CMAKE_${LANG}_FLAGS_${TYPE}
45+
"-fdebug-prefix-map=${CMAKE_SOURCE_DIR}=. ${CMAKE_${LANG}_FLAGS_${TYPE}}"
46+
)
47+
endforeach(TYPE)
48+
endforeach(LANG)
49+
50+
endif(DEBUG_PREFIX_MAP)
51+
3152
#
3253
# Deal with broken optimization in gcc 4.8.
3354
#

cdk/foundation/socket_detail.cc

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ PUSH_SYS_WARNINGS_CDK
4444
#include <limits>
4545
#include <chrono>
4646
#include <sstream>
47+
4748
#ifndef _WIN32
4849
#include <arpa/inet.h>
4950
#include <signal.h>
@@ -607,9 +608,14 @@ Socket connect(const char *host_name, unsigned short port,
607608
if (connect_result == SOCKET_ERROR && errno == EINPROGRESS)
608609
#endif
609610
{
610-
int select_result = poll_one(socket, POLL_MODE_CONNECT,true,
611-
(uint64_t)duration_cast<microseconds>(
612-
deadline - system_clock::now()).count());
611+
auto timeout = duration_cast<microseconds>(
612+
deadline - system_clock::now()
613+
).count();
614+
615+
int select_result = poll_one(
616+
socket, POLL_MODE_CONNECT, true,
617+
0 == timeout_usec ? 0 : timeout > 0 ? timeout : 1
618+
);
613619

614620
if (select_result == 0 && (timeout_usec > 0) &&
615621
(std::chrono::system_clock::now() >= deadline))
@@ -759,6 +765,7 @@ Socket listen_and_accept(unsigned short port)
759765
return client;
760766
}
761767

768+
762769
int poll_one(Socket socket, Poll_mode mode, bool wait,
763770
uint64_t timeout_usec)
764771
{
@@ -790,13 +797,9 @@ DIAGNOSTIC_PUSH_CDK
790797
DIAGNOSTIC_POP_CDK
791798

792799
//milliseconds
793-
int timeout = -1;
794-
795-
if (wait && timeout_usec > 0)
796-
{
797-
// If timeout is specified we will use it
798-
timeout = static_cast<int>(timeout_usec / 1000);
799-
}
800+
int timeout =
801+
!wait ? 0
802+
: timeout_usec > 0 ? static_cast<int>((1000+timeout_usec) / 1000) : -1;
800803

801804
#ifdef _WIN32
802805
int result = ::WSAPoll(&fds, 1, timeout);

jdbc

packaging/mysql-connector-c++.spec.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ test suite for MySQL Connector/C++
130130
%endif
131131

132132
%global __cmake_explicit_opts -DCMAKE_INSTALL_PREFIX="%_prefix" -DCMAKE_C_FLAGS:STRING="%optflags" -DCMAKE_CXX_FLAGS:STRING="%optflags"
133-
%global __cmake_common_opts -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/mysql-cppconn-8 -DWITH_JDBC=ON -DWITH_SSL=system %{__cmake_test_opts} %{?mysql_opt}
133+
%global __cmake_common_opts -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/mysql-cppconn-8 -DWITH_JDBC=ON -DWITH_SSL=system %{__cmake_test_opts} %{?mysql_opt} -DDEBUG_PREFIX_MAP=OFF
134134

135135
%if 0%{?rhel}
136136
%global __cmake_cmd cmake3 %{__cmake_common_opts} %{__cmake_explicit_opts} ..

0 commit comments

Comments
 (0)