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

Assertion `marked_for_read()' failed in virtual longlong Field_bit::val_int()

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4, 10.5, 10.6, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1
    • 10.4, 10.5, 10.6, 10.11, 11.1
    • None
    • None

    Description

      SET sql_mode='';
      SET use_stat_tables=PREFERABLY;
      CREATE TABLE tbl0 (a BIT)  engine=MyISAM;
      ALTER TABLE tbl0 ADD b INT ;
      INSERT INTO tbl0 VALUES (0,0),(0,0),(0,0);
      LOCK TABLES tbl0 READ;
      ANALYZE TABLE tbl0;
      ANALYZE TABLE tbl0 PERSISTENT FOR COLUMNS () INDEXES ();
      

      Leads to:

      11.0.2 8e55d7ea4a2f94ae3f38fdd8785778612d4b1203 (Debug)

      mariadbd: /test/11.0_dbg/sql/field.cc:9950: virtual longlong Field_bit::val_int(): Assertion `marked_for_read()' failed.
      

      11.0.2 8e55d7ea4a2f94ae3f38fdd8785778612d4b1203 (Debug)

      Core was generated by `/test/MD100423-mariadb-11.0.2-linux-x86_64-dbg/bin/mariadbd --no-defaults --cor'.
      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 0x14973bb67700 (LWP 2902366))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014976c55e859 in __GI_abort () at abort.c:79
      #2  0x000014976c55e729 in __assert_fail_base (fmt=0x14976c6f4588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5646c594c550 "marked_for_read()", file=0x5646c594c3cb "/test/11.0_dbg/sql/field.cc", line=9950, function=<optimized out>) at assert.c:92
      #3  0x000014976c56ffd6 in __GI___assert_fail (assertion=assertion@entry=0x5646c594c550 "marked_for_read()", file=file@entry=0x5646c594c3cb "/test/11.0_dbg/sql/field.cc", line=line@entry=9950, function=function@entry=0x5646c594e0e0 "virtual longlong Field_bit::val_int()") at assert.c:101
      #4  0x00005646c4ebe133 in Field_bit::val_int (this=0x149710024180) at /test/11.0_dbg/sql/field.cc:9950
      #5  0x00005646c4d52294 in Field_bit::update_min (this=<optimized out>, min_val=0x149710094900, force_update=<optimized out>) at /test/11.0_dbg/sql/field.h:4983
      #6  0x00005646c4cc3b8a in Column_statistics_collected::add (this=0x149710024390) at /test/11.0_dbg/sql/sql_statistics.h:534
      #7  collect_statistics_for_table (thd=thd@entry=0x149710000d48, table=0x1497100218e8) at /test/11.0_dbg/sql/sql_statistics.cc:2786
      #8  0x00005646c4d77ca4 in mysql_admin_table (thd=thd@entry=0x149710000d48, tables=tables@entry=0x149710013260, check_opt=check_opt@entry=0x1497100062a0, operator_name=operator_name@entry=0x5646c5f37190 <msg_analyze>, lock_type=lock_type@entry=TL_READ_NO_INSERT, org_open_for_modify=org_open_for_modify@entry=true, repair_table_use_frm=false, extra_open_options=0, prepare_func=0x0, operator_func=(int (handler::*)(class handler * const, class THD *, HA_CHECK_OPT *)) 0x5646c4ef4858 <handler::ha_analyze(THD*, st_ha_check_opt*)>, view_operator_func=0x0, is_cmd_replicated=true) at /test/11.0_dbg/sql/sql_admin.cc:986
      #9  0x00005646c4d797cc in Sql_cmd_analyze_table::execute (this=<optimized out>, thd=0x149710000d48) at /test/11.0_dbg/sql/sql_admin.cc:1483
      #10 0x00005646c4c0a79a in mysql_execute_command (thd=thd@entry=0x149710000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.0_dbg/sql/sql_parse.cc:6003
      #11 0x00005646c4bf316d in mysql_parse (thd=thd@entry=0x149710000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14973bb66300) at /test/11.0_dbg/sql/sql_parse.cc:7999
      #12 0x00005646c4c0079f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x149710000d48, packet=packet@entry=0x14971000ae29 "", packet_length=packet_length@entry=55, blocking=blocking@entry=true) at /test/11.0_dbg/sql/sql_class.h:1370
      #13 0x00005646c4c02bd8 in do_command (thd=0x149710000d48, blocking=blocking@entry=true) at /test/11.0_dbg/sql/sql_parse.cc:1407
      #14 0x00005646c4d668b9 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5646c79abff8, put_in_cache=put_in_cache@entry=true) at /test/11.0_dbg/sql/sql_connect.cc:1416
      #15 0x00005646c4d66d88 in handle_one_connection (arg=0x5646c79abff8) at /test/11.0_dbg/sql/sql_connect.cc:1318
      #16 0x000014976ca6f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #17 0x000014976c65b133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.29 (dbg), 10.5.20 (dbg), 10.6.13 (dbg), 10.8.8 (dbg), 10.9.6 (dbg), 10.10.4 (dbg), 10.11.3 (dbg), 11.0.2 (dbg), 11.1.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.4.29 (opt), 10.5.20 (opt), 10.6.13 (opt), 10.8.8 (opt), 10.9.6 (opt), 10.10.4 (opt), 10.11.3 (opt), 11.0.2 (opt), 11.1.0 (opt)

      Attachments

        Activity

          People

            nikitamalyavin Nikita Malyavin
            ramesh Ramesh Sivaraman
            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.