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

MariaDB, SPIDER engine, usage of REGEXP

    XMLWordPrintable

Details

    Description

      Hello,
      It appears as if I cannot use regular expressions against SPIDER engine tables.
      I have searched the documentation for related configuration parameters, but I was unable to find any.

      A Simple example can be seen below:

      MariaDB [test_db]> CREATE TABLE `test_db`.`just_testing` ( 
        `name` varchar(16) not null
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
       
      MariaDB [test_db]> insert into `test_db`.`just_testing`(name) values ('TestSpiderRegex');
      MariaDB [test_db]> select `name` from `test_db`.`just_testing` where `NAME` REGEXP '(Test|Spider|Regex)';
      +-----------------+
      | name            |
      +-----------------+
      | TestSpiderRegex |
      +-----------------+
      1 row in set (0.000 sec)
      

      Now, creating the respective SPIDER schema - table:

      ~MariaDB [test_db]> create database spider_test_db;
      MariaDB [test_db]> CREATE TABLE `spider_test_db`.`just_testing` (
        `name` varchar(16) NOT NULL
      ) ENGINE=SPIDER DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='wrapper "mysql", srv "dataNode", database "test_db", table "just_testing"';
       
      MariaDB [spider_test_db]> select * from `spider_test_db`.`just_testing`;
      +-----------------+
      | name            |
      +-----------------+
      | TestSpiderRegex |
      +-----------------+~
      

      Selecting with REGEXP fails:

      ~MariaDB [spider_test_db]> select `name` from `spider_test_db`.`just_testing` where `NAME` REGEXP '(Test|Spider|Regex)';
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'regexp(t0.`name` , '(Test|Spider|Regex)'))' at line 1~
      

      Issue persists with all regular expressions I could try, in all queries I could try.

      Thank you

      Attachments

        Activity

          People

            ycp Yuchen Pei
            ibotsaris Iacovos Botsaris
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.