Skip to content

Commit fe412c6

Browse files
committed
Merge from connector-cpp-1.1.6-release
2 parents e60ace7 + b7c06da commit fe412c6

File tree

14 files changed

+211
-151
lines changed

14 files changed

+211
-151
lines changed

ANNOUNCEMENT

Lines changed: 58 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -4,85 +4,90 @@ This is a release of MySQL Connector/C++, Oracle's
44
dual-license C++ API for connecting client applications
55
to MySQL.
66

7-
Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
7+
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
88

99
--------------------------------------------------------------------------------
1010

1111
Dear MySQL Users,
1212

13-
A new GA (general availability) version of MySQL Connector/C++ has been made available: MySQL Connector/C++ 1.1.5 GA. The MySQL Connector/C++ provides a C++ API for
14-
connecting client applications to the MySQL Server 5.5 or newer. You can download the production release at:
13+
A new GA (general availability) version of MySQL Connector/C++ has
14+
been made available: MySQL Connector/C++ 1.1.6 GA. The MySQL
15+
Connector/C++ provides a C++ API for connecting client applications to
16+
the MySQL Server 5.5 or newer. You can download the production release
17+
at:
1518

1619
http://dev.mysql.com/downloads/connector/cpp/1.1.html
1720

18-
The MySQL driver for C++ offers an easy to use API derived from JDBC 4.0. MySQL Workbench is using it successfully since years.
21+
The MySQL driver for C++ offers an easy to use API derived from JDBC
22+
4.0. MySQL Workbench is using it successfully since years.
1923

20-
The major changes in 1.1.5 are:
24+
The major changes in 1.1.6 are:
2125

22-
Functionality Added or Changed
26+
Security Notes
2327

24-
* MySQL_Prepared_Statement::getMoreResults() functionality
25-
has been implemented, so multiple result sets now can be
26-
fetched using a prepared statement. (Bug #19147677)
28+
* Connector/C++ 1.1.6 Commercial upgrades the linked OpenSSL
29+
library to version 1.0.1m which has been publicly reported
30+
as not vulnerable to CVE-2015-0286
31+
(http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-0286).
2732

28-
* The following connection options have been implemented:
29-
MYSQL_DEFAULT_AUTH, MYSQL_OPT_CONNECT_ATTR_DELETE,
30-
MYSQL_OPT_CONNECT_ATTR_RESET, MYSQL_OPT_LOCAL_INFILE,
31-
MYSQL_PLUGIN_DIR, MYSQL_READ_DEFAULT_FILE,
32-
MYSQL_READ_DEFAULT_GROUP, MYSQL_SET_CHARSET_DIR, and
33-
max_statement_timeout for session-based query timeout.
34-
(Bug #73665, Bug #19479950)
33+
Functionality Added or Changed
3534

36-
* These functions were added: Connection::isValid() checks
37-
whether the connection is alive, and
38-
Connection::reconnect() reconnects if the connection has
39-
gone down. (Bug #65640, Bug #14207722)
35+
* The std::auto_ptr class template is deprecated in C++11,
36+
and its usage has been replaced with
37+
boost::scoped_ptr/shared_ptr.
38+
The CMAKE_ENABLE_C++11 CMake option has been added to
39+
permit enabling C++11 support. (Bug #75251)
4040

41-
Bugs Fixed
41+
* Connector/C++ now provides macros to indicate the
42+
versions of libraries against which it was built:
43+
MYCPPCONN_STATIC_MYSQL_VERSION and
44+
MYCPPCONN_STATIC_MYSQL_VERSION_ID (MySQL client library
45+
version, string and numeric), and MYCPPCONN_BOOST_VERSION
46+
(Boost library version, numeric). (Bug #75250)
4247

43-
* Several metadata flaws were corrected:
48+
Bugs Fixed
4449

45-
+ getTables() did not return a correct result when
46-
TableType=VIEW and metadataUseInfoSchema=false.
50+
* With defaultStatementResultType=FORWARD_ONLY and a row
51+
position after the last row, using getter methods such as
52+
getInt() or getString() resulted in a segmentation fault.
53+
(Bug #20085944)
4754

48-
+ getColumns() did not return column inforomation when
49-
metadataUseInfoSchema=TRUE.
55+
* For prepared statements, calling wasNull() before
56+
fetching data resulted in an assertion failure.
57+
(Bug #19938873)
5058

51-
+ getColumnName() returned the display name instead of
52-
the actual column name.
59+
* Result sets from prepared statements were not freed.
60+
(Bug #18135088)
5361

54-
+ getProcedures() returned a syntax error when
55-
metadataUseInfoSchema=false.
56-
(Bug #19505348, Bug #19147897, Bug #19244736, Bug
57-
#19505421)
62+
* MySQL Connector/C++ failed to build against
63+
Boost-devel-1.41.0-25 on OLE6.
64+
(Bug #75063, Bug #20125824)
5865

59-
* CMake did not pick up the libmysqlclient path from the
60-
MYSQL_LIB_DIR option. (Bug #19370844)
66+
* Configuration failed if the MYSQL_CONFIG_EXECUTABLE
67+
option was specified and the MySQL installation path
68+
contained the characters -m. Installation failed if the
69+
build directory was not in the top source directory.
70+
(Bug #73502, Bug #19447498)
6171

62-
* driver/version_info.h (containing version macros) was not
63-
included in the installed header files. (Bug #73795, Bug
64-
#19553971)
72+
* For prepared statements, getString() did not return the
73+
fractional seconds part from temporal columns that had a
74+
fractional sections part. (Bug #68523, Bug #17218692)
6575

66-
* CMake could misconfigure the link flags. (Bug #73427, Bug
67-
#19315635)
76+
* For queries of the form SELECT MAX(bit_col) FROM
77+
table_with_bit_col, getString() returned an incorrect
78+
result. (Bug #66235, Bug #14520822)
6879

69-
* With the result set type set to TYPE_FORWARD_ONLY,
70-
Statement::executeQuery() returns almost immediately, but
71-
MySQL_ResultSet::next() and
72-
MySQL_Prepared_ResultSet::next() returned false if the
73-
connection was lost rather than throwing an exception,
74-
making it impossible to distinguish loss of connection
75-
from normal end of the result set.
76-
MySQL_ResultSet::next() and
77-
MySQL_Prepared_ResultSet::next() now throw an exception
78-
when the connection is lost. (Bug #69031, Bug #18886278)
80+
* For Connector/C++ builds from source, make install failed
81+
if only the static library had been built without the
82+
dynamic library. (Bug #52281, Bug #11759926)
7983

80-
You can find further details, including usages examples, in the documentation at:
84+
You can find further details, including usages examples, in the
85+
documentation at:
8186

8287
http://dev.mysql.com/doc/en/connector-cpp.html
8388

84-
85-
You may also want to contribute to the MySQL Forum on C/C++ at http://forums.mysql.com/list.php?167 or join the MySQL Connector/C++ mailing list
86-
http://lists.mysql.com/connector-cplusplus .
89+
You may also want to contribute to the MySQL Forum on C/C++ at
90+
http://forums.mysql.com/list.php?167 or join the MySQL Connector/C++
91+
mailing list http://lists.mysql.com/connector-cplusplus .
8792

8893
Enjoy!

CMakeLists.txt

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
33
#
44
# The MySQL Connector/C++ is licensed under the terms of the GPLv2
55
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
@@ -34,6 +34,7 @@ ENDIF(COMMAND cmake_policy AND POLICY CMP0015)
3434
INCLUDE(VersionInfo.cmake)
3535

3636
OPTION(TAR_LAYOUT "Use directory layout for an unpacked TAR install")
37+
OPTION(RPM_LAYOUT "Use directory layout for an RPM install")
3738

3839
IF(TAR_LAYOUT OR NOT CMAKE_VERSION OR CMAKE_VERSION VERSION_LESS "2.8.5")
3940
SET(INSTALL_LIBDIR lib)
@@ -45,7 +46,8 @@ ENDIF()
4546
SET(EDIT_WARNING_MESSAGE "Please do not edit this file - it is generated by cmake. Edit its source file instead.")
4647

4748
# Configuring header file with driver version info
48-
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/driver/version_info.h.cmake ${CMAKE_SOURCE_DIR}/driver/version_info.h @ONLY)
49+
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/driver/version_info.h.cmake
50+
${CMAKE_BINARY_DIR}/driver/version_info.h @ONLY)
4951

5052
# This is needed by windows installer and fro CPACK
5153
IF(EXISTS "${CMAKE_SOURCE_DIR}/COPYING")
@@ -57,8 +59,8 @@ ENDIF(EXISTS "${CMAKE_SOURCE_DIR}/COPYING")
5759
# Creating file with version info that will be used for installer
5860
# We have to do this trick because of license filename that is looked in this CMAKE_SOURCE_DIR (installer's cmake is run separately)
5961
IF(WIN32)
60-
FILE(WRITE "${CMAKE_SOURCE_DIR}/win/config.cmake" "SET(CONNECTOR_PRODUCT_VERSION ${CONNECTOR_VERSION})
61-
SET( LICENSE_FILENAME "${LICENSE_FILENAME}")")
62+
FILE(WRITE "${CMAKE_BINARY_DIR}/win/config.cmake" "SET(CONNECTOR_PRODUCT_VERSION ${CONNECTOR_VERSION})\n"
63+
"SET(LICENSE_FILENAME \"${LICENSE_FILENAME}\")\n")
6264
ENDIF(WIN32)
6365

6466
#-----------------
@@ -232,7 +234,8 @@ IF(MYSQLCLIENT_STATIC_BINDING AND EXISTS "${CMAKE_SOURCE_DIR}/cmake/mysql_versio
232234
ENDIF()
233235

234236
# Configuring header file with DM version info
235-
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cppconn/version_info.h.cmake ${CMAKE_SOURCE_DIR}/cppconn/version_info.h @ONLY)
237+
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cppconn/version_info.h.cmake
238+
${CMAKE_BINARY_DIR}/cppconn/version_info.h @ONLY)
236239

237240
#
238241
# ----------------------------------------------------------------------
@@ -297,20 +300,51 @@ ELSE(WIN32)
297300
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
298301
ENDIF(WIN32)
299302

303+
SET(DOC_DESTINATION ".")
304+
IF(RPM_LAYOUT)
305+
SET(DOC_DESTINATION "share/doc/${CPACK_PACKAGE_NAME}-${MYSQLCPPCONN_VERSION}")
306+
ENDIF()
307+
300308
INSTALL(FILES
301309
${CPACK_RESOURCE_FILE_README}
302310
${CPACK_RESOURCE_FILE_INSTALL}
303311
${CPACK_RESOURCE_FILE_LICENSE}
304312
"${CMAKE_SOURCE_DIR}/Licenses_for_Third-Party_Components.txt"
305313
"${CMAKE_SOURCE_DIR}/ANNOUNCEMENT"
306-
DESTINATION "." OPTIONAL)
307-
308-
SET(COMMON_IGNORE_FILES "/CMakeFiles/" "/Testing/" "/.bzr/" "_CPack_Packages/"
309-
"~" ".swp" ".log" ".gz" ".directory$" "CMakeCache.txt" "Makefile"
310-
"install_manifest.txt")
311-
SET(PRJ_COMMON_IGNORE_FILES ${COMMON_IGNORE_FILES} "ANNOUNCEMENT_102_ALPHA" "ANNOUNCEMENT_103_ALPHA" "ANNOUNCEMENT_104_BETA" "ANNOUNCEMENT_105_GA" "ANNOUNCEMENT_110_GA" "ANNOUNCEMENT_111_GA" "ANNOUNCEMENT_DRAFT" )
312-
313-
SET(CPACK_SOURCE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "./cppconn/config.h$" "./driver/nativeapi/binding_config.h$" "./driver/version_info.h$")
314+
DESTINATION ${DOC_DESTINATION} OPTIONAL)
315+
316+
SET(COMMON_IGNORE_FILES
317+
"/CMakeFiles/"
318+
"/Testing/"
319+
"/.bzr/"
320+
"_CPack_Packages/"
321+
"~"
322+
".swp"
323+
".log"
324+
".gz"
325+
".directory$"
326+
"CMakeCache.txt"
327+
"Makefile"
328+
"install_manifest.txt"
329+
)
330+
SET(PRJ_COMMON_IGNORE_FILES
331+
${COMMON_IGNORE_FILES}
332+
"ANNOUNCEMENT_102_ALPHA"
333+
"ANNOUNCEMENT_103_ALPHA"
334+
"ANNOUNCEMENT_104_BETA"
335+
"ANNOUNCEMENT_105_GA"
336+
"ANNOUNCEMENT_110_GA"
337+
"ANNOUNCEMENT_111_GA"
338+
"ANNOUNCEMENT_DRAFT"
339+
)
340+
341+
SET(CPACK_SOURCE_IGNORE_FILES
342+
${PRJ_COMMON_IGNORE_FILES}
343+
"cppconn/config.h$"
344+
"cppconn/version_info.h$"
345+
"driver/nativeapi/binding_config.h$"
346+
"driver/version_info.h$"
347+
)
314348
SET(CPACK_PACKAGE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "something_there" )
315349
SET(CPACK_SOURCE_GENERATOR "TGZ")
316350

@@ -331,7 +365,9 @@ ENDIF(WIN32)
331365
MESSAGE(STATUS "Installation path is: ${CMAKE_INSTALL_PREFIX} (overwrite with -DCMAKE_INSTALL_PREFIX=/your/path)")
332366

333367
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
368+
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
334369
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/cppconn)
370+
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/cppconn)
335371
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/driver/nativeapi)
336372

337373
ADD_SUBDIRECTORY(cppconn)

FindMySQL.cmake

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- indent-tabs-mode:nil; -*-
22
# vim: set expandtab:
33
#
4-
# Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
4+
# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
55
#
66
# The MySQL Connector/C++ is licensed under the terms of the GPLv2
77
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
@@ -550,15 +550,13 @@ else()
550550
endif()
551551

552552
# No specific paths, try some common install paths
553-
find_path(_found_header mysql.h ${_include_fallback_path})
553+
find_path(MYSQL_INCLUDE_DIR mysql.h ${_include_fallback_path})
554554

555-
if(NOT _found_header)
555+
if(NOT MYSQL_INCLUDE_DIR)
556556
message(FATAL_ERROR "Could not find \"mysql.h\" from searching "
557557
"\"${_pp_include_fallback_path}\"")
558558
endif()
559559

560-
get_filename_component(MYSQL_INCLUDE_DIR ${_found_header} PATH)
561-
562560
endif()
563561

564562
if(FINDMYSQL_DEBUG)
@@ -567,17 +565,17 @@ endif()
567565

568566
if (MYSQL_INCLUDE_DIR AND NOT MYSQL_NUM_VERSION)
569567
try_run(RUN_RESULT_VAR COMPILE_RESULT_VAR
570-
"${CMAKE_SOURCE_DIR}"
568+
"${CMAKE_BINARY_DIR}"
571569
"${CMAKE_SOURCE_DIR}/cmake/getmysqlversion.c"
572570
CMAKE_FLAGS -DINCLUDE_DIRECTORIES:STRING=${MYSQL_INCLUDE_DIR}
573-
ARGS "${CMAKE_SOURCE_DIR}/cmake/mysql_version_info.cmake"
571+
ARGS "${CMAKE_BINARY_DIR}/cmake/mysql_version_info.cmake"
574572
"MYSQL_SERVER_VERSION"
575573
"MYSQL_VERSION_ID"
576574
"LIBMYSQL_VERSION"
577575
"LIBMYSQL_VERSION_ID")
578576

579577
if(COMPILE_RESULT_VAR AND RUN_RESULT_VAR)
580-
include(${CMAKE_SOURCE_DIR}/cmake/mysql_version_info.cmake)
578+
include(${CMAKE_BINARY_DIR}/cmake/mysql_version_info.cmake)
581579
if(NOT LIBMYSQL_CPP_VERSION STREQUAL "")
582580
set(MYSQL_VERSION "${LIBMYSQL_CPP_VERSION}")
583581
elseif(NOT MYSQL_CPP_SERVER_VERSION STREQUAL "")
@@ -734,7 +732,8 @@ endif()
734732
##########################################################################
735733

736734
# FIXME needed?!
737-
if(NOT WIN32 AND MYSQLCLIENT_STATIC_LINKING AND
735+
if(MYSQLCLIENT_STATIC_LINKING AND
736+
NOT WIN32 AND
738737
NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
739738
list(APPEND MYSQL_LIBRARIES "rt")
740739
endif()

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ copy of the software is released under the version 2 of
77
the GNU General Public License. MySQL Connector/C++ is
88
brought to you by Oracle.
99

10-
Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
10+
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
1111

1212
License information can be found in the COPYING file.
1313

VersionInfo.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
SET(CONNECTOR_MAJOR "1")
2626
SET(CONNECTOR_MINOR "1")
27-
SET(CONNECTOR_PATCH "5")
27+
SET(CONNECTOR_PATCH "6")
2828
SET(CONNECTOR_LEVEL "") # "-alpha", "-beta", empty if GA
2929
SET(CONNECTOR_QUALITY "GA")
3030

cppconn/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
33
#
44
# The MySQL Connector/C++ is licensed under the terms of the GPLv2
55
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
@@ -53,12 +53,13 @@ CHECK_FUNCTION_EXISTS(strtoimax HAVE_FUNCTION_STRTOIMAX)
5353
CHECK_FUNCTION_EXISTS(strtoumax HAVE_FUNCTION_STRTOUMAX)
5454

5555

56-
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cm ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
56+
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cm
57+
${CMAKE_CURRENT_BINARY_DIR}/config.h)
5758

5859

5960
SET(MYSQLCPPCONN_INSTALL_HEADERS
6061
build_config.h
61-
config.h
62+
${CMAKE_CURRENT_BINARY_DIR}/config.h
6263
connection.h
6364
datatype.h
6465
driver.h
@@ -71,7 +72,7 @@ SET(MYSQLCPPCONN_INSTALL_HEADERS
7172
statement.h
7273
sqlstring.h
7374
warning.h
74-
version_info.h
75+
${CMAKE_CURRENT_BINARY_DIR}/version_info.h
7576
variant.h)
7677

7778
INSTALL(FILES ${MYSQLCPPCONN_INSTALL_HEADERS} DESTINATION include/cppconn)

0 commit comments

Comments
 (0)