Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#56 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
databases

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
C++
Stelle
53
Fork
30
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SAP/odbc-cpp-wrapper

Tutte le issue di SAP/odbc-cpp-wrapper

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.