Package: libdbd-sqlite3
Version: 0.9.0-13
Severity: normal
Tags: patch upstream

Dear Maintainer,


* What led up to the situation?
  I was programming on another project which links agains this one
  (`monitoring-plugins`) and got a strange error message in the output
  which did not originate from my part of the code.

* What exactly did you do (or not do) that was effective (or ineffective)?
  I executed a query via libdbi without a table mentioned in the
  statement.

* What was the outcome of this action?
  the message 'no table in statement!' was printed to stdout and there
  was no way to prohibit it.

* What outcome did you expect instead?
  I do expect a library or API to give all necessary information to
  the calling function (or other internal interfaces like errno) and
  to NOT just use the any other interface which I did not explicitely
  hand over.
  This is unnecessarily surprising and (IMHO) a rather bad habit.


-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (990, 'testing'), (50, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.16.12+deb14+1-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE
not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libdbd-sqlite3 depends on:
ii  libc6         2.41-12
ii  libdbi1t64    0.9.0-6.1+b1
ii  libsqlite3-0  3.46.1-8

libdbd-sqlite3 recommends no packages.

libdbd-sqlite3 suggests no packages.

-- debconf-show failed

Description: Disable printing errors to stdout
 Inside the sqlite3 driver is a print statement which just
 prints to stdout without the calling code being able to prevent
 this.
 I think this behaviour is not good for a library, there
 the print statement is turned into a comment by this commit.
Author: Lorenz Kästle <[email protected]>
Forwarded: no
Last-Update: 2025-10-29

--- libdbi-drivers-0.9.0.orig/drivers/sqlite3/dbd_sqlite3.c
+++ libdbi-drivers-0.9.0/drivers/sqlite3/dbd_sqlite3.c
@@ -1192,7 +1192,7 @@ static int find_result_field_types(char*
       /* no tables in the statement ?!
        * fallback to string
        */
-      printf("no tables in statement !\n");
+      // printf("no tables in statement !\n");
       return FIELD_TYPE_STRING;
     }
   }

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to