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

Assertion `0' failed in Item_cache_row::illegal_method_call on SELECT from Spider table

    XMLWordPrintable

    Details

      Description

      INSTALL PLUGIN Spider SONAME 'ha_spider.so';
      CREATE USER Spider@localhost IDENTIFIED BY 'PWD123';
      CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET '../socket.sock', DATABASE 'test', USER 'Spider', PASSWORD 'PWD123');
      CREATE TABLE t (c INT) ENGINE=InnoDB;
      CREATE TABLE ts (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv", TABLE "t"';
      SELECT 1 FROM ts WHERE ROW(c,c) NOT IN ((0,0),(1,1));
      

      Leads to:

      10.11.0 6ebdd3013a18b01dbecec76b870810329eb76586 (Debug)

      mysqld: /test/10.11_dbg/sql/item.cc:10628: void Item_cache_row::illegal_method_call(const char*): Assertion `0' failed.
      

      10.11.0 6ebdd3013a18b01dbecec76b870810329eb76586 (Debug)

      Core was generated by `/test/MD190922-mariadb-10.11.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x1467e09c8700 (LWP 1376788))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x00001467f971f859 in __GI_abort () at abort.c:79
      #2  0x00001467f971f729 in __assert_fail_base (fmt=0x1467f98b5588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x557ab38c73c6 "0", file=0x557ab38ac780 "/test/10.11_dbg/sql/item.cc", line=10628, function=<optimized out>) at assert.c:92
      #3  0x00001467f9730fd6 in __GI___assert_fail (assertion=assertion@entry=0x557ab38c73c6 "0", file=file@entry=0x557ab38ac780 "/test/10.11_dbg/sql/item.cc", line=line@entry=10628, function=function@entry=0x557ab38af498 "void Item_cache_row::illegal_method_call(const char*)") at assert.c:101
      #4  0x0000557ab2e46150 in Item_cache_row::illegal_method_call (this=this@entry=0x1467a4017008, method=method@entry=0x557ab38af6a6 "val_str") at /test/10.11_dbg/sql/item.cc:10628
      #5  0x0000557ab2e51138 in Item_cache_row::val_str (this=this@entry=0x1467a4017008) at /test/10.11_dbg/sql/item.h:7521
      #6  0x00001467e088cb60 in spider_db_open_item_string (item=item@entry=0x1467a4017008, field=field@entry=0x0, spider=spider@entry=0x1467a4078090, str=str@entry=0x1467a40844a0, alias=alias@entry=0x0, alias_length=alias_length@entry=0, dbton_id=0, use_fields=true, fields=0x1467a40b3740) at /test/10.11_dbg/storage/spider/spd_db_conn.cc:7906
      #7  0x00001467e088d2e5 in spider_db_open_item_cache (item_cache=item_cache@entry=0x1467a4017008, field=field@entry=0x0, spider=spider@entry=0x1467a4078090, str=str@entry=0x1467a40844a0, alias=alias@entry=0x0, alias_length=alias_length@entry=0, dbton_id=0, use_fields=true, fields=0x1467a40b3740) at /test/10.11_dbg/storage/spider/spd_db_conn.cc:8131
      #8  0x00001467e088d852 in spider_db_print_item_type (item=0x1467a4017008, field=field@entry=0x0, spider=spider@entry=0x1467a4078090, str=str@entry=0x1467a40844a0, alias=alias@entry=0x0, alias_length=alias_length@entry=0, dbton_id=0, use_fields=true, fields=0x1467a40b3740) at /test/10.11_dbg/storage/spider/spd_db_conn.cc:7422
      #9  0x00001467e091a140 in spider_db_mbase_util::open_item_func (this=0x1467e097d150 <spider_db_mysql_utility>, item_func=0x1467a4014630, spider=0x1467a4078090, str=0x1467a40844a0, alias=0x0, alias_length=0, use_fields=true, fields=0x1467a40b3740) at /test/10.11_dbg/storage/spider/spd_db_mysql.cc:6612
      #10 0x00001467e088c16d in spider_db_open_item_func (item_func=item_func@entry=0x1467a4014630, spider=spider@entry=0x1467a4078090, str=str@entry=0x1467a40844a0, alias=alias@entry=0x0, alias_length=alias_length@entry=0, dbton_id=dbton_id@entry=0, use_fields=true, fields=0x1467a40b3740) at /test/10.11_dbg/storage/spider/spd_db_conn.cc:7556
      #11 0x00001467e088d66b in spider_db_print_item_type (item=item@entry=0x1467a4014630, field=field@entry=0x0, spider=0x1467a4078090, str=str@entry=0x1467a40844a0, alias=alias@entry=0x0, alias_length=alias_length@entry=0, dbton_id=0, use_fields=true, fields=0x1467a40b3740) at /test/10.11_dbg/storage/spider/spd_db_conn.cc:7387
      #12 0x00001467e0911478 in spider_mbase_handler::append_item_type_part (this=0x1467a4084440, item=0x1467a4014630, alias=0x0, alias_length=0, use_fields=<optimized out>, fields=0x1467a40b3740, sql_type=1) at /test/10.11_dbg/storage/spider/spd_db_mysql.cc:15419
      #13 0x00001467e0936efc in spider_group_by_handler::init_scan (this=0x1467a4030880) at /test/10.11_dbg/storage/spider/spd_group_by_handler.cc:1318
      #14 0x0000557ab2bde1fb in Pushdown_query::execute (this=0x1467a4017170, join=join@entry=0x1467a40151b8) at /test/10.11_dbg/sql/group_by_handler.cc:49
      #15 0x0000557ab2bb0d97 in do_select (procedure=<optimized out>, join=0x1467a40151b8) at /test/10.11_dbg/sql/sql_select.cc:21207
      #16 JOIN::exec_inner (this=this@entry=0x1467a40151b8) at /test/10.11_dbg/sql/sql_select.cc:4813
      #17 0x0000557ab2bb1826 in JOIN::exec (this=this@entry=0x1467a40151b8) at /test/10.11_dbg/sql/sql_select.cc:4591
      #18 0x0000557ab2baf5aa in mysql_select (thd=thd@entry=0x1467a4000d48, tables=0x1467a4013808, fields=@0x1467a4013568: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1467a40137c0, last = 0x1467a40137c0, elements = 1}, <No data fields>}, conds=0x1467a4014630, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2164525824, result=0x1467a4015190, unit=0x1467a4004f80, select_lex=0x1467a40132c8) at /test/10.11_dbg/sql/sql_select.cc:5071
      #19 0x0000557ab2bafda0 in handle_select (thd=thd@entry=0x1467a4000d48, lex=lex@entry=0x1467a4004ea8, result=result@entry=0x1467a4015190, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.11_dbg/sql/sql_select.cc:582
      #20 0x0000557ab2b19d94 in execute_sqlcom_select (thd=thd@entry=0x1467a4000d48, all_tables=0x1467a4013808) at /test/10.11_dbg/sql/sql_parse.cc:6261
      #21 0x0000557ab2b26109 in mysql_execute_command (thd=thd@entry=0x1467a4000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.11_dbg/sql/sql_parse.cc:3945
      #22 0x0000557ab2b1403c in mysql_parse (thd=thd@entry=0x1467a4000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1467e09c7330) at /test/10.11_dbg/sql/sql_parse.cc:8037
      #23 0x0000557ab2b2166d in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1467a4000d48, packet=packet@entry=0x1467a400aed9 "", packet_length=packet_length@entry=52, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_class.h:1345
      #24 0x0000557ab2b23d97 in do_command (thd=0x1467a4000d48, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_parse.cc:1407
      #25 0x0000557ab2c87fb9 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x557ab4f95b68, put_in_cache=put_in_cache@entry=true) at /test/10.11_dbg/sql/sql_connect.cc:1416
      #26 0x0000557ab2c884c3 in handle_one_connection (arg=0x557ab4f95b68) at /test/10.11_dbg/sql/sql_connect.cc:1318
      #27 0x00001467f9c30609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #28 0x00001467f981c133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.27 (dbg), 10.5.18 (dbg), 10.6.10 (dbg), 10.7.6 (dbg), 10.8.5 (dbg), 10.9.3 (dbg), 10.10.2 (dbg), 10.11.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.4.27 (opt), 10.5.18 (opt), 10.6.10 (opt), 10.7.6 (opt), 10.8.5 (opt), 10.9.3 (opt), 10.10.2 (opt), 10.11.0 (opt)

        Attachments

          Activity

            People

            Assignee:
            ycp Yuchen Pei
            Reporter:
            Roel Roel Van de Paar
            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.