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

LP:718578 - Yet another Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed in maria-5.3-mwl89

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Reproducible even with bug 715027 fixed. Not reproducible on maria-5.3

      mysqld: field.cc:3730: virtual longlong Field_long::val_int(): Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed.

      backtrace:

      #8 0x006b0d98 in __assert_fail () from /lib/libc.so.6
      #9 0x08255613 in Field_long::val_int (this=0xae74e278) at field.cc:3730
      #10 0x081c50cb in Item_field::val_int (this=0xae733648) at item.cc:2133
      #11 0x081c0962 in Item::val_bool (this=0xae733648) at item.cc:187
      #12 0x0820a98b in Item_cond_and::val_int (this=0xae78e990) at item_cmpfunc.cc:4671
      #13 0x083248f7 in evaluate_join_record (join=0xae7891c0, join_tab=0xae78e5e0, error=0) at sql_select.cc:13614
      #14 0x08324553 in sub_select (join=0xae7891c0, join_tab=0xae78e5e0, end_of_records=false) at sql_select.cc:13519
      #15 0x0832398b in do_select (join=0xae7891c0, fields=0xae732a1c, table=0x0, procedure=0x0) at sql_select.cc:13063
      #16 0x0830b3cb in JOIN::exec (this=0xae7891c0) at sql_select.cc:2450
      #17 0x0823d1d0 in subselect_single_select_engine::exec (this=0xae75ac78) at item_subselect.cc:2751
      #18 0x08237917 in Item_subselect::exec (this=0xae733858) at item_subselect.cc:550
      #19 0x082388c3 in Item_singlerow_subselect::val_int (this=0xae733858) at item_subselect.cc:998
      #20 0x081d6f08 in Item::val_int_result (this=0xae733858) at item.h:792
      #21 0x081d2c22 in Item_cache_int::cache_value (this=0xae78ec80) at item.cc:7778
      #22 0x081dad4c in Item_cache_wrapper::cache (this=0xae78ec18) at item.cc:6783
      #23 0x081d0999 in Item_cache_wrapper::val_bool (this=0xae78ec18) at item.cc:6947
      #24 0x0820a98b in Item_cond_and::val_int (this=0xae75c4e8) at item_cmpfunc.cc:4671
      #25 0x082e1f5e in SQL_SELECT::skip_record (this=0xae75c5a8, thd=0x95eac38) at opt_range.h:916
      #26 0x083c8b6e in find_all_keys (param=0xb6e4df94, select=0xae75c5a8, sort_keys=0xae7672b0, buffpek_pointers=0xb6e4ddcc, tempfile=0xb6e4deb0, indexfile=0x0)
      at filesort.cc:632
      #27 0x083c7868 in filesort (thd=0x95eac38, table=0xae7659b8, sortorder=0xae75cbf8, s_length=1, select=0xae75c5a8, max_rows=18446744073709551615,
      sort_positions=false, examined_rows=0xb6e4e100) at filesort.cc:240
      #28 0x0832b43b in create_sort_index (thd=0x95eac38, join=0xae784328, order=0xae75aea8, filesort_limit=18446744073709551615,
      select_limit=18446744073709551615, is_order_by=false) at sql_select.cc:16288
      #29 0x0830b126 in JOIN::exec (this=0xae784328) at sql_select.cc:2393
      #30 0x0830bb91 in mysql_select (thd=0x95eac38, rref_pointer_array=0x95ec6d4, tables=0xae732780, wild_num=0, fields=..., conds=0xae75ad40, og_num=1,
      order=0xae75aea8, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0xae75bab8, unit=0x95ec334, select_lex=0x95ec5d0)
      at sql_select.cc:2667
      #31 0x083045ed in handle_select (thd=0x95eac38, lex=0x95ec2d8, result=0xae75bab8, setup_tables_done_option=0) at sql_select.cc:283
      #32 0x082a20ac in execute_sqlcom_select (thd=0x95eac38, all_tables=0xae732780) at sql_parse.cc:5070
      #33 0x082990bb in mysql_execute_command (thd=0x95eac38) at sql_parse.cc:2234
      #34 0x082a4644 in mysql_parse (thd=0x95eac38,
      rawbuf=0xae731948 "SELECT f1 AS field1\nFROM ( SELECT * FROM t1 ) AS alias1\nWHERE (\nSELECT t1.f1\nFROM t2 JOIN t1 ON t1.f2\nWHERE alias1.f3 AND t1.f3\n) AND f2 \nORDER BY field1", length=153, found_semicolon=0xb6e4f228) at sql_parse.cc:6077
      #35 0x08296d53 in dispatch_command (command=COM_QUERY, thd=0x95eac38,
      packet=0x9602d69 "SELECT f1 AS field1\nFROM ( SELECT * FROM t1 ) AS alias1\nWHERE (\nSELECT t1.f1\nFROM t2 JOIN t1 ON t1.f2\nWHERE alias1.f3 AND t1.f3\n) AND f2 \nORDER BY field1", packet_length=153) at sql_parse.cc:1210
      #36 0x08296200 in do_command (thd=0x95eac38) at sql_parse.cc:903
      #37 0x082932de in handle_one_connection (arg=0x95eac38) at sql_connect.cc:1154
      #38 0x00821919 in start_thread () from /lib/libpthread.so.0
      #39 0x0076acce in clone () from /lib/libc.so.6

      test case:

      SET SESSION optimizer_switch = 'materialization=on';

      CREATE TABLE t1 ( f1 int(11), f2 int(11), f3 int(11)) ;
      INSERT IGNORE INTO t1 VALUES (28,5,6),(29,NULL,4);

      CREATE TABLE t2 ( f10 varchar(1) );
      INSERT IGNORE INTO t2 VALUES (NULL);

      SELECT f1 AS field1
      FROM ( SELECT * FROM t1 ) AS alias1
      WHERE (
      SELECT t1.f1
      FROM t2 JOIN t1 ON t1.f2
      WHERE alias1.f3 AND t1.f3
      ) AND f2
      ORDER BY field1;

      Attachments

        Activity

          People

            timour Timour Katchaounov (Inactive)
            philipstoev Philip Stoev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.