Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.0.5
    • 1.0.6
    • None
    • None
    • Client: Windows Server 2012 R2, Server Fedora 17 with MySQL-Version 5.5.29

    Description

      Tried to switch from MyODBC 3.51.11-2 (32bit) to MariaDB ODBC Connector 1.0.5 (64bit) and noticed a possible memory leak.

      Server and client were the same in my tests, only the ODBC driver changed (and yes I compiled my source for 32bit and 64bit of course).

      Source of my test program is attached. It just selects data from a table in a loop allocating and releasing the statement handle on every iteration. I did that to simulate my project which is a long running service with several allocs and releases of statement handles. (see attached source maria_odbc.cpp)

      1st test was with the MariaDB ODBC connector. The program ran for about 27 minutes and the memory for the process increased from 1 MB to 8 MB during that period of time.
      (see pics test-mariadb_connector-01.jpg and test-mariadb_connector-02.jpg)

      2nd test was with the old MySQL 3.51 32 ODBC driver. After about the same period of time (but 50% more iterations - maybe performance is another issue but currently not mine the memory consumption of the process didn't increase (just a few bytes).
      (see pics test-myodbc-01.jpg and test-myodbc-02.jpg)

      With my current project the service used up about 3 GB of memory (starting from 1 MB) when running over the weekend. With the MyODBC 3.51 driver it stays at 1 MB for ages.

      Attachments

        1. maodbc.dll
          1.26 MB
        2. maria_odbc.cpp
          2 kB
        3. maria_odbc-new_dll-01.jpg
          maria_odbc-new_dll-01.jpg
          111 kB
        4. maria_odbc-new_dll-02.jpg
          maria_odbc-new_dll-02.jpg
          113 kB
        5. test-mariadb_connector-01.jpg
          test-mariadb_connector-01.jpg
          118 kB
        6. test-mariadb_connector-02.jpg
          test-mariadb_connector-02.jpg
          109 kB
        7. test-myodbc-01.jpg
          test-myodbc-01.jpg
          113 kB
        8. test-myodbc-02.jpg
          test-myodbc-02.jpg
          108 kB

        Activity

          People

            Lawrin Lawrin Novitsky
            it.at.sto Sto Ges.m.b.H. Austria
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.