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

Prompting does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      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

          Activity

            People

            Assignee:
            Lawrin Lawrin Novitsky
            Reporter:
            Lawrin Lawrin Novitsky
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: