Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-207

Bug with multistatement prepared statement param realloc

Details

    Description

      Example use case:
      Prepare the following SQL statement:
      "INSERT INTO tbl (a,b) VALUES (?,?); SELECT 1 FROM tbl WHERE c = ?"
      First execution of prepared statement will work, second execution will segfault or cause memory corruption.

      Problem is caused because parameter storage is reallocated for second sub-statement, but not re-adjusted for first sub-statement the next time prepared statement is executed.

      Attachments

        Activity

          joshuactm Joshua Colvin created issue -
          joshuactm Joshua Colvin added a comment -

          Opened pull request with fix and test
          https://github.com/MariaDB/mariadb-connector-odbc/pull/29

          joshuactm Joshua Colvin added a comment - Opened pull request with fix and test https://github.com/MariaDB/mariadb-connector-odbc/pull/29

          The provided pull request has been merged

          Lawrin Lawrin Novitsky added a comment - The provided pull request has been merged
          Lawrin Lawrin Novitsky made changes -
          Field Original Value New Value
          issue.field.resolutiondate 2019-01-04 01:05:49.0 2019-01-04 01:05:49.492
          Lawrin Lawrin Novitsky made changes -
          Component/s General [ 14302 ]
          Fix Version/s 3.1.0 [ 23221 ]
          Fix Version/s 3.0.8 [ 23241 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          Lawrin Lawrin Novitsky made changes -
          Fix Version/s 2.0 [ 22535 ]
          Lawrin Lawrin Novitsky made changes -
          Fix Version/s 2.0.19 [ 23200 ]
          Fix Version/s 2.0 [ 22535 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 91381 ] MariaDB v4 [ 135499 ]

          People

            Lawrin Lawrin Novitsky
            joshuactm Joshua Colvin
            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.