[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#509240: marked as done (libmdbodbc: can't close database connection)

Your message dated Mon, 10 Aug 2009 19:32:44 +0000
with message-id <E1Maabs-0003iU-0L@ries.debian.org>
and subject line Bug#509240: fixed in mdbtools
has caused the Debian Bug report #509240,
regarding libmdbodbc: can't close database connection
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(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 owner@bugs.debian.org

509240: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=509240
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message --- Package: libmdbodbc
Severity: important
Tags: patch

When used with libmdbodbc, no unixODBC based disconnection function will actually close a database connection. This means the following PHP code (supported by a well-configured odbc.ini etc.) will return rows instead of dying with an error:

$db = odbc_connect('Northwind', null, null);


$sql = "SELECT CompanyName, PostalCode, Country FROM Suppliers";
$result=odbc_exec($db, $sql) or die('ERROR: Cannot execute query!');

This bug is less terrible when libmdbodbc is used with scripts that reliably terminate, but by watching lsof I found that it led apache2 to spawn abnormally long-lived children and thus constituted a memory leak. Yes, I run an apache based site that talks to an Access database.

Besides the poor design decisions I have to support, this bug warrants attention as Zend itself recommends that libmdbodbc be used.

The following patch has solved the problem for me:

--- odbc.c      2008-12-15 13:35:35.280274615 -0800
+++ odbc.c      2008-12-15 13:37:19.415771536 -0800
@@ -711,7 +711,10 @@
     SQLHDBC            hdbc)
-       TRACE("SQLDisconnect");
+       struct _hdbc *dbc = (struct _hdbc *) hdbc;
+       struct _henv *env = (struct _henv *) dbc->henv;
+       mdb_sql_close(env->sql);
        return SQL_SUCCESS;

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-etchnhalf.1-486
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libmdbodbc depends on:
ii  libc6        2.7-15                      GNU C Library: Shared libraries
ii  libglib2.0-0 2.16.6-1                    The GLib library of C routines
ii  libmdbtools mdbtools libraries
ii  odbcinst1deb 2.2.11-16                   Support library and helper program

libmdbodbc recommends no packages.

libmdbodbc suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: mdbtools

We believe that the bug you reported is fixed in the latest version of
mdbtools, which is due to be installed in the Debian FTP archive:

  to pool/main/m/mdbtools/libmdbodbc_0.
  to pool/main/m/mdbtools/libmdbtools_0.
  to pool/main/m/mdbtools/mdbtools-dev_0.
  to pool/main/m/mdbtools/mdbtools-gmdb_0.
  to pool/main/m/mdbtools/mdbtools_0.
  to pool/main/m/mdbtools/mdbtools_0.
  to pool/main/m/mdbtools/mdbtools_0.

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 509240@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Tim Retout <tim@retout.co.uk> (supplier of updated mdbtools package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)

Hash: SHA1

Format: 1.8
Date: Mon, 20 Jul 2009 11:43:32 +0200
Source: mdbtools
Binary: mdbtools mdbtools-gmdb mdbtools-dev libmdbtools libmdbodbc
Architecture: source amd64
Distribution: unstable
Urgency: medium
Maintainer: Tim Retout <tim@retout.co.uk>
Changed-By: Tim Retout <tim@retout.co.uk>
 libmdbodbc - MDB tools ODBC module
 libmdbtools - mdbtools libraries
 mdbtools   - JET / MS Access database (MDB) tools
 mdbtools-dev - mdbtools development files
 mdbtools-gmdb - JET / MS Access database (MDB) file viewer
Closes: 414528 439582 509240 531980 536935
 mdbtools ( unstable; urgency=medium
   * New maintainer. (Closes: #414528)
   * Set urgency medium for RC bugfix.
   * debian/control:
     + Add libglade2-dev to Build-Depends. (Closes: #531980, #536935)
       Thanks to Michael Terry.
     + Remove URLs from Description, and use new Homepage field.
       (Closes: #439582)
     + Add Vcs-* fields.
     + Add ${misc:Depends} to Depends of binary packages.
     + Replace deprecated ${Source-Version} in mdbtools-dev Depends.
     + Bump Standards-Version to 3.8.2.
     + Change source package Section to 'database'.
   * debian/libmdbodbc.symbols, debian/libmdbtools.symbols:
     + Add symbols files for library packages.
   * Rewrite build system.
     + debian/compat: Bump to 7.
     + debian/control:
       - Bump debhelper build dependency, add quilt and remove cdbs.
       - Add build dependencies on autoconf, automake1.10 and libtool.
       - Build-Conflicts against autoconf2.13 and automake1.4.
     + debian/rules:
       - Use dh7 and quilt, and regenerate autotools
         during build.
       - Set LDFLAGS=-Wl,--as-needed during configure.
       - Drop --enable-sql configure flag, no longer exists.
     + Use same prefix level for all patches.
     + Move changes from Debian diff into 001-previous-debian-diff.patch
     + Drop 999-autogen.patch
   * debian/copyright: Add copyright headers and update licensing.
   * debian/mdbtools-gmdb.menu: Move to 'Applications/Data Management'.
   * debian/gmdb2.xpm: Resize to 32x32 pixels.
   * debian/patches/mdb-hexdump-argc.patch: Small fix to get usage
     statement to print correctly.
   * debian/patches/odbc-close-connections.patch: Actually close
     database connections on odbc_close. (Closes: #509240)
 5769db105e530b5fb182245cf013d2d37747f227 1520 mdbtools_0.
 dc5def63efc54c123f18f23ccb26e99ddf3f730f 71273 mdbtools_0.
 9a37b873a22f339230fd9bdffaf2322a8368262e 57806 mdbtools_0.
 069f309882efe970d7dbc7d34e61c41cf2cc733c 147050 mdbtools-gmdb_0.
 c29f230655b2affb2395f5b78270d50fad81573b 140618 mdbtools-dev_0.
 7c2dca33439c0acc669e06e389d042b82114ad5f 68496 libmdbtools_0.
 08b855b0eef994abe416884fb9eacab2dd682689 73946 libmdbodbc_0.
 8dbe4b9d0f15bac3adc7531d6222a065307075fa0e4116f17f8c1d6127df2eb4 1520 mdbtools_0.
 cf06542687e935556349ea32fac686020ff887cfc3e463b3ece53e697caaae7a 71273 mdbtools_0.
 c3a857b2e7634880f8bc266084feb97a1aa274e3cca499576fe354422109d628 57806 mdbtools_0.
 a9383d3f7896fc52f947b715fb87edc4ff43dab97b4e581b3ee3d96338370805 147050 mdbtools-gmdb_0.
 7596b796bff085d4e703ce3365524b01054b4000912a868a7e41c279728c89aa 140618 mdbtools-dev_0.
 2826fcd7a0b5f6ca09cde62097f61b43174d6fa01b79542c6b22fd42b231610f 68496 libmdbtools_0.
 0c6142640f0aa79876db3fea1f53ab26df3b77412a68c9cc0036111e94fae100 73946 libmdbodbc_0.
 254426bd434436fe815ab5625553b96b 1520 database optional mdbtools_0.
 b76a21da51f51a2dcc8bc49f240fbc81 71273 database optional mdbtools_0.
 af5e8085c4701df7da7ff17dae78a477 57806 database optional mdbtools_0.
 4773b84db2af47240522c8cc590b7c27 147050 gnome optional mdbtools-gmdb_0.
 12391f6b50d9675164af47189acc9478 140618 devel optional mdbtools-dev_0.
 455f382047e9d8a64070cd2510eacfb6 68496 libs optional libmdbtools_0.
 449d9dcd6d90d2fde42a5194f53a31d5 73946 libs optional libmdbodbc_0.

Version: GnuPG v1.4.9 (GNU/Linux)


--- End Message ---

Reply to: