Skip to content

Commit

Permalink
At 772 Bump SDK version to 1.8.186 (#60)
Browse files Browse the repository at this point in the history
* bump aws sdk version to 1.9.19, and remove unrelated files

* change aws sdk version from 1.9.19 to 1.8.186 to resolve compiler warning

* use TS_ODBC_VERSION instead of hardcoing

* remove re-definition

* remove gibberish
  • Loading branch information
yanw-bq authored May 17, 2021
1 parent cb472d4 commit 7c8337e
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 53 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/mac-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
sudo mkdir /Library/ODBC
sudo mv ./src/IntegrationTests/ITODBCConnection/odbc.ini /Library/ODBC
mkdir ${{ github.workspace }}/odbc-logs
- name: run-integration-tests
- name: run-integration-connection-tests
run: |
./build/odbc/bin/itodbc_connection
- name: run-integration-execution-tests
Expand All @@ -70,7 +70,6 @@ jobs:
if: failure()
run: |
cat /tmp/timestreamodbc_*.log
cat /tmp/elasticodbc_*.log
cat ./aws_sdk_*.log
- name: print-memory-leak-logs
if: always()
Expand Down
2 changes: 1 addition & 1 deletion THIRD-PARTY
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
** aws-cpp-sdk-core -- https://github.com/aws/aws-sdk-cpp (1.8.108)
** aws-cpp-sdk-core -- https://github.com/aws/aws-sdk-cpp (1.8.186)
** rapidjson -- https://github.com/Tencent/rapidjson (1.1.0)
** rabbit -- https://github.com/mashiro/rabbit (master branch on November 18th, 2019)
** PostgreSQL v12.0 -- https://www.postgresql.org/ftp/source/v12.0/ (v12.0)
Expand Down
20 changes: 0 additions & 20 deletions aws_sdk_cpp_setup.sh

This file was deleted.

2 changes: 1 addition & 1 deletion build_mac_debug64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# $BITNESS=64

cd src
git clone -b "1.8.108" "https://github.com/aws/aws-sdk-cpp.git"
git clone --recurse-submodules -b "1.8.186" "https://github.com/aws/aws-sdk-cpp.git"
cd ..

PREFIX_PATH=$(pwd)
Expand Down
2 changes: 1 addition & 1 deletion build_mac_release64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# $BITNESS=64

cd src
git clone --recurse-submodules -b "1.8.108" "https://github.com/aws/aws-sdk-cpp.git"
git clone --recurse-submodules -b "1.8.186" "https://github.com/aws/aws-sdk-cpp.git"
cd ..

PREFIX_PATH=$(pwd)
Expand Down
13 changes: 0 additions & 13 deletions opendistro-elasticsearch-odbc.release-notes.md

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/build_aws-sdk-cpp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $INSTALL_DIR = $args[4]
Write-Host $args

# Clone the AWS SDK CPP repo
git clone --recurse-submodules -b "1.8.108" "https://github.com/aws/aws-sdk-cpp.git" $SRC_DIR
git clone --recurse-submodules -b "1.8.186" "https://github.com/aws/aws-sdk-cpp.git" $SRC_DIR

# Make and move to build directory
New-Item -Path $BUILD_DIR -ItemType Directory -Force | Out-Null
Expand Down
2 changes: 1 addition & 1 deletion src/IntegrationTests/ITODBCInfo/test_odbc_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ TEST_SQL_GET_INFO_STRING(SQLCatalogTerm, SQL_CATALOG_TERM, L"database");
///////////////

TEST_SQL_GET_INFO_STRING(SQLDBMSName, SQL_DBMS_NAME, L"Amazon Timestream");
TEST_SQL_GET_INFO_VERSION_GE(SQLDBMSVer, SQL_DBMS_VER, L"1.8.108");
TEST_SQL_GET_INFO_VERSION_GE(SQLDBMSVer, SQL_DBMS_VER, L"0.2.0");

///////////////////
// Supported SQL //
Expand Down
11 changes: 6 additions & 5 deletions src/odfesqlodbc/es_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include "multibyte.h"
#include "qresult.h"
#include "statement.h"
#include "version.h"

#define ERROR_BUFF_SIZE 200

Expand Down Expand Up @@ -82,7 +83,7 @@ void* LIB_connect(ConnectionClass *self) {
if (conn == nullptr) {
throw std::runtime_error("Communication is nullptr.");
}
// Set sdk version
// Set driver version
std::string version = GetVersion(conn);
STRCPY_FIXED(self->version, version.c_str());

Expand Down Expand Up @@ -176,10 +177,10 @@ int CC_send_client_encoding(ConnectionClass *self, const char *encoding) {
}

void CC_initialize_version(ConnectionClass *self) {
STRCPY_FIXED(self->version, "1.8.108");
self->version_major = 1;
self->version_minor = 8;
self->version_patch = 108;
STRCPY_FIXED(self->version, TIMESTREAMDRIVERVERSION);
self->version_major = 0;
self->version_minor = 2;
self->version_patch = 0;
}

void LIB_disconnect(void *conn) {
Expand Down
4 changes: 1 addition & 3 deletions src/odfesqlodbc/es_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,7 @@ struct ConnectionClass_ {
DriverToDataSourceProc DriverToDataSource;
char transact_status; /* Is a transaction is currently
* in progress */
char version[MAX_INFO_STRING]; /* Version of AWS sdk
* we're using "1.8.108"
*/
char version[MAX_INFO_STRING]; /* Version of driver */
Int2 version_major;
Int2 version_minor;
Int2 version_patch;
Expand Down
2 changes: 1 addition & 1 deletion src/odfesqlodbc/es_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ConnStatusType GetStatus(void* conn) {
std::string GetVersion(void* conn) {
return conn
? static_cast< Communication* >(conn)->GetVersion()
: "1.8.108";
: "0.2.0";
}

int ESExecDirect(void* conn, StatementClass* stmt, const char* statement) {
Expand Down
6 changes: 3 additions & 3 deletions src/odfesqlodbc/ts_communication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
*/

#include "ts_communication.h"
#include "es_statement.h"

// odfesqlodbc needs to be included before mylog, otherwise mylog will generate
// compiler warnings
// clang-format off
#include "es_odbc.h"
#include "es_statement.h"
#include "version.h"
#include "mylog.h"
#include <sstream>
#include <memory>
Expand Down Expand Up @@ -166,8 +167,7 @@ void TSCommunication::Disconnect() {
}

std::string TSCommunication::GetVersion() {
// AWS SDK version
return "1.8.108";
return TIMESTREAMDRIVERVERSION;
}

std::string TSCommunication::GetErrorPrefix() {
Expand Down
2 changes: 1 addition & 1 deletion src/odfesqlodbc/ts_communication.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class TSCommunication : public Communication {
*/
virtual int ExecDirect(StatementClass* stmt, const char* query) override;
/**
* Get version
* Get driver version
* @return std::string
*/
virtual std::string GetVersion() override;
Expand Down

0 comments on commit 7c8337e

Please sign in to comment.