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

Prompting does not work

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.0.0
    • None
    • None
    • None

    Description

      There are lots of problems with using prompt in the ODBC driver, beginning from requiring DS Name to be specified, and ending with crash on exiting dialog.

      I will describe here the crash problem only. DSNPrompt uses the MADB_Dsn struct as in/out paramter. On syncing of the struct data with the form data, old values in the struct are freed, and memory for accommodating new values is allocated.That happens in the setup library heap. On returning DSN struct back to driver, library is freed and... But using DSN before the libray is freed won't save the situation - sooner or later library and memory used for DSN have to be freed. The patch introduced callbacks to DSN struct to ensure that memory is allocated and freed on the driver lib side.

      The other solution could be to change DSNPrompt's interface to receive inConnStr, and return results in outConnStr allocated by user/driver.

      The patch fixes other things related to the prompting, moves windows specific code to separate file, and stubs for non-windows versions of those functions to yet another separate file.

      Attachments

        1. prompt.diff
          24 kB
          Lawrin Novitsky

        Activity

          People

            Lawrin Lawrin Novitsky
            Lawrin Lawrin Novitsky
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.