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

Spider wrapper name is case sensitive

    XMLWordPrintable

Details

    Description

      MariaDB [(none)]> CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET '/tmp/build.sock',DATABASE 'test',user 'buildbot',PASSWORD '');
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [(none)]> SELECT spider_direct_sql ('SELECT 1','','SRV "srv"');
      ERROR 12521 (HY000): Can't use wrapper 'MYSQL' for SQL connection
      

      But if the wrapper is defined in lower case it is accepted.

      MariaDB [(none)]> CREATE SERVER srv FOREIGN DATA WRAPPER mysql OPTIONS (SOCKET '/tmp/build.sock',DATABASE 'test',user 'buildbot',PASSWORD '');
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [(none)]> SELECT spider_bg_direct_sql ('SET SESSION _offset=2','','SRV "srv"');
      ERROR 12720 (HY000): Host: and Socket:/tmp/build.sock aim self server. Please change spider_same_server_link parameter if this link is required.
      MariaDB [(none)]> set spider_same_server_link=1;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [(none)]> SELECT spider_bg_direct_sql ('SET @offset=2','','SRV "srv"');
      +-------------------------------------------------------+
      | spider_bg_direct_sql ('SET @offset=2','','SRV "srv"') |
      +-------------------------------------------------------+
      |                                                     1 |
      +-------------------------------------------------------+
      1 row in set (0.001 sec)
      

      Desired behaviour - accept any case variant of MySQL (and possibly MariaDB too).

      Attachments

        Activity

          People

            ycp Yuchen Pei
            danblack Daniel Black
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.