Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-119

Memory leak when reconnecting fails

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 2.1
    • None
    • None
    • None
    • Linux / Windows

    Description

      Hey Georg,

      unfortunately the CONC-118 is not completely fixed in Rev. 192. There is still memory-leak if the reconnecting fails.

      How to reproduce:

      Step 1. Build the test code
      Step 2. Start MySQL/Mariadb server
      Step 3. Execute the test binary (in terminal or valgrind), and it would keep printing "Query OK"..
      Step 4. Shut down MySQL/Mariadb server. And the client would keep printing "Query error..."
      Step 5. Watch the memory usage of the test binary, and it would keep raising.

      Solution:
      Delete line 2025 in file libmariadb.c from rev.192. ( a bzero function )

      And my last comment in CONC-118 explains why.

      PS:
      There is a patch from me when I reported the bug CONC118, which has already deleted the "bzero" line. Perhaps you have missed this point.

      Best Regards
      Tianhong

      Attachments

        Activity

          People

            georg Georg Richter
            tianhongxu Tianhong
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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