Skip to content

Commit

Permalink
At 665 Conversion from VARCHAR to other C types (#33)
Browse files Browse the repository at this point in the history
* support conversion from VARCHAR to numeric types, and error handling

* error handling for double and float

* add test case for VARCHAR to SQL Char

* support converting from VARCHAR to Timestamp

* add test case for from varchar to time and to date

* error handling for time/date/timestamp

* fix TS_TYPE_VARCHAR

* fix all integration tests

* add support for conversion from varchar to interval

* revert changes for null-termination char, and improve helper functions

* add missing checking for indicator

* change buffer length for internal types in tests

* improve helper function

* fix memory leaks from strdup(), add action to upload memory leaks checking logs, add Charlene to PR template

Co-authored-by: Jerry Leung <[email protected]>
  • Loading branch information
yanw-bq and Jerry Leung authored Mar 18, 2021
1 parent 7a48aa9 commit 7c7913a
Show file tree
Hide file tree
Showing 13 changed files with 2,026 additions and 262 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
@raymond-lum
@yanw-bq
@jerrytfleung
@csolonynka
<!-- Any additional reviewers -->
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,18 @@ jobs:
cat /tmp/timestreamodbc_*.log
cat /tmp/elasticodbc_*.log
cat ./aws_sdk_*.log
- name: print-memory-leak-logs
if: always()
run: |
cat ./leaks_*
- name: upload-integration-test-results
if: always()
uses: actions/upload-artifact@v2
with:
name: integration-test-results-mac64
path: |
${{ github.workspace }}/odbc-logs/
${{ github.workspace }}/leaks_
#- name: test
# run: |
# bash ./run_test_runner.sh
Expand Down
2 changes: 2 additions & 0 deletions src/IntegrationTests/ITODBCHelper/it_odbc_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#define SQLSTATE_GENERAL_ERROR (SQLWCHAR*)L"HY000"
#define SQLSTATE_INVALID_DESCRIPTOR_FIELD_IDENTIFIER (SQLWCHAR*)L"HY091"
#define SQLSTATE_NUMERIC_VALUE_OUT_OF_RANGE (SQLWCHAR*) L"HY019"
#define SQLSTATE_STRING_CONVERSION_ERROR (SQLWCHAR*)L"22018"
#define SQLSTATE_FRACTIONAL_TRUNCATION (SQLWCHAR*)L"01S07"

#define IT_SIZEOF(x) (NULL == (x) ? 0 : (sizeof((x)) / sizeof((x)[0])))

Expand Down
1,717 changes: 1,520 additions & 197 deletions src/IntegrationTests/ITODBCResults/test_odbc_results.cpp

Large diffs are not rendered by default.

Loading

0 comments on commit 7c7913a

Please sign in to comment.