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

Spider 10.6+ fails to autodiscover structure (did in <=10.5) and reports ERROR 12500 (HY000): unknown

Details

    Description

      10.5.23

      MariaDB [testdb]> CREATE TABLE data ENGINE=SPIDER  COMMENT='host "node1", user "monitor", password "password", port "3306"';
      Query OK, 0 rows affected (0.014 sec)
       
      MariaDB [testdb]> show create table data\G
      *************************** 1. row ***************************
             Table: data
      Create Table: CREATE TABLE `data` (
        `id` int(11) NOT NULL AUTO_INCREMENT,
        `code` varchar(10) DEFAULT NULL,
        PRIMARY KEY (`id`)
      ) ENGINE=SPIDER DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='host "node1", user "monitor", password "password", port "3306"'
      1 row in set (0.002 sec)
      

      10.6.16

      MariaDB [testdb]> CREATE TABLE data ENGINE=SPIDER  COMMENT='host "node1", user "monitor", password "password", port "3306"';
      ERROR 12500 (HY000): unknown
      

      Behaviour also exists in 10.11 using SERVERs;

      10.11.6

      MariaDB [testdb]> select * from mysql.servers;
      +-------------+-------+--------+----------+----------+------+--------+---------+-------+
      | Server_name | Host  | Db     | Username | Password | Port | Socket | Wrapper | Owner |
      +-------------+-------+--------+----------+----------+------+--------+---------+-------+
      | node1       | node1 | testdb | monitor  | password | 3306 |        | mariadb |       |
      +-------------+-------+--------+----------+----------+------+--------+---------+-------+
      1 row in set (0.001 sec)
       
      MariaDB [testdb]>   CREATE TABLE remote_node1 ENGINE=SPIDER REMOTE_SERVER="node1" REMOTE_TABLE="data"
          -> ;
      ERROR 12500 (HY000): unknown
      

      Attachments

        Activity

          ycp Yuchen Pei added a comment - - edited

          Hi holyfoot, ptal thanks:

          bb-10.4-mdev-33008 2be37ada436c403acc70f77ca2f5738a44846dd7
          MDEV-33008 Fix spider table discovery
           
          A new column was introduced to the show index output in 10.6 in
          f691d9865becfd242ba44cc632034433336af1e7
           
          Thus we update the check of the number of columns to be at least 13,
          rather than exactly 13.
           
          Also backport an err number and format from 10.5 for better error
          messages when the column number is wrong.
          

          Note that this has to be applied from 10.4 up because a 10.4 spider node could connect to a 10.6+ data node.

          ycp Yuchen Pei added a comment - - edited Hi holyfoot , ptal thanks: bb-10.4-mdev-33008 2be37ada436c403acc70f77ca2f5738a44846dd7 MDEV-33008 Fix spider table discovery   A new column was introduced to the show index output in 10.6 in f691d9865becfd242ba44cc632034433336af1e7   Thus we update the check of the number of columns to be at least 13, rather than exactly 13.   Also backport an err number and format from 10.5 for better error messages when the column number is wrong. Note that this has to be applied from 10.4 up because a 10.4 spider node could connect to a 10.6+ data node.

          ok to push.

          holyfoot Alexey Botchkov added a comment - ok to push.
          ycp Yuchen Pei added a comment -

          Thanks for the review - pushed eabc74aaef472cb415f4ead502559ca1c27efbc8 to 10.4

          ycp Yuchen Pei added a comment - Thanks for the review - pushed eabc74aaef472cb415f4ead502559ca1c27efbc8 to 10.4

          People

            ycp Yuchen Pei
            danblack Daniel Black
            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.