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

Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed in Field_bit::val_int with view, virtual column, ROLLUP

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 5.5, 10.0, 10.1
    • 5.5, 10.1
    • Server, Views
    • None

    Description

      Only reproducible on 5.5 - 10.1, not reproducible on 10.2+.

      CREATE TABLE t1 (a INT, b BIT(4) DEFAULT 0, vb BIT(4) AS (b) VIRTUAL);
      CREATE VIEW v1 AS SELECT * FROM t1;
       
      INSERT IGNORE INTO t1 (a,b) VALUES (0,0),(1,1);
       
      SELECT VALUES(vb) FROM v1 GROUP BY a WITH ROLLUP;
       
      # Cleanup
      DROP VIEW v1;
      DROP TABLE t1;
      

      5.5 1956695c6946

      mysqld: /data/src/5.5/sql/field.cc:8354: virtual longlong Field_bit::val_int(): Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed.
      181118 13:13:07 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fc8ec28fee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x00000000007a1592 in Field_bit::val_int (this=0x7fc8e6c56b40) at /data/src/5.5/sql/field.cc:8354
      #9  0x00000000007ad353 in field_conv (to=0x7fc8e6c56bf0, from=0x7fc8e6c56b40) at /data/src/5.5/sql/field_conv.cc:907
      #10 0x00000000007cfbc9 in save_field_in_field (from=0x7fc8e6c56b40, null_value=0x7fc8e6c56d92, to=0x7fc8e6c56bf0, no_conversions=false) at /data/src/5.5/sql/item.cc:5928
      #11 0x00000000007cfc58 in Item_field::save_in_field (this=0x7fc8e6c56d30, to=0x7fc8e6c56bf0, no_conversions=false) at /data/src/5.5/sql/item.cc:5946
      #12 0x00000000006d5756 in update_virtual_fields (thd=0x7fc8e7e64060, table=0x7fc8e6ddb860, vcol_update_mode=VCOL_UPDATE_FOR_READ) at /data/src/5.5/sql/table.cc:6630
      #13 0x00000000007af0ea in find_all_keys (param=0x7fc8edae7240, select=0x7fc8e6d77390, sort_keys=0x7fc8e6d623e0, sort_keys_buf=0x7fc8e6d62458 '\245' <repeats 165 times>, "h4z\025'\024\003", buffpek_pointers=0x7fc8edae7450, tempfile=0x7fc8edae72c0) at /data/src/5.5/sql/filesort.cc:689
      #14 0x00000000007adcb6 in filesort (thd=0x7fc8e7e64060, table=0x7fc8e6ddb860, sortorder=0x7fc8e6d77898, s_length=1, select=0x7fc8e6d77390, max_rows=18446744073709551615, sort_positions=false, examined_rows=0x7fc8edae76d8) at /data/src/5.5/sql/filesort.cc:250
      #15 0x000000000066406c in create_sort_index (thd=0x7fc8e7e64060, join=0x7fc8e6d5bf80, order=0x7fc8e6cc4ad0, filesort_limit=18446744073709551615, select_limit=18446744073709551615, is_order_by=false) at /data/src/5.5/sql/sql_select.cc:20079
      #16 0x000000000063a73c in JOIN::exec (this=0x7fc8e6d5bf80) at /data/src/5.5/sql/sql_select.cc:2882
      #17 0x000000000063b132 in mysql_select (thd=0x7fc8e7e64060, rref_pointer_array=0x7fc8e7e67d08, tables=0x7fc8e6cc43d8, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0, group=0x7fc8e6cc4ad0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fc8e6d5bf60, unit=0x7fc8e7e67388, select_lex=0x7fc8e7e67a68) at /data/src/5.5/sql/sql_select.cc:3133
      #18 0x00000000006316ee in handle_select (thd=0x7fc8e7e64060, lex=0x7fc8e7e672d8, result=0x7fc8e6d5bf60, setup_tables_done_option=0) at /data/src/5.5/sql/sql_select.cc:323
      #19 0x000000000060aaf6 in execute_sqlcom_select (thd=0x7fc8e7e64060, all_tables=0x7fc8e6cc43d8) at /data/src/5.5/sql/sql_parse.cc:4678
      #20 0x0000000000603e77 in mysql_execute_command (thd=0x7fc8e7e64060) at /data/src/5.5/sql/sql_parse.cc:2224
      #21 0x000000000060d6c2 in mysql_parse (thd=0x7fc8e7e64060, rawbuf=0x7fc8e6cc4078 "SELECT VALUES(vb) FROM v1 GROUP BY a WITH ROLLUP", length=48, parser_state=0x7fc8edae8640) at /data/src/5.5/sql/sql_parse.cc:5923
      #22 0x00000000006013d7 in dispatch_command (command=COM_QUERY, thd=0x7fc8e7e64060, packet=0x7fc8ebb5b061 "SELECT VALUES(vb) FROM v1 GROUP BY a WITH ROLLUP", packet_length=48) at /data/src/5.5/sql/sql_parse.cc:1066
      #23 0x00000000006005c9 in do_command (thd=0x7fc8e7e64060) at /data/src/5.5/sql/sql_parse.cc:793
      #24 0x0000000000703bbf in do_handle_one_connection (thd_arg=0x7fc8e7e64060) at /data/src/5.5/sql/sql_connect.cc:1268
      #25 0x000000000070394c in handle_one_connection (arg=0x7fc8e7e64060) at /data/src/5.5/sql/sql_connect.cc:1184
      #26 0x0000000000a12a33 in pfs_spawn_thread (arg=0x7fc8e8b60fc0) at /data/src/5.5/storage/perfschema/pfs.cc:1015
      #27 0x00007fc8ed71b494 in start_thread (arg=0x7fc8edae9700) at pthread_create.c:333
      #28 0x00007fc8ec34c93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            elenst Elena Stepanova
            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.