Skip to content

Commit d146f00

Browse files
authored
Merge pull request #2 from riptano/2.14.0-alpha-2_prep
2.14.0 alpha-2 release preparation
2 parents aef8670 + e7d37ac commit d146f00

File tree

86 files changed

+1494
-388
lines changed

Some content is hidden

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

86 files changed

+1494
-388
lines changed

.build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ build_driver() {
7474
(
7575
cd build
7676
BUILD_INTEGRATION_TESTS=Off
77-
if [ "${RELEASE}" = "bionic64" ]; then
77+
if [ "${CI_SCHEDULE}" != "commit" ]; then
7878
BUILD_INTEGRATION_TESTS=On
7979
fi
8080
cmake -DCMAKE_BUILD_TYPE=Release \

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
2.14.0-alpha2
2+
===========
3+
4+
Features
5+
--------
6+
[CPP-812] - Enable warnings for implicit casts and fix problems
7+
[CPP-813] - Detect CaaS and change consistency default
8+
[CPP-817] - Provide error if mixed usage of secure connect bundle and contact points/ssl context
9+
10+
Bug Fixes
11+
--------
12+
[CPP-802] - Handle prepared id mismatch when repreparing on the fly
13+
[CPP-815] - Schema agreement fails with SNI
14+
[CPP-811] - Requests won't complete if they exceed the number of streams on a connection
15+
116
2.14.0-alpha
217
===========
318

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ environment:
3939
DRIVER_TYPE: CASS
4040
BOOST_VERSION: 1.69.0
4141
LIBSSH2_VERSION: 1.9.0
42-
LIBUV_VERSION: 1.31.0
42+
LIBUV_VERSION: 1.32.0
4343
OPENSSL_1_0_VERSION: 1.0.2s
4444
OPENSSL_1_1_VERSION: 1.1.1c
4545
ZLIB_VERSION: 1.2.11

build.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@ schedules:
99
slack: cpp-driver-dev-bots
1010
branches:
1111
include: ["/CPP-\\d+/", "master"]
12+
env_vars: |
13+
CI_SCHEDULE=commit
14+
nightly:
15+
schedule: nightly
16+
notify:
17+
slack: cpp-driver-dev-bots
18+
branches:
19+
include: ["/CPP-\\d+/", "master"]
20+
matrix:
21+
exclude:
22+
- os: ['ubuntu/trusty64/cpp', 'ubuntu/xenial64/cpp', 'centos/6-64/cpp', 'centos/7-64/cpp', 'osx/high-sierra']
23+
env_vars: |
24+
CI_SCHEDULE=nightly
1225
architecture:
1326
- x64
1427
os:
@@ -19,7 +32,7 @@ os:
1932
- centos/7-64/cpp
2033
- osx/high-sierra
2134
env:
22-
LIBUV_VERSION: 1.31.0
35+
LIBUV_VERSION: 1.32.0
2336
build:
2437
- script: |
2538
. .build.sh

cmake/modules/CppDriver.cmake

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,18 @@ macro(CassConfigureShared prefix)
151151
if("${prefix}" STREQUAL "DSE")
152152
set(STATIC_COMPILE_FLAGS "${STATIC_COMPILE_FLAGS} -DCASS_BUILDING")
153153
endif()
154-
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
155-
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
154+
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
155+
set_property(
156+
TARGET ${PROJECT_LIB_NAME}
157+
APPEND PROPERTY COMPILE_FLAGS "${STATIC_COMPILE_FLAGS} -Wconversion -Wno-sign-conversion -Wno-shorten-64-to-32 -Wno-undefined-var-template -Werror")
158+
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # To many superfluous warnings generated with GCC when using -Wconversion (see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40752)
156159
set_property(
157160
TARGET ${PROJECT_LIB_NAME}
158161
APPEND PROPERTY COMPILE_FLAGS "${STATIC_COMPILE_FLAGS} -Werror")
162+
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
163+
set_property(
164+
TARGET ${PROJECT_LIB_NAME}
165+
APPEND PROPERTY COMPILE_FLAGS "${STATIC_COMPILE_FLAGS} /we4800")
159166
endif()
160167
endmacro()
161168

@@ -181,11 +188,18 @@ macro(CassConfigureStatic prefix)
181188
if("${prefix}" STREQUAL "DSE")
182189
set(STATIC_COMPILE_FLAGS "${STATIC_COMPILE_FLAGS} -DCASS_STATIC")
183190
endif()
184-
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
185-
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
191+
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
192+
set_property(
193+
TARGET ${PROJECT_LIB_NAME_STATIC}
194+
APPEND PROPERTY COMPILE_FLAGS "${STATIC_COMPILE_FLAGS} -Wconversion -Wno-sign-conversion -Wno-shorten-64-to-32 -Wno-undefined-var-template -Werror")
195+
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # To many superfluous warnings generated with GCC when using -Wconversion (see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40752)
186196
set_property(
187197
TARGET ${PROJECT_LIB_NAME_STATIC}
188198
APPEND PROPERTY COMPILE_FLAGS "${STATIC_COMPILE_FLAGS} -Werror")
199+
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
200+
set_property(
201+
TARGET ${PROJECT_LIB_NAME_STATIC}
202+
APPEND PROPERTY COMPILE_FLAGS "${STATIC_COMPILE_FLAGS} /we4800")
189203
endif()
190204

191205
# Update the CXX flags to indicate the use of the static library
@@ -874,7 +888,6 @@ macro(CassSetCompilerFlags)
874888
# TODO(mpenick): Fix these "possible loss of data" warnings
875889
add_definitions(/wd4244)
876890
add_definitions(/wd4267)
877-
add_definitions(/wd4800) # Performance warning due to automatic compiler casting from int to bool
878891

879892
# Add preprocessor definitions for proper compilation
880893
add_definitions(-D_CRT_SECURE_NO_WARNINGS) # Remove warnings for not using safe functions (TODO: Fix codebase to be more secure for Visual Studio)

cmake/modules/ExternalProject-libuv.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if(NOT LIBUV_INSTALL_PREFIX)
2222
endif()
2323
option(LIBUV_VERSION "libuv version to build and install")
2424
if(NOT LIBUV_VERSION)
25-
set(LIBUV_VERSION "1.31.0")
25+
set(LIBUV_VERSION "1.32.0")
2626
endif()
2727
set(LIBUV_VERSION ${LIBUV_VERSION} CACHE STRING "libuv version to build and install" FORCE)
2828

gtests/src/integration/integration.cpp

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Integration::Integration()
5656
, is_ccm_start_requested_(true)
5757
, is_ccm_start_node_individually_(false)
5858
, is_session_requested_(true)
59+
, is_keyspace_change_requested_(true)
5960
, is_test_chaotic_(false)
6061
, is_beta_protocol_(Options::is_beta_protocol())
6162
, protocol_version_(CASS_HIGHEST_SUPPORTED_PROTOCOL_VERSION)
@@ -209,7 +210,9 @@ void Integration::TearDown() {
209210
// Determine if the CCM cluster should be destroyed
210211
if (is_test_chaotic_) {
211212
// Destroy the current cluster and reset the chaos flag for the next test
212-
ccm_->remove_cluster();
213+
if (!Options::keep_clusters()) {
214+
ccm_->remove_cluster();
215+
}
213216
is_test_chaotic_ = false;
214217
}
215218
}
@@ -298,6 +301,16 @@ void Integration::drop_type(const std::string& type_name) {
298301
session_.execute(drop_type_query.str(), CASS_CONSISTENCY_ANY, false, false);
299302
}
300303

304+
bool Integration::use_keyspace(const std::string& keyspace_name) {
305+
std::stringstream use_keyspace_query;
306+
use_keyspace_query << "USE " << keyspace_name;
307+
session_.execute(use_keyspace_query.str());
308+
if (this->HasFailure()) {
309+
return false;
310+
}
311+
return true;
312+
}
313+
301314
void Integration::connect(Cluster cluster) {
302315
// Establish the session connection
303316
cluster_ = cluster;
@@ -320,9 +333,9 @@ void Integration::connect(Cluster cluster) {
320333
CHECK_FAILURE;
321334

322335
// Update the session to use the new keyspace by default
323-
std::stringstream use_keyspace_query;
324-
use_keyspace_query << "USE " << keyspace_name_;
325-
session_.execute(use_keyspace_query.str());
336+
if (is_keyspace_change_requested_) {
337+
use_keyspace(keyspace_name_);
338+
}
326339
}
327340

328341
void Integration::connect() {

gtests/src/integration/integration.hpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,12 @@
107107

108108
#define CHECK_CONTINUE(flag, message) ASSERT_TRUE(flag) << message;
109109

110-
#define CASSANDRA_KEY_VALUE_TABLE_FORMAT "CREATE TABLE %s (key %s PRIMARY KEY, value %s)"
110+
#define CASSANDRA_KEY_VALUE_TABLE_FORMAT \
111+
"CREATE TABLE IF NOT EXISTS %s (key %s PRIMARY KEY, value %s)"
112+
#define CASSANDRA_KEY_VALUE_QUALIFIED_TABLE_FORMAT \
113+
"CREATE TABLE IF NOT EXISTS %s.%s (key %s PRIMARY KEY, value %s)"
111114
#define CASSANDRA_KEY_VALUE_INSERT_FORMAT "INSERT INTO %s (key, value) VALUES(%s, %s)"
115+
#define CASSANDRA_KEY_VALUE_QUALIFIED_INSERT_FORMAT "INSERT INTO %s.%s (key, value) VALUES(%s, %s)"
112116
#define CASSANDRA_SELECT_VALUE_FORMAT "SELECT value FROM %s WHERE key=%s"
113117
#define CASSANDRA_DELETE_ROW_FORMAT "DELETE FROM %s WHERE key=%s"
114118
#define CASSANDRA_UPDATE_VALUE_FORMAT "UPDATE %s SET value=%s WHERE key=%s"
@@ -278,6 +282,11 @@ class Integration : public testing::Test {
278282
* (DEFAULT: true)
279283
*/
280284
bool is_session_requested_;
285+
/**
286+
* Flag to indicate if the newly created keyspace should be set for the session connection.
287+
* (DEFAULT: true)
288+
*/
289+
bool is_keyspace_change_requested_;
281290
/**
282291
* Flag to indicate if a test is chaotic and should have its CCM cluster
283292
* destroyed
@@ -375,6 +384,14 @@ class Integration : public testing::Test {
375384
*/
376385
virtual void drop_type(const std::string& type_name);
377386

387+
/**
388+
* Update the current keyspace used by the session
389+
*
390+
* @param keyspace_name Keyspace to use
391+
* @return True if keyspace was changed; false otherwise
392+
*/
393+
virtual bool use_keyspace(const std::string& keyspace_name);
394+
378395
/**
379396
* Establish the session connection using provided cluster object.
380397
*

0 commit comments

Comments
 (0)