Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-24635

CONNECT Engine - Feature Request: Allow Connection=variable

    XMLWordPrintable

    Details

      Description

      It would be helpful to be able to use a variable for the Connection value when using the CONNECT Engine. I am trying to create a stored proc to create databases, but each table will reference a different DSN which is already defined. I cannot find a way to do this with a variable. I think I might be able do this by creating a string of sql and executing it, but I would prefer not to do that because of the issues with that and introducing that pattern into our app.

      This works:
      CREATE TABLE `MY_TEST` (
      ...
      ) ENGINE=CONNECT
      table_type=ODBC
      DEFAULT CHARSET=latin1
      option_list='UseDSN=Yes'
      CONNECTION='mydsn1';

      This does not work:
      CREATE TABLE `MY_TEST` (
      ...
      ) ENGINE=CONNECT
      table_type=ODBC
      DEFAULT CHARSET=latin1
      option_list='UseDSN=Yes'
      CONNECTION=var_dsn_name;

      Thank you for your consideration.
      Ember

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ember Ember Ludwig
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration