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

Server crash on SELECT from the table with ENGINE="FEDERATED" and federated_pushdown=1 with cursor-protocol

    XMLWordPrintable

Details

    Description

      The problem repeats only in 10.4 v.
      Testcase (run MTR test with --cursor-protocol):

      --source have_federatedx.inc
      --source include/federated.inc
       
      connection default;
      set global federated_pushdown=1;
       
      connection slave;
      DROP TABLE IF EXISTS federated.t1;
      CREATE TABLE federated.t1 (
        id int(20) NOT NULL,
        name varchar(16) NOT NULL default ''
      )
      DEFAULT CHARSET=latin1;
      INSERT INTO federated.t1 VALUES
        (3,'xxx'), (7,'yyy'), (4,'xxx'), (1,'zzz'), (5,'yyy');
       
      connection master;
      DROP TABLE IF EXISTS federated.t1;
      --replace_result $SLAVE_MYPORT SLAVE_PORT
      eval
      CREATE TABLE federated.t1 (
        id int(20) NOT NULL,
        name varchar(16) NOT NULL default ''
      )
      ENGINE="FEDERATED" DEFAULT CHARSET=latin1
      CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
       
      SELECT * FROM federated.t1;
       
      set global federated_pushdown=0;
      source include/federated_cleanup.inc;
      

      Stacktrace:

      At line 28: query 'SELECT * FROM federated.t1' failed: 2013: Lost connection to MySQL server during query
       
      Thread pointer: 0x7fd83c000da0
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7fd84eddbc70 thread_stack 0x49000
      mysys/stacktrace.c:174(my_print_stacktrace)[0x562aade15fa6]
      sql/signal_handler.cc:238(handle_fatal_signal)[0x562aad4a1d4c]
      libc_sigaction.c:0(__restore_rt)[0x7fd858c42520]
      sql/sql_union.cc:389(select_unit::create_result_table(THD*, List<Item>*, bool, unsigned long long, st_mysql_const_lex_string const*, bool, bool, bool, unsigned int))[0x562aad25d130]
      sql/sql_cursor.cc:433(Select_materialize::send_result_set_metadata(List<Item>&, unsigned int))[0x562aad0e0b78]
      sql/select_handler.cc:90(Pushdown_select::send_result_set_metadata())[0x562aad219699]
      sql/select_handler.cc:140(Pushdown_select::execute())[0x562aad219972]
      sql/sql_select.cc:4576(JOIN::exec_inner())[0x562aad19c9cc]
      sql/sql_select.cc:4388(JOIN::exec())[0x562aad19bc88]
      sql/sql_select.cc:4828(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x562aad19d484]
      sql/sql_select.cc:442(handle_select(THD*, LEX*, select_result*, unsigned long))[0x562aad18c579]
      sql/sql_parse.cc:6473(execute_sqlcom_select(THD*, TABLE_LIST*))[0x562aad14e702]
      sql/sql_parse.cc:3976(mysql_execute_command(THD*))[0x562aad144c5a]
      sql/sql_cursor.cc:138(mysql_open_cursor(THD*, select_result*, Server_side_cursor**))[0x562aad0dfd76]
      sql/sql_prepare.cc:5004(Prepared_statement::execute(String*, bool))[0x562aad1752fa]
      sql/sql_prepare.cc:4493(Prepared_statement::execute_loop(String*, bool, unsigned char*, unsigned char*))[0x562aad173640]
      sql/sql_prepare.cc:3469(mysql_stmt_execute_common(THD*, unsigned long, unsigned char*, unsigned char*, unsigned long, bool, bool))[0x562aad170a0f]
      sql/sql_prepare.cc:3254(mysqld_stmt_execute(THD*, char*, unsigned int))[0x562aad1702db]
      sql/sql_parse.cc:1783(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x562aad13df47]
      sql/sql_parse.cc:1378(do_command(THD*))[0x562aad13ccb2]
      sql/sql_connect.cc:1420(do_handle_one_connection(CONNECT*))[0x562aad2dfcc6]
      sql/sql_connect.cc:1325(handle_one_connection)[0x562aad2dfa22]
      perfschema/pfs.cc:1871(pfs_spawn_thread)[0x562aad86c967]
      nptl/pthread_create.c:442(start_thread)[0x7fd858c94b43]
      x86_64/clone3.S:83(__clone3)[0x7fd858d26a00]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7fd83c01c1a8): SELECT * FROM federated.t1
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              lstartseva Lena Startseva
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.