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

spider table discovery does not clear errors

    XMLWordPrintable

Details

    Description

      If spider table discovery queries at the data node fails, the error does not get detected and/or cleared by spider properly, resulting in following queries at the data node to fail with 2014 commands out of sync.

      Example:

      10.5 24e5d564005904bc589fc869ea2f913eec8e6c3a

      --disable_query_log
      --disable_result_log
      --source ../../t/test_init.inc
      --enable_result_log
      --enable_query_log
       
      set spider_same_server_link= 1;
      evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql
      OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
      # Failed at table discovery because t1 does not exist.
      --error 12702
      CREATE TABLE t ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t1"';
      # No connection made - no failure yet
      CREATE TABLE t (c int) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t1"';
      # Should fail with 12702 again, but got 2014 Commands out of sync.
      insert into t values (1);
      drop table t;
      drop server srv;
       
      --disable_query_log
      --disable_result_log
      --source ../../t/test_deinit.inc
      --enable_result_log
      --enable_query_log
      

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              ycp Yuchen Pei
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.