Your message dated Tue, 18 Jun 2013 20:00:10 +0200
with message-id <[email protected]>
has caused the   report #712699,
regarding SQLDisconnect does not propagate SQLITE_BUSY return value
to be marked as having been forwarded to the upstream software
author(s) [email protected]

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
712699: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712699
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Hi,

I'm the maintainer of the Debian package of sqliteodbc. I got the
attached bug report. What do you think about it? Please keep
[email protected] in CC in your answer, so that the
discussion is logged in Debian's bug tracker.

Thanks in advance.

-- 
Lionel
--- Begin Message ---
Package: libsqliteodbc
Version: 0.992-2
Severity: normal

Hello,

thanks for maintaining sqliteodbc.

I have an application that may connect/disconnect many time to sqlite3
files during its lifetime, and I found that after some time it was
hitting the maximum number of open files.

After a lot of debugging, I found out that sqlite_close was failing with
SQLITE_BUSY in drvdisconnect, but its return code was being ignored.
It took a day of work to pinpoint what was the prepared statement
preventing sqlite3 to shut down the connection and once I found it I
could disposed of it properly, fixing the problem in my application.

However, since I do check the return value of SQLDisconnect when I
cleanup my connections, my life would have been much easier if I could
have detected that SQLDisconnect actually failed.

drvdisconnect already returns "incomplete transaction" in some cases:
perhaps it could return it also when sqlite_close returns SQLITE_BUSY?

Here's drvdisconnect for reference:

  static SQLRETURN
  drvdisconnect(SQLHDBC dbc)
  {
      DBC *d;
  
      if (dbc == SQL_NULL_HDBC) {
          return SQL_INVALID_HANDLE;
      }
      d = (DBC *) dbc;
      if (d->magic != DBC_MAGIC) {
          return SQL_INVALID_HANDLE;
      }
      if (d->intrans) {
          setstatd(d, -1, "incomplete transaction", "25000");
          return SQL_ERROR;
      }
      if (d->vm_stmt) {
          vm_end(d->vm_stmt);
      }
      if (d->sqlite) {
          sqlite_close(d->sqlite);
          d->sqlite = NULL;
      }
      freep(&d->dbname);
      freep(&d->dsn);
      return SQL_SUCCESS;
  }
 

Ciao,

Enrico

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libsqliteodbc depends on:
ii  libc6              2.17-3
ii  libsqlite0         2.8.17-7
ii  libsqlite3-0       3.7.17-1
ii  multiarch-support  2.17-3

libsqliteodbc recommends no packages.

Versions of packages libsqliteodbc suggests:
ii  unixodbc-bin  2.3.0-3

-- no debconf information



--- End Message ---

--- End Message ---

Reply via email to