aws / aws/amazon-documentdb-odbc-driver

Create tests to ensure truncated buffer work correctly.

Open
#185 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
6
Forks
2
PR merge metrics
No merged PRs in 30d

Description

[Itemized ODBC Interface for handling of Character/Byte Lengths in parameters - Amazon - Confluence (atlassian.net)](https://bitquill.atlassian.net/wiki/spaces/AMZ/pages/2536996877/Itemized+ODBC+Interface+for+handling+of+Character+Byte+Lengths+in+parameters)

Create tests for each of these API to test if a smaller buffer than required behaves correctly.

- Return buffer size is smaller than necessary
- Reports a return code of SUCCESS_WITH_INFO
- Resulting size is the number of characters (or bytes) returned not including the null character.
- [Optional] String representation of truncated value is correct.

1. SQLColAttribute
2. SQLGetInfo
3. SQLBindCol
4. SQLBindParameter
5. SQLGetData
6. SQLGetDiagField

Contributor guide

Open the contributing guide

Research direction

Review the linked ODBC interface requirements first, then locate the existing tests or entry points for SQLColAttribute, SQLGetInfo, SQLBindCol, SQLBindParameter, SQLGetData, and SQLGetDiagField. Add coverage for undersized buffers, SUCCESS_WITH_INFO, returned character or byte lengths, and the optional truncated string representation; done means each listed API has the expected assertions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.