Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`ResultSet::getString()` throws `std::bad_alloc` with IBM Db2 CLI unless `getStringLength()` is called first.

オープン
#56 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
活発
技術スタック
cpp
領域
databases

調査の方向性

Start with the reported ResultSet::getString() and getStringLength() behavior using the IBM Db2 CLI/ODBC driver on Ubuntu 22.04 with clang++ 18 or g++ and C++23. The uploaded odbc-cpp-wrapper-db2luw-test.cpp was not available, so first reproduce the failure and compare retrieval with and without the preceding length call; done means string retrieval succeeds without that workaround.

索引モデルが issue の本文から書いたものです。

説明

Summary

ResultSet::getString() throws std::bad_alloc when retrieving a string column through the IBM Db2 CLI/ODBC driver from C++ programs compiled with clang or g++ with -std=c++23 flag.

Calling ResultSet::getStringLength() for the same column immediately before getString() makes the retrieval succeed.

The query itself works correctly through isql, so the Db2 datasource, authentication, SQL statement, and IBM CLI/ODBC driver are functional.

Environment

  • OS: Ubuntu 22.04
  • Compiler: clang++ 18
  • C++ standard: C++23
  • Driver manager: unixODBC
  • Database: IBM Db2 LUW
  • Db2 driver: IBM Data Server Driver for ODBC and CLI
  • Driver library: libdb2.so
  • Wrapper: odbc-cpp-wrapper
主要言語
C++
スター
53
フォーク
30
平均マージ
5分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SAP/odbc-cpp-wrapper のほかの issue

SAP/odbc-cpp-wrapper の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。